Friday, August 5, 2011
Friday, June 17, 2011
Tuesday, May 10, 2011
How to make redirect for some URL with parameters to other URL with different parameters
if ($args = "id=115&typeId=14") {
rewrite ^ http://www.example.com/main/newsfeed/xml?hash=gdsgsdgf permanent;
}
rewrite ^ http://www.example.com/main/newsfeed/xml?hash=gdsgsdgf permanent;
}
Wednesday, March 23, 2011
How to export to CSV in PostgreSQL with psql in cmd
psql -U postgres -c "COPY (select 'a', ',b') TO STDOUT WITH CSV HEADER" database
Labels:
admin,
bash,
cmd,
command line,
CSV,
export,
postgresql
Thursday, February 17, 2011
How to sort similar string with words in mixed up order
select distinct on (
array_to_string(
(select array_agg(xx) from (
select lower(x) from unnest(string_to_array(lower(value), ' ')) x order by x
) xx), ' ')
) value
from dup;
table:
create table dup (
value text
);
How to sort similar string with words in mixed up order
select distinct on (array_to_string((select array_agg(xx) from (select lower(x) from
unnest(string_to_array(lower(value), ' ')) x order by x) xx), ' ')) value from dup;
unnest(string_to_array(lower(value), ' ')) x order by x) xx), ' ')) value from dup;
Wednesday, January 19, 2011
Subscribe to:
Comments (Atom)