Re: Roadmap for FE/BE protocol redesign

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Roadmap for FE/BE protocol redesign
Date: 2003-03-11 19:22:46
Message-ID: 03AF4E498C591348A42FC93DEA9661B8259D7B@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 11 March 2003 18:39
> To: Dave Page
> Cc: pgman(at)candle(dot)pha(dot)pa(dot)us; pgsql-hackers(at)postgresql(dot)org;
> pgsql-interfaces(at)postgresql(dot)org
> Subject: Re: [HACKERS] Roadmap for FE/BE protocol redesign
>
>
> "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> >> What about:
> >>
> >> * Joins. Does an aliased JOIN output variable get resolved
> >> to the underlying table variable? What about common columns
> >> in USING/NATURAL joins?
>
> > Sorry, not sure what you mean - can you give me an example?
>
> Sure, consider table1 with columns a,b,c and table2 with a,x,y:
>
> SELECT * FROM table1 NATURAL JOIN table2
>
> has output columns a,b,c,x,y (notice only one column a). How
> do you expect these to be labeled? Does the answer change if
> the join is OUTER? For example, in a LEFT JOIN x and y might
> return NULLs that have nothing to do with any table2 row; is
> it still appropriate to label them as table2 outputs? And
> what do we do with column a in each outer-join case?

Oh, I see. Well, we cannot resolve those cases unless we decide in
advance that we will return metadata from either the left or right
table. That sings future FAQ to me so I would be inclined to omit the
additional info as we would for an aggregate.

> Also, how about an aliased join
>
> SELECT * FROM (table1 NATURAL JOIN table2) AS q(r,s,t,u,v)
>
> In this case the output columns are named q.r, q.s, q.t, q.u,
> q.v as far as the SELECT list can tell --- it's actually
> illegal to refer to
> table1.* or table2.* in the SELECT list, IIRC. Do we drill
> down into the JOIN? (Probably so, if you expect the thing to
> drill down into sub-SELECTs, but I want clarity ...)

Likewise, if we can't figure out the info accurately, simply don't
report it.

In these, and any other similar cases, we will be no worse off with no
underlying attribute data than we are now, and in the vast majority of
cases we will benefit.

Regards, Dave.

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2003-03-11 20:01:44 Re: Largest filesize under Linux
Previous Message Byron A Jeff 2003-03-11 18:41:31 Re: Largest filesize under Linux