From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Christopher Kings-Lynne <chris(dot)kings-lynne(at)calorieking(dot)com>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bernd Helmle <mailings(at)oopsware(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Susanne Ebrecht <susanne(dot)ebrecht(at)credativ(dot)de> |
Subject: | Re: [PATCHES] 8.2 features? |
Date: | 2006-07-20 04:36:54 |
Message-ID: | 23454.1153370214@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
Joe Conway <mail(at)joeconway(dot)com> writes:
> The difficulty is finding a way to avoid all that extra work without a
> very ugly special case kludge just for inserts.
[ thinks a bit ... ]
It seems to me that the reason it's painful is exactly that INSERT
... VALUES is a kluge already. We've special-cased the situation where
the INSERT's <query expression> is a <table value constructor> with
exactly one row --- but actually a <table value constructor> with
multiple rows ought to be allowed anywhere you can currently write
"SELECT ...". So ideally fixing this would include eliminating the
current artificial distinction between two types of INSERT command.
I think the place we'd ultimately like to get to involves changing the
executor's Result node type to have a list of targetlists and sequence
through those lists to produce its results (cf Append --- perhaps while
at it, divorce the "gating node" functionality into a different node
type). That part seems clear, what's a bit less clear is what the
ripple effect on the upstream parser/planner data structures should be.
Should *all* occurrences of Query be changed to have a
list-of-targetlists? Sounds ugly, and I don't understand what it would
mean for any Query other than one representing a VALUES construct.
[ thinks some more ... ]
Maybe the right place to put the list-of-targetlists functionality is
not in Query per se, but in a new type of jointree node. This would
localize the impact as far as changing the datastructures go, but I've
not thought hard enough about what the impact would actually be.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2006-07-20 05:18:39 | Re: [PATCHES] 8.2 features? |
Previous Message | Joe Conway | 2006-07-20 04:16:02 | Re: [PATCHES] 8.2 features? |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2006-07-20 04:49:36 | Re: Statement Queuing |
Previous Message | Joe Conway | 2006-07-20 04:16:02 | Re: [PATCHES] 8.2 features? |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2006-07-20 05:18:39 | Re: [PATCHES] 8.2 features? |
Previous Message | Joe Conway | 2006-07-20 04:16:02 | Re: [PATCHES] 8.2 features? |