X-Original-To: pgsql-hackers@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 693B4476022 for ; Tue, 11 Mar 2003 10:54:28 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2BFsWub005243; Tue, 11 Mar 2003 10:54:33 -0500 (EST) To: "Dave Page" Cc: pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: Roadmap for FE/BE protocol redesign In-reply-to: <03AF4E498C591348A42FC93DEA9661B8259D6F@mail.vale-housing.co.uk> References: <03AF4E498C591348A42FC93DEA9661B8259D6F@mail.vale-housing.co.uk> Comments: In-reply-to "Dave Page" message dated "Tue, 11 Mar 2003 15:34:34 +0000" Date: Tue, 11 Mar 2003 10:54:32 -0500 Message-ID: <5242.1047398072@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/429 X-Sequence-Number: 36675 "Dave Page" writes: > As I see it, the tidy/simple answer is to add nspname, relname and > attname information to each attribute in the row description, and if any > one of those cannot be easily determined, or the value doesn't come > directly from there (ie an aggregate), it is simply omitted or left > empty. It could be done more efficiently with attnum/attrelid, but I > wonder if that might cause problems in the future if attnum gets hacked > about. I'd prefer to stick with rel OID and attnum; those are the keys you are going to need for looking in the system catalogs, anyway, and they're surely a lot more compact to transmit than three Names (potentially 180 bytes or so). So let me get this straight: we want the attribute ID information for any SELECT output column that is a simple Var (no expressions, and no aggregated cases either), treating view output columns as Vars belonging to the view. What about: * Joins. Does an aliased JOIN output variable get resolved to the underlying table variable? What about common columns in USING/NATURAL joins? * Sub-selects. Are you expecting SELECT x FROM (SELECT x FROM foo) ss to produce a reference to foo.x? (If so, why is this different from the case where ss is a view?) regards, tom lane