Re: [SQL] select count of all overlapping geometries and return 0 if none.

2009-03-13 Thread Peter Eisentraut
On Thursday 12 March 2009 19:28:19 Duffer Do wrote: > I want to return the following: > locations    |  number_visits > Frankfurt    |  6 > Manhattan  |  3 > Talahassee |  0 > > My query only returns: > Frankfurt    |  6 > Manhattan  | 3 > My query: > SELECT count(user_name) as number_visits, loca

Re: [SQL] Permanent alias for postgresql table

2009-03-13 Thread Mina R Waheeb
Hi, Somewhere the query should be rewritten, on the server side with a VIEW or FUNCTION or in the query generator (SQL client side). If you worry about the performance create a test case and test the performance, Also EXPLAIN could help you. The VIEW is optimized by the server and it will be bet

[SQL] Re: select count of all overlapping geometries and return 0 if none.

2009-03-13 Thread Steve Midgley
At 06:20 AM 3/13/2009, pgsql-sql-ow...@postgresql.org wrote: Message-ID: <457532.70947...@web45913.mail.sp1.yahoo.com> Date: Thu, 12 Mar 2009 10:28:19 -0700 (PDT) From: Duffer Do Subject: select count of all overlapping geometries and return 0 if none. To: pgsql-sql@postgresql.org X-Archive-Nu

[SQL] RE : [SQL] Convert text from UTF8 to ASCII

2009-03-13 Thread seb JACK
Hi Perhaps you should try to set your db client_encoding to UTF8. How do you know you have 'patiënt' instead of 'patiënt'? I mean i also deals with UTF8 databases and all i store is correctly stored. But i can't check it with command line psql as my shell is configured with iso-8859-1 charse

[SQL] xpath_table feature

2009-03-13 Thread Marcin Stępnicki
Hello. I've read the documentation, I think I have even found the article after which this part of documentation has been updated (http://markmail.org/thread/ys2a2yph5zgmnls5) but I still can't write appropriate query :-(. Let's consider the following: create table test_xml (id serial primary k

Re: [SQL] Convert text from UTF8 to ASCII

2009-03-13 Thread Paul Dam
UTF8 Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -Oorspronkelijk bericht- Van: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] Namens Claus Guttesen Verzonden: woensdag 11 maart 2