pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Joe Conway <mail@joeconway.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Kings-Lynne <chris.kings-lynne@calorieking.com>
Cc: Hackers (PostgreSQL) <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Bernd Helmle <mailings@oopsware.de>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Susanne Ebrecht <susanne.ebrecht@credativ.de>
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Date: Sat, 29 Jul 2006 18:45:44 -0700
Message-ID: <44CC0F48.9020805@joeconway.com> (raw )
In-Reply-To: <21398.1154223324@sss.pgh.pa.us >
References: <44B69778.5050104@dunslane.net >
<50461.84.63.113.55.1152832991.squirrel@pezone.net >
<ECCAAC0A3182895D3D12B0E8@[172.26.14.247] >
<44B7ADFC.90205@dunslane.net >
<44BC0432.3040509@joeconway.com >
<44BC661F.80609@joeconway.com >
<44BCD06C.3060409@calorieking.com >
<44BCF1D4.3010807@dunslane.net >
<5842.1153246741@sss.pgh.pa.us >
<44BD8854.9060506@calorieking.com >
<15212.1153279954@sss.pgh.pa.us >
<44BDB2F5.7080003@joeconway.com >
<44BEA710.6060700@joeconway.com >
<23198.1153367887@sss.pgh.pa.us >
<44BF0382.2010501@joeconway.com >
<23454.1153370214@sss.pgh.pa.us >
<44BF122F.1080200@joeconway.com >
<23927.1153373971@sss.pgh.pa.us >
<44C00E1E.1000405@joeconway.com >
<14047.1153442773@sss.pgh.pa.us >
<44C4451A.4010906@joeconway.com >
<11495.1153757531@sss.pgh.pa.us >
<44C4F625.2050304@joeconway.com >
<12029.1153760969@sss.pgh.pa.us >
<44CC0A66.6070903@joeconway.com >
<21398.1154223324@sss.pgh.pa.us >
Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>>One of the things I'm struggling with is lack of column aliases. Would
>>it be reasonable to require something like this?
> Requiring column aliases is counter to spec ...
>> SELECT ... FROM (VALUES ...) AS foo(col1 type1, col2 type2, ...)
> ... and this is even further away from it.
I figured as much, but thought I'd ask anyway :-). I did find something
in the appendix to the spec after sending this:
Annex C
(informative)
Implementation-dependent elements
18) Subclause 7.3, “<table value constructor>”:
a) The column names of a <table value constructor> or a <contextually
typed table value constructor>
are implementation-dependent.
> As for the names, just use "?column?", same as we do now in INSERT
> ... VALUES. Anyone who wants to refer to those columns explicitly will
> need to assign aliases, but if they don't assign aliases, we don't have
> to do anything very intelligent.
OK, I just thought "?column?" was ugly and useless.
> As for the types, I believe that the spec pretty much dictates that we
> apply the same type resolution algorithm as for a UNION. This is fairly
> expensive and we should avoid it in the case of INSERT ... VALUES, but
> for VALUES appearing anywhere else I think we have little choice.
Where do I find that algorithm -- somewhere in nodeAppend.c?
Thanks,
Joe
view thread (61+ messages) latest in thread
Message-ID: <44CC0F48.9020805@joeconway.com>
Permalink: ../44CC0F48.9020805@joeconway.com/
Also on: postgresql.org/message-id/44CC0F48.9020805@joeconway.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: mail@joeconway.com, tgl@sss.pgh.pa.us, chris.kings-lynne@calorieking.com, pgsql-hackers@postgresql.org, andrew@dunslane.net, mailings@oopsware.de, peter_e@gmx.net, susanne.ebrecht@credativ.de
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
In-Reply-To: <44CC0F48.9020805@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox