Re: [PERFORM] typoed column name, but postgres didn't grump

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [PERFORM] typoed column name, but postgres didn't grump
Дата
Msg-id 4CD03D9102000025000371C6@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: [PERFORM] typoed column name, but postgres didn't grump  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Ответы Re: [PERFORM] typoed column name, but postgres didn't grump  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Список pgsql-bugs
Jon Nelson <jnelson+pgsql@jamponi.net> wrote:

> If I saw this behavior ( a.b also meaning b(a) ) in another SQL
> engine, I would consider it a thoroughly unintuitive wart

I think the main reason it has been kept is the converse -- if you
define a function "b" which takes record "a" as its only parameter,
you have effectively created a "generated column" on any relation
using record type "a".  Kind of.  It won't show up in the display of
the relation's structure or in a SELECT *, and you can't use it in
an unqualified reference; but you can use a.b to reference it, which
can be convenient.

It seems to me that this would be most useful in combination with
the inheritance model of PostgreSQL (when used for modeling object
hierarchies rather than partitioning).

-Kevin

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

Предыдущее
От: Korry Douglas
Дата:
Сообщение: Re: ecpg preprocessor regression in 9.0
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.