Обсуждение: SPI_fnumber is case sensitive

Поиск
Список
Период
Сортировка

SPI_fnumber is case sensitive

От
"Thomas Hallgren"
Дата:
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



Re: SPI_fnumber is case sensitive

От
Tom Lane
Дата:
"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


Re: SPI_fnumber is case sensitive

От
"Thomas Hallgren"
Дата:
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.
>
> 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
>