Re: PostgreSQL Gotchas

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: PostgreSQL Gotchas
Дата
Msg-id 87achcgeyq.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Gotchas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > So two identifiers match if either is an unquoted identifier and they match
> > case insensitively. Or if both are quoted and they match case sensitively.
>
> Which part of "adhere to the standard" are you failing to get?  The
> standard is 100% clear about what it means by case folding, and the
> above is not it.

I guess I had a few unstated assumptions:

1) That we don't care what algorithm the standard specifies as long as we're
   functionally equivalent.

2) That we don't care about producing errors in all the cases where following
   the standard would produce an error. Ie, that as long as we accept any code
   that the standard says should work we don't care if we sometimes accept
   code that the standard says should produce errors like "column not found".

Also my position somewhat evolved between the beginning of the mail and the
end. Specifically I think we can aim to be compatible with specific common
standards-compliant idioms even if we don't follow the letter of the standard.

For example I think there's a ton of code out there that is nigh impossible to
port to Postgres only because it defines tables with columns like "FOO" and
then refers to them as foo or FOO. And vice versa, code that defines columns
as foo or FOO and then refers to them in queries as "FOO". There's no reason
to say it's useless to support that and make lots of code work fine under
Postgres even if that doesn't mean we fit the standard 100%.

--
greg

В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [pgsql-advocacy] Oracle buys Innobase
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: [pgsql-advocacy] Oracle buys Innobase