Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 245A71337999 for ; Tue, 2 Nov 2010 18:34:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 19047-02 for ; Tue, 2 Nov 2010 21:34:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id E4B0B1337B81 for ; Tue, 2 Nov 2010 18:34:30 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 02 Nov 2010 16:34:30 -0500 Message-Id: <4CD03D9102000025000371C6@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 02 Nov 2010 16:34:25 -0500 From: "Kevin Grittner" To: "Jon Nelson" , Subject: Re: [PERFORM] typoed column name, but postgres didn't grump References: <4480.1288374498@sss.pgh.pa.us> <4CCACE6E0200002500036F95@gw.wicourts.gov> <6240.1288379246@sss.pgh.pa.us> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/22 X-Sequence-Number: 28602 Jon Nelson 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