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

Поиск
Список
Период
Сортировка
От Jon Nelson
Тема Re: [PERFORM] typoed column name, but postgres didn't grump
Дата
Msg-id AANLkTikS1ne-VdEwKNp1FqWNhxF=84cXrL1P_zJYaie=@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PERFORM] typoed column name, but postgres didn't grump  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
On Tue, Nov 2, 2010 at 4:34 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> 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". =C2=A0Kind of. =C2=A0It won't show up in the displ=
ay 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.

Aha. I think I understand, now. I also read up on CAST behavior
changes between 8.1 and 8.4 (what I'm using), and I found section
34.4.2  "SQL Functions on Composite Types" quite useful.

Thanks!

--=20
Jon

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Следующее
От: "Tian Shiquan"
Дата:
Сообщение: BUG #5742: cannot alter column