Re: [PERFORM] typoed column name, but postgres didn't grump - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: [PERFORM] typoed column name, but postgres didn't grump
Date
Msg-id 4CD03D9102000025000371C6@gw.wicourts.gov
Whole thread Raw
In response to Re: [PERFORM] typoed column name, but postgres didn't grump  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Responses Re: [PERFORM] typoed column name, but postgres didn't grump  (Jon Nelson <jnelson+pgsql@jamponi.net>)
List 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 by date:

Previous
From: Korry Douglas
Date:
Subject: Re: ecpg preprocessor regression in 9.0
Next
From: Dimitri Fontaine
Date:
Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.