[SQL] lower() not working correctly...?

2006-09-15 Thread Andreas Joseph Krogh
I have the following query: select lower(firstname) || ' ' || lower(lastname) from person firstname and lastname are VARCHAR lower() returns NULL when firstname OR lastname is NULL, is this correct? This is 8.2devel from 24.08.2006. -- Andreas Joseph Krogh <[EMAIL PROTECTED]> Senior Software

Re: [SQL] lower() not working correctly...?

2006-09-15 Thread A. Kretschmer
am Fri, dem 15.09.2006, um 10:06:40 +0200 mailte Andreas Joseph Krogh folgendes: > I have the following query: > > select lower(firstname) || ' ' || lower(lastname) from person > > firstname and lastname are VARCHAR > > lower() returns NULL when firstname OR lastname is NULL, is this correct?

Re: [SQL] lower() not working correctly...?

2006-09-15 Thread Guillaume Lelarge
Andreas Joseph Krogh a ecrit le 15/09/2006 10:06: I have the following query: select lower(firstname) || ' ' || lower(lastname) from person firstname and lastname are VARCHAR lower() returns NULL when firstname OR lastname is NULL, is this correct? This is 8.2devel from 24.08.2006. NULL is

Re: [SQL] lower() not working correctly...?

2006-09-15 Thread Amit_Wadhwa
unsubscribe ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] Sorting items in aggregate function (thanks)

2006-09-15 Thread Steven Murdoch
On Tue, Sep 12, 2006 at 04:37:55PM -0400, Tom Lane wrote: > Note that if you need to GROUP in the outer query, it's best to sort the > inner query's output first by the outer query's grouping: ... Great - this works fine. Thanks also to the other people who replied. Steven. -- w: http://www.cl.

[SQL] Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4

2006-09-15 Thread gould
hi I am upgrading from pgsql 7.4.1 to pgsql 8.1.4. However, some of the application queries won't run on the newer version of pgsql. An example of the type of query is: SELECT protein_external_links.protein_id, external_links.external_id, proteins.public_name WHERE protein_external_links.external_

Re: [SQL] Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4

2006-09-15 Thread Milen A. Radev
[EMAIL PROTECTED] написа: [...] > Is there some query optimization config setting I can set in pgsql 8.1.4 to > fix > this problem rather than having to change the queries in the code? I've read > over the changes between pgsql 7 and pgsql 8 but nothing seems to stand out to > me as referencing t

Re: [SQL] Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4

2006-09-15 Thread A. Kretschmer
am Fri, dem 15.09.2006, um 11:16:06 +0200 mailte [EMAIL PROTECTED] folgendes: > Is there some query optimization config setting I can set in pgsql 8.1.4 to > fix Yes. 'add_missing_from = true' in the postgresql.conf http://www.varlena.com/GeneralBits/Tidbits/annotated_conf_e.html But, you shou

Re: [SQL] [HACKERS] lower() not working correctly...?

2006-09-15 Thread Ragnar
On fös, 2006-09-15 at 09:52 +0200, Andreas Joseph Krogh wrote: > I have the following query: > > select lower(firstname) || ' ' || lower(lastname) from person > > firstname and lastname are VARCHAR > > lower() returns NULL when firstname OR lastname is NULL, is this correct? In fact, your probl

Re: [SQL] Aggregates with internal state type?

2006-09-15 Thread Markus Schaber
Hi, Tom, Markus Schaber wrote: >>> This lead me to the question whether it is possible to use "internal" as >>> state type for an Aggregate whose functions are implemented in C. >> No, because the system has no idea what the representation of an >> "internal" state value might be, and in particul