SPI_fnumber is case sensitive

Started by Thomas Hallgrenover 21 years ago3 messages
#1Thomas Hallgren
thhal@mailblocks.com

The SPI_fnumber (returns the column number using a name) is case sensitive.
I think a patch would be appropriate. Either to the documentation that could
state this fact and suggest lowercasing the colname parameter, or to the
code to make it case insensitive. I'd be happy to provide the one chosen.

Which one is better?

Regards,

Thomas Hallgren

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thomas Hallgren (#1)
Re: SPI_fnumber is case sensitive

"Thomas Hallgren" <thhal@mailblocks.com> writes:

The SPI_fnumber (returns the column number using a name) is case sensitive.

It's supposed to be. If it weren't, how would you cope with a result
that contains both "x" and "X"?

regards, tom lane

#3Thomas Hallgren
thhal@mailblocks.com
In reply to: Thomas Hallgren (#1)
Re: SPI_fnumber is case sensitive

Didn't think you'd ever get such a result.

Using JDBC (wich has similar functionality), you don't need to worry about
case on identifiers.

regards,

Thomas Hallgren

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Thomas Hallgren" <thhal@mailblocks.com>
Cc: <pgsql-hackers@postgresql.org>
Sent: Thursday, May 06, 2004 2:09 PM
Subject: Re: [HACKERS] SPI_fnumber is case sensitive

"Thomas Hallgren" <thhal@mailblocks.com> writes:

The SPI_fnumber (returns the column number using a name) is case

sensitive.

Show quoted text

It's supposed to be. If it weren't, how would you cope with a result
that contains both "x" and "X"?

regards, tom lane