8.2 features?
What is the state of the following items that have been previously
discussed?
. MERGE (at least in PK case)
. multiple values clauses for INSERT
. recursive WITH queries
Thanks
andrew
Andrew Dunstan <andrew@dunslane.net> writes:
What is the state of the following items that have been previously
discussed?
. MERGE (at least in PK case)
No submitted patch; no one working on it AFAIK; doesn't look like
something that could get done in the next three weeks.
. multiple values clauses for INSERT
Also not done, but if we are willing to accept a limited patch
(ie, not necessarily everything that SQL92 says you can do with
VALUES, but at least the INSERT case) I think it could get done.
I might even volunteer to do it ... but won't object if someone
else volunteers to.
. recursive WITH queries
I believe Jonah has given up on fixing the originally-submitted
patch, but he mentioned at the code sprint that non-recursive
WITH is potentially doable in time for 8.2. Not sure if that's
a sufficiently important case to be worth doing.
regards, tom lane
On 7/13/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
. recursive WITH queries
I believe Jonah has given up on fixing the originally-submitted
patch, but he mentioned at the code sprint that non-recursive
WITH is potentially doable in time for 8.2. Not sure if that's
a sufficiently important case to be worth doing.
A working WITH clause which will work in most usual use-cases will be submitted.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
Tom Lane wrote:
. multiple values clauses for INSERT
Also not done, but if we are willing to accept a limited patch
(ie, not necessarily everything that SQL92 says you can do with
VALUES, but at least the INSERT case) I think it could get done.
I might even volunteer to do it ... but won't object if someone
else volunteers to.
I would be very happy to see it accepted.
cheers
andrew
On 7/13/06, Andrew Dunstan <andrew@dunslane.net> wrote:
. multiple values clauses for INSERT
I would be very happy to see it accepted.
Same here.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
On Thu, Jul 13, 2006 at 05:09:32PM -0400, Jonah H. Harris wrote:
On 7/13/06, Andrew Dunstan <andrew@dunslane.net> wrote:
. multiple values clauses for INSERT
I would be very happy to see it accepted.
Same here.
<aol>Me, too!</aol>
Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
What is the state of the following items that have been previously
discussed?
. multiple values clauses for INSERTAlso not done, but if we are willing to accept a limited patch
(ie, not necessarily everything that SQL92 says you can do with
VALUES, but at least the INSERT case) I think it could get done.
I might even volunteer to do it ... but won't object if someone
else volunteers to.
I'm looking to contribute something useful for the 8.2 release, and it
seems Bernd is going to finish up updateable views himself, so I'd be
glad to take a look (at the limited case, that is). Any landmines I
should watch out for?
Joe
Andrew Dunstan wrote:
. MERGE (at least in PK case)
I think that died after we figured out that it didn't do the sort of
UPDATE-else-INSERT thing that people wanted out of it.
. multiple values clauses for INSERT
Susanne Ebrecht <susanne.ebrecht@credativ.de> was last heard to work on
it. Updates, Susanne?
* Peter Eisentraut (peter_e@gmx.net) wrote:
Andrew Dunstan wrote:
. MERGE (at least in PK case)
I think that died after we figured out that it didn't do the sort of
UPDATE-else-INSERT thing that people wanted out of it.
I agree that it's probably not going to happen for 8.2 but I certainly
have uses for the SQL spec's definition of MERGE (table-level instead of
the individual-tuple case). I'd like to see the individual-tuple
UPSERT/REPLACE issue handled as well but I don't believe MERGE lacking
that necessairly means MERGE should be ignored..
Thanks,
Stephen
On 7/13/06, Stephen Frost <sfrost@snowman.net> wrote:
I agree that it's probably not going to happen for 8.2 but I certainly
have uses for the SQL spec's definition of MERGE (table-level instead of
the individual-tuple case). I'd like to see the individual-tuple
UPSERT/REPLACE issue handled as well but I don't believe MERGE lacking
that necessairly means MERGE should be ignored..
Where does Jan stand on it, I know he was doing some thinking about
how to accomplish it.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
--On Freitag, Juli 14, 2006 01:23:11 +0200 Peter Eisentraut
<peter_e@gmx.net> wrote:
. multiple values clauses for INSERT
Susanne Ebrecht <susanne.ebrecht@credativ.de> was last heard to work on
it. Updates, Susanne?
I've talked to Susanne today and she's just back from hospital and not
available
online until next week.
She was working on the SET (col1, col2) = (val1, val2) syntax for UPDATE
commands.
Don't know what the status is on this, though.
--
Thanks
Bernd
Bernd Helmle wrote:
--On Freitag, Juli 14, 2006 01:23:11 +0200 Peter Eisentraut
<peter_e@gmx.net> wrote:. multiple values clauses for INSERT
Susanne Ebrecht <susanne.ebrecht@credativ.de> was last heard to work on
it. Updates, Susanne?I've talked to Susanne today and she's just back from hospital and not
available
online until next week.
She was working on the SET (col1, col2) = (val1, val2) syntax for
UPDATE commands.
Don't know what the status is on this, though.
Not the same thing, surely. So maybe we should gratefully accept Joe
Conway's offer to work on it.
cheers
andrew
Am Freitag, den 14.07.2006, 16:26 +0200 schrieb Bernd Helmle:
--On Freitag, Juli 14, 2006 01:23:11 +0200 Peter Eisentraut
<peter_e@gmx.net> wrote:. multiple values clauses for INSERT
Susanne Ebrecht <susanne.ebrecht@credativ.de> was last heard to work on
it. Updates, Susanne?I've talked to Susanne today and she's just back from hospital and not
available
online until next week.
She was working on the SET (col1, col2) = (val1, val2) syntax for UPDATE
commands.
Don't know what the status is on this, though.
Thanks Peter and Bernd for your postings.
I'am working on
update table set (col1, col2, ...) = (val1, val2, ...), (colx,
coly, ...) = (valx, valy, ...), ...
I hope, it will be finished this week. Most of work is done.
Susanne
Andrew Dunstan wrote:
Bernd Helmle wrote:
--On Freitag, Juli 14, 2006 01:23:11 +0200 Peter Eisentraut
<peter_e@gmx.net> wrote:. multiple values clauses for INSERT
Susanne Ebrecht <susanne.ebrecht@credativ.de> was last heard to work on
it. Updates, Susanne?I've talked to Susanne today and she's just back from hospital and not
available online until next week.
She was working on the SET (col1, col2) = (val1, val2) syntax for
UPDATE commands.
Don't know what the status is on this, though.Not the same thing, surely. So maybe we should gratefully accept Joe
Conway's offer to work on it.
I've played with this a bit now, and the grammar changes seem pretty
straightforward, but the other half is kind of ugly. I can't see a good
way to propagate multiple targetlists that isn't a big hack.
The best way might be to fabricate a selectStmt equiv to
"SELECT <targetlist> UNION ALL SELECT <targetlist>...",
but that still feels like a hack.
Have there been any past discussions on how this might be implemented
(FWIW I couldn't find any in the archives)? Any better ideas for an
approach?
Thanks,
Joe
Joe Conway wrote:
. multiple values clauses for INSERT
The best way might be to fabricate a selectStmt equiv to
"SELECT <targetlist> UNION ALL SELECT <targetlist>...",
but that still feels like a hack.
Here is a patch pursuant to my earlier post. It has the advantage of
being fairly simple and noninvasive.
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit exceeded".
Perhaps for the typical use-case this is sufficient though.
I'm open to better ideas, comments, objections...
Thanks,
Joe
Attachments:
multi-insert.difftext/x-patch; name=multi-insert.diffDownload
Index: src/backend/parser/gram.y
===================================================================
RCS file: /cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.551
diff -c -r2.551 gram.y
*** src/backend/parser/gram.y 3 Jul 2006 22:45:39 -0000 2.551
--- src/backend/parser/gram.y 18 Jul 2006 04:19:45 -0000
***************
*** 238,251 ****
qualified_name_list any_name any_name_list
any_operator expr_list attrs
target_list update_target_list insert_column_list
! insert_target_list def_list indirection opt_indirection
! group_clause TriggerFuncArgs select_limit
! opt_select_limit opclass_item_list
! transaction_mode_list_or_empty
TableFuncElementList
prep_type_clause prep_type_list
execute_param_clause using_clause
%type <range> into_clause OptTempTableName
%type <defelt> createfunc_opt_item common_func_opt_item
--- 238,253 ----
qualified_name_list any_name any_name_list
any_operator expr_list attrs
target_list update_target_list insert_column_list
! insert_target_els
! def_list indirection opt_indirection group_clause
! TriggerFuncArgs select_limit opt_select_limit
! opclass_item_list transaction_mode_list_or_empty
TableFuncElementList
prep_type_clause prep_type_list
execute_param_clause using_clause
+ %type <node> insert_target_list insert_target_lists
+
%type <range> into_clause OptTempTableName
%type <defelt> createfunc_opt_item common_func_opt_item
***************
*** 5349,5360 ****
;
insert_rest:
! VALUES '(' insert_target_list ')'
{
$$ = makeNode(InsertStmt);
$$->cols = NIL;
! $$->targetList = $3;
! $$->selectStmt = NULL;
}
| DEFAULT VALUES
{
--- 5351,5370 ----
;
insert_rest:
! VALUES insert_target_lists
{
$$ = makeNode(InsertStmt);
$$->cols = NIL;
! if (((SelectStmt *) $2)->op == SETOP_UNION)
! {
! $$->targetList = NIL;
! $$->selectStmt = $2;
! }
! else
! {
! $$->targetList = ((SelectStmt *) $2)->targetList;
! $$->selectStmt = NULL;
! }
}
| DEFAULT VALUES
{
***************
*** 5370,5381 ****
$$->targetList = NIL;
$$->selectStmt = $1;
}
! | '(' insert_column_list ')' VALUES '(' insert_target_list ')'
{
$$ = makeNode(InsertStmt);
$$->cols = $2;
! $$->targetList = $6;
! $$->selectStmt = NULL;
}
| '(' insert_column_list ')' SelectStmt
{
--- 5380,5399 ----
$$->targetList = NIL;
$$->selectStmt = $1;
}
! | '(' insert_column_list ')' VALUES insert_target_lists
{
$$ = makeNode(InsertStmt);
$$->cols = $2;
! if (((SelectStmt *) $5)->op == SETOP_UNION)
! {
! $$->targetList = NIL;
! $$->selectStmt = $5;
! }
! else
! {
! $$->targetList = ((SelectStmt *) $5)->targetList;
! $$->selectStmt = NULL;
! }
}
| '(' insert_column_list ')' SelectStmt
{
***************
*** 8189,8197 ****
;
insert_target_list:
! insert_target_el { $$ = list_make1($1); }
! | insert_target_list ',' insert_target_el { $$ = lappend($1, $3); }
;
insert_target_el:
--- 8207,8235 ----
;
+ insert_target_lists:
+ insert_target_list
+ {
+ $$ = $1;
+ }
+ | insert_target_lists ',' insert_target_list
+ {
+ $$ = makeSetOp(SETOP_UNION, TRUE, $1, $3);
+ }
+ ;
+
insert_target_list:
! '(' insert_target_els ')'
! {
! SelectStmt *n = makeNode(SelectStmt);
! n->targetList = $2;
! $$ = (Node *) n;
! }
! ;
!
! insert_target_els:
! insert_target_el { $$ = list_make1($1); }
! | insert_target_els ',' insert_target_el { $$ = lappend($1, $3); }
;
insert_target_el:
Hello,
I did some work on mutliple value insert. First: SELECT .. UNION ALL SELECT
is wrong idea. VALUES can contain DEFAULT keyword. Second: It's neccessery
general implementation of table values constructor like SQL:2003. Main
problem what I see is biger request on sources if we implement MVI as
classic PostgreSQL stmt.
Regards
Pavel Stehule
_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci.
http://messenger.msn.cz/
Import Notes
Resolved by subject fallback
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit exceeded".
Perhaps for the typical use-case this is sufficient though.I'm open to better ideas, comments, objections...
If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.
Chris
Christopher Kings-Lynne wrote:
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit exceeded".
Perhaps for the typical use-case this is sufficient though.I'm open to better ideas, comments, objections...
If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.
Yeah. The fabricated select hack does feel wrong to me. Taking a quick
2 minute look at the grammar it looks like a better bet would be to make
InsertStmt.targetList a list of lists of values rather than just a list
of values. Of course, that would make the changes more invasive. Even
with that we'd still be reading the whole thing into memory ... is there
a sane way to cache the inline data before statement execution?
I guess we can just say that for true bulk load our supported mechanism
is still just COPY, but it would be a pity to restrict a feature that is
in the standard that way.
cheers
andrew
Andrew Dunstan wrote:
Christopher Kings-Lynne wrote:
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit exceeded".
Perhaps for the typical use-case this is sufficient though.I'm open to better ideas, comments, objections...
If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.Yeah. The fabricated select hack does feel wrong to me. Taking a quick
2 minute look at the grammar it looks like a better bet would be to make
InsertStmt.targetList a list of lists of values rather than just a list
of values. Of course, that would make the changes more invasive. Even
with that we'd still be reading the whole thing into memory ... is there
a sane way to cache the inline data before statement execution?
I started down the path of making InsertStmt.targetList a list of
targetlists. The problem is finding a reasonable way to make that
available to the executor. Back to the drawing board I guess.
I have similar concerns with the millions of values-targetlists comment
that Chris made. But I don't see how we can cache the data easily short
of inventing a List alternative that spills to disk.
I guess we can just say that for true bulk load our supported mechanism
is still just COPY, but it would be a pity to restrict a feature that is
in the standard that way.
True
Joe
If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.
I did some experimentation just now, and could not get mysql to accept a
command longer than about 1 million bytes. It complains about
Got a packet bigger than 'max_allowed_packet' bytes
which seems a bit odd because max_allowed_packet is allegedly set to
16 million, but anyway I don't think people are going to be loading any
million-row tables using single INSERT commands in mysql either.
regards, tom lane
chris.kings-lynne@calorieking.com (Christopher Kings-Lynne) writes:
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit
exceeded". Perhaps for the typical use-case this is sufficient
though.
I'm open to better ideas, comments, objections...If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.
Curiosity: How do *does* TheirSQL parse that, and not have the One
Gigantic Query blow up their query parser?
--
output = reverse("gro.gultn" "@" "enworbbc")
http://www.ntlug.org/~cbbrowne/unix.html
JOHN CAGE (strapped to table): Do you really expect me to conduct this
antiquated tonal system?
LEONARD BERNSTEIN: No, Mr. Cage, I expect you to die!
[With apologies to music and James Bond fans the world over...]
Chris Browne wrote:
chris.kings-lynne@calorieking.com (Christopher Kings-Lynne) writes:
The major downside is that somewhere between 9000 and 10000
VALUES-targetlists produces "ERROR: stack depth limit
exceeded". Perhaps for the typical use-case this is sufficient
though.
I'm open to better ideas, comments, objections...If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.Curiosity: How do *does* TheirSQL parse that, and not have the One
Gigantic Query blow up their query parser?
Experimentation shows that mysqldump breaks up the insert into chunks.
Example with 10m rows:
[ad@wired-219 ~]# perl -e 'print "drop table if exists foo; create table
foo (x int);\n"; foreach my $i (0..9_9999) { print "insert into foo
values \n"; foreach my $j (0..99) { print "," if $j; print
"(",100*$i+$j+1,")"; } print ";\n"; } ' > gggggg
[ad@wired-219 ~]# mysql test < gggggg
[ad@wired-219 ~]# mysqldump test foo > aaaaaa
[ad@wired-219 ~]# mysql test < aaaaaa
[ad@wired-219 ~]# grep INSERT aaaaaa | wc -l
104
cheers
andrew
from http://dev.mysql.com/doc/refman/4.1/en/blob.html
You can change the message buffer size by changing the value of the
max_allowed_packet variable, but you must do so for both the server and
your client program. For example, both mysql and mysqldump allow you to
change the client-side max_allowed_packet value.
Tom Lane wrote:
Show quoted text
If the use case is people running MySQL dumps, then there will be
millions of values-targetlists in MySQL dumps.I did some experimentation just now, and could not get mysql to accept a
command longer than about 1 million bytes. It complains about
Got a packet bigger than 'max_allowed_packet' bytes
which seems a bit odd because max_allowed_packet is allegedly set to
16 million, but anyway I don't think people are going to be loading any
million-row tables using single INSERT commands in mysql either.regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
On Tue, Jul 18, 2006 at 02:19:01PM -0400 I heard the voice of
Tom Lane, and lo! it spake thus:
I did some experimentation just now, and could not get mysql to accept a
command longer than about 1 million bytes. It complains about
Got a packet bigger than 'max_allowed_packet' bytes
which seems a bit odd because max_allowed_packet is allegedly set to
16 million, but anyway I don't think people are going to be loading any
million-row tables using single INSERT commands in mysql either.
On the contrary, I've hit it several times by just trying to import
[into another database] the output of a mysqldump I just did. Great
design, that...
--
Matthew Fuller (MF4839) | fullermd@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
I did some experimentation just now, and could not get mysql to accept a
command longer than about 1 million bytes. It complains about
Got a packet bigger than 'max_allowed_packet' bytes
which seems a bit odd because max_allowed_packet is allegedly set to
16 million, but anyway I don't think people are going to be loading any
million-row tables using single INSERT commands in mysql either.
Strange. Last time I checked I thought MySQL dump used 'multivalue
lists in inserts' for dumps, for the same reason that we use COPY
I did some experimentation just now, and could not get mysql to accept a
command longer than about 1 million bytes. It complains about
Got a packet bigger than 'max_allowed_packet' bytes
which seems a bit odd because max_allowed_packet is allegedly set to
16 million, but anyway I don't think people are going to be loading any
million-row tables using single INSERT commands in mysql either.
Ah no, I'm mistaken. It's not by default in mysqldump, but it does seem
"recommended". This is from "man mysqldump":
-e|--extended-insert
Allows utilization of the new, much faster INSERT syntax.
Christopher Kings-Lynne <chris.kings-lynne@calorieking.com> writes:
Strange. Last time I checked I thought MySQL dump used 'multivalue
lists in inserts' for dumps, for the same reason that we use COPY
I think Andrew identified the critical point upthread: they don't try
to put an unlimited number of rows into one INSERT, only a megabyte
or so's worth. Typical klugy-but-effective mysql design approach ...
regards, tom lane
Tom Lane wrote:
Christopher Kings-Lynne <chris.kings-lynne@calorieking.com> writes:
Strange. Last time I checked I thought MySQL dump used 'multivalue
lists in inserts' for dumps, for the same reason that we use COPYI think Andrew identified the critical point upthread: they don't try
to put an unlimited number of rows into one INSERT, only a megabyte
or so's worth. Typical klugy-but-effective mysql design approach ...
OK, so given that we don't need to be able to do 1 million
multi-targetlist insert statements, here is rev 2 of the patch.
It is just slightly more invasive, but performs *much* better. In fact,
it can handle as many targetlists as you have memory to deal with. It
also deals with DEFAULT values in the targetlist.
I've attached a php script that I used to do crude testing. Basically I
tested 3 cases in this order:
single-INSERT-multi-statement:
------------------------------
"INSERT INTO foo2a (f1,f2) VALUES (1,2);"
-- repeat statement $loopcount times
single-INSERT-at-once:
----------------------
"INSERT INTO foo2b (f1,f2) VALUES (1,2);INSERT INTO foo2a (f1,f2)
VALUES (1,2);INSERT INTO foo2a (f1,f2) VALUES (1,2)..."
-- build a single SQL string by looping $loopcount times,
-- and execute it all at once
multi-INSERT-at-once:
---------------------
"INSERT INTO foo2c (f1,f2) VALUES (1,2),(1,2),(1,2)..."
-- build a single SQL string by looping $loopcount times,
-- and execute it all at once
Here are the results:
$loopcount = 100000;
single-INSERT-multi-statement Elapsed time is 34 seconds
single-INSERT-at-once Elapsed time is 7 seconds
multi-INSERT-at-once Elapsed time is 4 seconds
about 370MB peak memory usage
$loopcount = 200000;
single-INSERT-multi-statement Elapsed time is 67 seconds
single-INSERT-at-once Elapsed time is 12 seconds
multi-INSERT-at-once Elapsed time is 9 seconds
about 750MB peak memory usage
$loopcount = 300000;
single-INSERT-multi-statement Elapsed time is 101 seconds
single-INSERT-at-once Elapsed time is 18 seconds
multi-INSERT-at-once Elapsed time is 13 seconds
about 1.1GB peak memory usage
Somewhere beyond this, my machine goes into swap hell, and I didn't have
the patience to wait for it to complete :-)
It would be interesting to see a side-by-side comparison with MySQL
since that seems to be our benchmark on this feature. I'll try to do
that tomorrow if no one beats me to it.
There is only one downside to the current approach that I'm aware of.
The command-result tag is only set by the "original" query, meaning that
even if you insert 300,000 rows using this method, the command-result
tag looks like "INSERT 0 1"; e.g.:
regression=# create table foo2(f1 int default 42,f2 int default 6);
CREATE TABLE
regression=# insert into foo2 (f1,f2) values
(default,12),(default,10),(115,21);
INSERT 0 1
regression=# select * from foo2;
f1 | f2
-----+----
42 | 12
42 | 10
115 | 21
(3 rows)
Any thoughts on how to fix that?
Thanks,
Joe
Attachments:
multi-insert-r2.difftext/x-patch; name=multi-insert-r2.diffDownload
Index: src/backend/parser/analyze.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/parser/analyze.c,v
retrieving revision 1.340
diff -c -r1.340 analyze.c
*** src/backend/parser/analyze.c 14 Jul 2006 14:52:21 -0000 1.340
--- src/backend/parser/analyze.c 19 Jul 2006 03:53:35 -0000
***************
*** 657,667 ****
}
else
{
/*
* For INSERT ... VALUES, transform the given list of values to form a
! * targetlist for the INSERT.
*/
! qry->targetList = transformTargetList(pstate, stmt->targetList);
}
/*
--- 657,699 ----
}
else
{
+ ListCell *tlr;
+
/*
* For INSERT ... VALUES, transform the given list of values to form a
! * targetlist for the INSERT. In a multi-targetlist INSERT, append all
! * but the first targetlist to extras_after to be processed later by
! * do_parse_analyze
*/
! qry->targetList = NIL;
! foreach(tlr, stmt->targetList)
! {
! List *tgtlist = (List *) lfirst(tlr);
!
! if (qry->targetList == NIL)
! {
! /* transform the first targetlist */
! qry->targetList = transformTargetList(pstate, tgtlist);
! }
! else
! {
! /*
! * Create an InsertStmt node for each additional targetlist
! * and append to extras_after
! */
! InsertStmt *insnode = makeNode(InsertStmt);
!
! insnode->cols = NIL;
! insnode->targetList = list_make1(tgtlist);
! insnode->selectStmt = NULL;
! insnode->relation = stmt->relation;
!
! if (*extras_after == NIL)
! *extras_after = list_make1(insnode);
! else
! *extras_after = lappend(*extras_after, insnode);
! }
! }
}
/*
Index: src/backend/parser/gram.y
===================================================================
RCS file: /cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.551
diff -c -r2.551 gram.y
*** src/backend/parser/gram.y 3 Jul 2006 22:45:39 -0000 2.551
--- src/backend/parser/gram.y 19 Jul 2006 03:53:40 -0000
***************
*** 238,247 ****
qualified_name_list any_name any_name_list
any_operator expr_list attrs
target_list update_target_list insert_column_list
! insert_target_list def_list indirection opt_indirection
! group_clause TriggerFuncArgs select_limit
! opt_select_limit opclass_item_list
! transaction_mode_list_or_empty
TableFuncElementList
prep_type_clause prep_type_list
execute_param_clause using_clause
--- 238,247 ----
qualified_name_list any_name any_name_list
any_operator expr_list attrs
target_list update_target_list insert_column_list
! insert_target_els insert_target_list insert_target_lists
! def_list indirection opt_indirection group_clause
! TriggerFuncArgs select_limit opt_select_limit
! opclass_item_list transaction_mode_list_or_empty
TableFuncElementList
prep_type_clause prep_type_list
execute_param_clause using_clause
***************
*** 5349,5359 ****
;
insert_rest:
! VALUES '(' insert_target_list ')'
{
$$ = makeNode(InsertStmt);
$$->cols = NIL;
! $$->targetList = $3;
$$->selectStmt = NULL;
}
| DEFAULT VALUES
--- 5349,5359 ----
;
insert_rest:
! VALUES insert_target_lists
{
$$ = makeNode(InsertStmt);
$$->cols = NIL;
! $$->targetList = $2;
$$->selectStmt = NULL;
}
| DEFAULT VALUES
***************
*** 5370,5380 ****
$$->targetList = NIL;
$$->selectStmt = $1;
}
! | '(' insert_column_list ')' VALUES '(' insert_target_list ')'
{
$$ = makeNode(InsertStmt);
$$->cols = $2;
! $$->targetList = $6;
$$->selectStmt = NULL;
}
| '(' insert_column_list ')' SelectStmt
--- 5370,5380 ----
$$->targetList = NIL;
$$->selectStmt = $1;
}
! | '(' insert_column_list ')' VALUES insert_target_lists
{
$$ = makeNode(InsertStmt);
$$->cols = $2;
! $$->targetList = $5;
$$->selectStmt = NULL;
}
| '(' insert_column_list ')' SelectStmt
***************
*** 8189,8197 ****
;
insert_target_list:
! insert_target_el { $$ = list_make1($1); }
! | insert_target_list ',' insert_target_el { $$ = lappend($1, $3); }
;
insert_target_el:
--- 8189,8215 ----
;
+ insert_target_lists:
+ insert_target_list
+ {
+ $$ = list_make1($1);
+ }
+ | insert_target_lists ',' insert_target_list
+ {
+ $$ = lappend($1, $3);
+ }
+ ;
+
insert_target_list:
! '(' insert_target_els ')'
! {
! $$ = $2;
! }
! ;
!
! insert_target_els:
! insert_target_el { $$ = list_make1($1); }
! | insert_target_els ',' insert_target_el { $$ = lappend($1, $3); }
;
insert_target_el:
Joe Conway wrote:
Tom Lane wrote:
Christopher Kings-Lynne <chris.kings-lynne@calorieking.com> writes:
Strange. Last time I checked I thought MySQL dump used 'multivalue
lists in inserts' for dumps, for the same reason that we use COPYI think Andrew identified the critical point upthread: they don't try
to put an unlimited number of rows into one INSERT, only a megabyte
or so's worth. Typical klugy-but-effective mysql design approach ...OK, so given that we don't need to be able to do 1 million
multi-targetlist insert statements, here is rev 2 of the patch.
I did some testing today against mysql and found that it will easily
absorb insert statements with 1 million targetlists provided you set
max_allowed_packet high enough for the server. It peaked out at about
600MB, compared to my test similar last night where it was using about
3.8 GB when I killed it.
So the question is, do we care?
If we do, I'll start looking for a new rev 3 strategy (ideas/pointers
etc very welcome). If not, I'll start working on docs and regression test.
Thanks,
Joe
Joe Conway <mail@joeconway.com> writes:
I did some testing today against mysql and found that it will easily
absorb insert statements with 1 million targetlists provided you set
max_allowed_packet high enough for the server. It peaked out at about
600MB, compared to my test similar last night where it was using about
3.8 GB when I killed it.
So the question is, do we care?
What's the performance like relative to mysql? It seems hard to believe
that we can afford the overhead of a separate INSERT statement per row
(duplicating all the work of parse analysis, rewrite, planning, executor
start/stop) ... at least not without looking mighty bad.
regards, tom lane
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I did some testing today against mysql and found that it will easily
absorb insert statements with 1 million targetlists provided you set
max_allowed_packet high enough for the server. It peaked out at about
600MB, compared to my test similar last night where it was using about
3.8 GB when I killed it.So the question is, do we care?
What's the performance like relative to mysql? It seems hard to believe
that we can afford the overhead of a separate INSERT statement per row
(duplicating all the work of parse analysis, rewrite, planning, executor
start/stop) ... at least not without looking mighty bad.
I don't have the exact numbers handy, but not too great.
As I recall, with last night's patch we did 100K inserts in about 4
seconds, and today mysql did 100K in about 1 second. We never finished
the 1 million insert test due to swapping (I killed it after quite a
while), and mysql did 1 million in about 18 seconds (we did 300K in 13
seconds). The hardware was not identical between last night's test and
today's on mysql, but very similar (similar CPUs and memory, although
the machine I did the mysql tests on had scsi drives, while the pg test
was done on sata).
The difficulty is finding a way to avoid all that extra work without a
very ugly special case kludge just for inserts. I've been banging my
head on that on-and-off for a few days now, and every idea looks uglier
than the last. One suggestion I got off list was to figure out a way to
build a tuplestore and use it to feed the executor. That's starting to
sound better and better to me.
Any ideas or guidance would be greatly appreciated.
Joe
Joe Conway <mail@joeconway.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
Tom Lane wrote:
Joe Conway <mail@joeconway.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
I was actually just looking at that and ended up thinking that it might
be better to deal with it one level down in ExecProject (because it is
already passing targetlists directly to ExecTargetList).
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.
There are certainly many places to be looked at if Query.targetList
becomes a list-of-targetlists (about 153 if I grep'd correctly).
[ 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.
OK. You've given me a good bit to think about -- thanks!
Joe
Joe Conway <mail@joeconway.com> writes:
Tom Lane wrote:
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
I was actually just looking at that and ended up thinking that it might
be better to deal with it one level down in ExecProject (because it is
already passing targetlists directly to ExecTargetList).
I'd vote against that, because (a) ExecProject is used by all executor
node types, and we shouldn't add overhead to all of them for the benefit
of one; (b) ExecProject doesn't actually have any internal state at the
moment. To keep track of which targetlist to evaluate next, it would
not only need some internal state, it would have to be told the current
"es_direction". This stuff fits much better at the exec node level ---
again, I'd suggest looking at Append for a comparison.
But really the executor part of this is not the hard part; what we need
to think about first is what's the impact on the Query datastructure
that the parser/rewriter/planner use.
I'm still liking the idea of pushing multi-values into a jointree node
type. Basically this would suggest representing "VALUES ..." as if it
were "SELECT * FROM VALUES ..." (which I believe is actually legal
syntax per spec) --- in the general case you'd need to have a Query node
that has a trivial "col1, col2, col3, ..." targetlist and then the
multiple values lists are in some kind of jointree entry. But possibly
this could be short-circuited somehow, at least for INSERT.
BTW, I noticed an interesting property of historical Postgres behavior:
you can put a table reference into a VALUES targetlist.
regression=# create table foo (like tenk1);
CREATE TABLE
regression=# insert into foo values (tenk1.*);
ERROR: missing FROM-clause entry for table "tenk1"
LINE 1: insert into foo values (tenk1.*);
^
regression=# set add_missing_from to 1;
SET
regression=# insert into foo values (tenk1.*);
NOTICE: adding missing FROM-clause entry for table "tenk1"
LINE 1: insert into foo values (tenk1.*);
^
INSERT 0 10000
regression=#
So that last is really exactly equivalent to
insert into foo select * from tenk1;
I do not feel a need to support this sort of thing when there are
multiple VALUES targetlists, but it'd be nice not to break it for the
single-targetlist case. At least not till we're ready to disable
add_missing_from entirely.
regards, tom lane
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I was actually just looking at that and ended up thinking that it might
be better to deal with it one level down in ExecProject (because it is
already passing targetlists directly to ExecTargetList).I'd vote against that, because (a) ExecProject is used by all executor
node types, and we shouldn't add overhead to all of them for the benefit
of one; (b) ExecProject doesn't actually have any internal state at the
moment. To keep track of which targetlist to evaluate next, it would
not only need some internal state, it would have to be told the current
"es_direction". This stuff fits much better at the exec node level ---
again, I'd suggest looking at Append for a comparison.
OK.
But really the executor part of this is not the hard part; what we need
to think about first is what's the impact on the Query datastructure
that the parser/rewriter/planner use.
After a quick look, I think changing Query.targetList is too big an
impact, and probably unneeded given your suggestion below.
One of the problems with the current code is that the targetList in the
"VALUES..." case is being used for two purposes -- 1) to define the
column types, and 2) to hold the actual data. By putting the data into a
new node type, I think the targetList reverts to being just a list of
datatypes as it is with INSERT ... SELECT ...
I'm still liking the idea of pushing multi-values into a jointree node
type. Basically this would suggest representing "VALUES ..." as if it
were "SELECT * FROM VALUES ..." (which I believe is actually legal
syntax per spec) --- in the general case you'd need to have a Query node
that has a trivial "col1, col2, col3, ..." targetlist and then the
multiple values lists are in some kind of jointree entry. But possibly
this could be short-circuited somehow, at least for INSERT.
I'm liking this too. But when you say "jointree node", are you saying to
model the new node type after NestLoop/MergeJoin/HashJoin nodes? These
are referred to as "join nodes" in ExecInitNode. Or as you mentioned a
couple of times, should this look more like an Append node?
Thanks,
Joe
Joe Conway <mail@joeconway.com> writes:
I'm liking this too. But when you say "jointree node", are you saying to
model the new node type after NestLoop/MergeJoin/HashJoin nodes? These
are referred to as "join nodes" in ExecInitNode. Or as you mentioned a
couple of times, should this look more like an Append node?
No, I guess I confused you by talking about the executor representation
at the same time. This is really unrelated to the executor. The join
tree I'm thinking of here is the data structure that dangles off
Query.jointree --- it's a representation of the query's FROM clause,
and (at present) can contain RangeTblRef, FromExpr, and JoinExpr nodes.
See the last hundred or so lines of primnodes.h for some details.
The jointree is used by the planner to compute the plan node tree that
the executor will run, but it's not the same thing.
There are basically two ways you could go about this:
1. Make a new jointree leaf node type to represent a VALUES construct,
and dangle the list of lists of expressions off that.
2. Make a new RangeTblEntry type to represent a VALUES construct, and
just put a RangeTblRef to it into the jointree. The expressions
dangle off the RangeTblEntry.
Offhand I'm not certain which of these would be cleanest. The second
way has some similarities to the way we handle set operation trees
(UNION et al), so it might be worth looking at that stuff. However,
being a RangeTblEntry has a lot of baggage (eg, various routines expect
to find an RTE alias, column names, column types, etc) and maybe we
don't need all that for VALUES.
One advantage of the first way is that you could use the same node
type for the "raw parser output" delivered by gram.y. This is a bit of
a type cheat, because raw parser output is logically distinct from what
parse analysis produces, but we do it in lots of other places too
(JoinExpr for instance is used that way). You should in any case have a
clear idea of the difference between the raw and analyzed parser
representations --- for instance, the raw form won't contain any
datatype info, whereas the analyzed form must. This might or might not
need to be visible directly in the VALUES node --- it might be that you
can rely on the datatype info embedded in the analyzed expressions.
regards, tom lane
Tom Lane wrote:
No, I guess I confused you by talking about the executor representation
at the same time. This is really unrelated to the executor. The join
tree I'm thinking of here is the data structure that dangles off
Query.jointree --- it's a representation of the query's FROM clause,
and (at present) can contain RangeTblRef, FromExpr, and JoinExpr nodes.
See the last hundred or so lines of primnodes.h for some details.
The jointree is used by the planner to compute the plan node tree that
the executor will run, but it's not the same thing.
Ah, that helps. Thanks for the explanation. I'll start digging in again...
Thanks,
Joe
On Thu, Jul 20, 2006 at 08:46:13PM -0400, Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I'm liking this too. But when you say "jointree node", are you saying to
model the new node type after NestLoop/MergeJoin/HashJoin nodes? These
are referred to as "join nodes" in ExecInitNode. Or as you mentioned a
couple of times, should this look more like an Append node?No, I guess I confused you by talking about the executor representation
at the same time. This is really unrelated to the executor. The join
tree I'm thinking of here is the data structure that dangles off
Query.jointree --- it's a representation of the query's FROM clause,
and (at present) can contain RangeTblRef, FromExpr, and JoinExpr nodes.
See the last hundred or so lines of primnodes.h for some details.
The jointree is used by the planner to compute the plan node tree that
the executor will run, but it's not the same thing.There are basically two ways you could go about this:
1. Make a new jointree leaf node type to represent a VALUES construct,
and dangle the list of lists of expressions off that.
2. Make a new RangeTblEntry type to represent a VALUES construct, and
just put a RangeTblRef to it into the jointree. The expressions
dangle off the RangeTblEntry.Offhand I'm not certain which of these would be cleanest. The second
way has some similarities to the way we handle set operation trees
(UNION et al), so it might be worth looking at that stuff. However,
being a RangeTblEntry has a lot of baggage (eg, various routines expect
to find an RTE alias, column names, column types, etc) and maybe we
don't need all that for VALUES.
I misread that to include SRFs, but it got me thinking... another
possibility would be to changes VALUES() so that it was treated as a
function, and allow it to have an arbitrary number of parameters. That
would automatically allow the case of SELECT * FROM VALUES(...). INSERT
would need to learn how to accept SRFs, but that would have the nice
side-effect of allowing INSERT INTO table set_returning_function();
Of course, adding the ability for functions to have an arbitrary
argument list could well be more complex than any of the options
discussed thusfar... though it would be a very handy feature to have.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I'm liking this too. But when you say "jointree node", are you saying to
model the new node type after NestLoop/MergeJoin/HashJoin nodes? These
are referred to as "join nodes" in ExecInitNode. Or as you mentioned a
couple of times, should this look more like an Append node?No, I guess I confused you by talking about the executor representation
at the same time. This is really unrelated to the executor. The join
tree I'm thinking of here is the data structure that dangles off
Query.jointree --- it's a representation of the query's FROM clause,
and (at present) can contain RangeTblRef, FromExpr, and JoinExpr nodes.
See the last hundred or so lines of primnodes.h for some details.
The jointree is used by the planner to compute the plan node tree that
the executor will run, but it's not the same thing.There are basically two ways you could go about this:
1. Make a new jointree leaf node type to represent a VALUES construct,
and dangle the list of lists of expressions off that.
2. Make a new RangeTblEntry type to represent a VALUES construct, and
just put a RangeTblRef to it into the jointree. The expressions
dangle off the RangeTblEntry.Offhand I'm not certain which of these would be cleanest. The second
way has some similarities to the way we handle set operation trees
(UNION et al), so it might be worth looking at that stuff. However,
being a RangeTblEntry has a lot of baggage (eg, various routines expect
to find an RTE alias, column names, column types, etc) and maybe we
don't need all that for VALUES.
Since the feature freeze is only about a week off, I wanted to post this
patch even though it is not yet ready to be applied.
Executive summary:
==================
1. The patch is now large and invasive based on adding new node
types and associated infrastructure. I modelled the nodes largely
on RangeFunction and FunctionScan.
2. Performance is close enough to mysql to not be a big issue (I think,
more data below) as long as the machine does not get into a memory
swapping regime. Memory usage is now better, but not as good as
mysql.
3. I specifically coded with the intent of preserving current insert
statement behavior and code paths for current functionality. So there
*should* be no performance degradation or subtle semantics changes
for "INSERT DEFAULT VALUES", "INSERT ... VALUES (with one target
list)", "INSERT ... SELECT ...". Even Tom's recently discovered
"insert into foo values (tenk1.*)" still works ;-)
Performance:
============
On my development machine (dual core amd64, 2GB RAM) I get the following
results using the php script posted earlier:
Postgres:
---------
$loopcount = 100000;
multi-INSERT-at-once Elapsed time is 1 second
$loopcount = 300000;
multi-INSERT-at-once Elapsed time is 5 seconds
$loopcount = 500000;
multi-INSERT-at-once Elapsed time is 9 seconds
$loopcount = 800000;
multi-INSERT-at-once Elapsed time is 14 seconds
$loopcount = 900000;
multi-INSERT-at-once Elapsed time is 17 seconds
$loopcount = 1000000;
multi-INSERT-at-once Elapsed time is 42 seconds
$loopcount = 2000000;
killed after 5 minutes due to swapping
MySQL:
------
$loopcount = 100000;
multi-INSERT-at-once Elapsed time is 2 seconds
$loopcount = 300000;
INSERT failed:Got a packet bigger than 'max_allowed_packet' bytes
changed max_allowed_packet=64M
multi-INSERT-at-once Elapsed time is 5 seconds
$loopcount = 500000;
multi-INSERT-at-once Elapsed time is 8 seconds
$loopcount = 800000;
multi-INSERT-at-once Elapsed time is 13 seconds
$loopcount = 900000;
multi-INSERT-at-once Elapsed time is 15 seconds
$loopcount = 1000000;
multi-INSERT-at-once Elapsed time is 17 seconds
$loopcount = 2000000;
multi-INSERT-at-once Elapsed time is 36 seconds
$loopcount = 3000000;
multi-INSERT-at-once Elapsed time is 54 seconds
$loopcount = 4000000;
multi-INSERT-at-once Elapsed time is 134 seconds
<table value constructor>:
==========================
Included in this patch is support for <table value constructor> in the
FROM clause, e.g.:
regression=# select * from {values (1,array[1,2]),(2,array[3,4])};
?column? | array
----------+-------
1 | {1,2}
2 | {3,4}
(2 rows)
The strange syntax is a temporary hack to eliminate shift/reduce
conflicts. I'm not entirely sure we want to try to support this (or
something like it) for 8.2, but much of what is needed is now readily
available. More on known issues next.
Known Issues:
=============
General:
--------
1. Several comments in the patch are marked "FIXME". These are areas
where I was uncertain what was the "right thing to do". Any advice
on these specific spots would be very much appreciated.
2. I broke the rules regression test -- still need to look at what I
did to mess that up. Somewhere in the reconstruction of "VALUES ..."
according to the diff.
VALUES multi-targetlist INSERTS:
--------------------------------
3. Not yet quite sure how to get DEFAULT to work for "INSERT ...
multi-values". As noted above, works fine if there is only
one targetlist.
<table value constructor>:
--------------------------
4. I'm getting shift/reduce conflicts that are not easily eliminated.
Making VALUES fully reserved only made it 1 shift/reduce conflict.
5. Column aliases are still not working correctly. Haven't really looked
closely at this yet.
6. Data types are being deduced currently based on the first row,
and not currently getting checked on subsequent rows. So it is
easy to induce a crash:
regression=# select * from {values (1,array[1,2]),(2,3)};
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
7. In general, <table value constructor> in the FROM clause needs
more discussion -- among other things, how should we determine and
enforce column types? I think this could be a very useful feature,
but I'm not comfortable I understand it yet.
=================
As usual, review, advise, comments, flames, etc. requested
Joe
Attachments:
multi-insert-r6a.diff.gzapplication/x-gzip; name=multi-insert-r6a.diff.gzDownload
�=9�D multi-insert-r6a.diff �<ks�����_��L[��m��pn�q�������t���"a�
E2$�����~w�"H���4�����c��b�O`�I��{s�K�`�~���H��8 ��^��y�{����G6.��h��q�'Gq@?�W��^�E��^@Sx���������rFt����y�$�^z������n�>�h���6�oH��a{�? ��k����I�����{g�a�/��8�����}���Gd�?�����@
H��w�}��� �#�v��e;}��&D!�\O;O�P?����$.��b��Y�}&|��3��}�d�=�^N���t������b_4o�m�WG�y=�'^|W,��EB��,hF$[{r���a��[E�~
{�h��d��� �K#/����4p�J�=�T��IIqCx�M�3V�������H�qAJ\]nx�&5l�/g�V�_�</@��������9��};7�Jj$@pC�lW ���6�
�x��W�,��:v��/��6Mx8Z��]Nx8�X�I��&��*)�,�,���f���;/@��Ak�����nW �Cg^�N��
d�K`����4����� �.����s/����h��2`�Y1����X���'���;/���G��4{�eh�n��M;Dh�A��� a�CN`}=r�W
iP��q����a���5{���J<l
M~j#�
�hZ|s_'���,��t|�o��k.���UE� ���"����Z�v*j$<B\������j���F19ck���b<r{��6����+UV����V4�ktT��E�}�"y?CI��[yQEo��i)��|F�����uk0�*�x���h����o�n5�N�b���*j�v�t����4C����������>@�[�&����q������Oa���R/e�\�5���Z�����M ����rP�%i��#�n�^tB�"J�T��r��:�9h�x !]o�<��\��T�H29�*A��q�e��Y�J������J@B}4j.�@<9�P����f����n���E�������.��Ei�Jg�_�Dm��T|�UZg����e�5��&�V�4�&3�1)�m5Jj��`t��c i��ck�y4|H���H=�f%��,�b�}�\�uc�,����!z������m���``aP�d����jN�T�s�~�����E�a��e�ka6����Z�`���mu"&�#����lWbZ=T@�pvA�P���eo�Sw�LLlt������,g�ka�k/{{��k��Y�S�[���i����&���������3�i�,���TE��/�����V �S���{V�v5�����3iD��4�e0*�B�Z������bRd+�2wb��m#������J��^5�0Q>��� ���|��4(4jr`���m�t�\t��4�g�E�����O��0�=�:>��4�6�R�� ����Y�P��:����H����C9n} X���&7=��{#�����y$Q[��,�2���b��?f�M P�����H��u�?`uA_��_G�M�@� \C�r��t�"��U?����{5T��L�������lLq�\6��m����m�m��z��f���{�O��4f�<��~
���rZ����mZg���0�H�a����()�v&U�s�� ����gq���4�:;�pb��i|9����������o��8��3��S=s�8D�y���cL~jR�� ���J y��� 5�=84c�O^z�j��{z��m��ity����4�(��B�$(n�����C~����O���$"[a~��"����ILa|���7�S��9�����A�$KVE��1�,p�"���@P�F#!�^vC��0/:��l�!��-�������g'�U�#9: ���.�em$�_e����:<��=��emG��G�S��;%�
n_�<��b��^�"�'�n�fI���xdY��D����.WiD�����~�������� A������Y���
DH���n��%�}R�R��>+�c�
�����
f���CE����X�k�L�;��GQI ��I�HVQ@�-%���p��h�!�,��x.���X���0.�Lb��q��*����`O��E!�q�*�&�����!�3��>� �t����=diJ/�18�� ��p�e4.*��c�G+��Q�����~�:�?
�H�8���_\&��)�����4��Tb�d�����-����&�g���&-r�E9��>������X�
���b��lV�4)G�J���<��v4��q��.���)1��)����z���i���~��������a �D�!r".����`u$�y�L�y�� U;�*��R\�S�� e�$�f��q !].�������R,c��w$�
��Bd%_~��1��@�g��H�f?��p19�k>F��iNH =�v��4�"���[
;��H���r<Tb�g���<p����J�%R�\
�PXT0-`~�5�K�4�xNP�g�&K.Ea
����hu��i-W�tU(������C?]��>�����q������.9���em��Af�UO����I�a\
4���_� �h�M��1��z�Is�ym]hFq|gz~~z���C���� �O_Ng���W�������������r��[�7��o:��JW�Z R+��W@s'0a`K
���6�]����W�b��kr7N,0� _$$����t
rou�)�M���fQ��Qa�
���P|��K^{�H��}w����"���sV(@<6���-�?�T5�}���h�tA$�_{~�&
��������S�����^����H$P�*�H���A�*��F������a1R<�*t>�������j��.��� �S9�K�X� �O��%T���.U���7}���1$_��]c{{~��� ����5P����Z'�D'��j
��7+|]�� �6Xw*?Y��V!���Zr'2;2CT����Kd�����FW���Q�|I���{��K��N�c����Q�-/n�f~�A�u�(��8�F���XGY��TXD=
�
�����&������.k������L��rm������c�K�Q�YK@�w-f��]juv��{}xz�8u��G���$�O��.]&���gc.���(�:�!T��``/+s��2�_b���s�S��������v��w�3e�s-{�������$�U��Be%�Zc�2�"����j�J��<�8�������pg���,���dK���s!0s���X�kT):�A�`����������3�/'�B�����RW�
f�;L4�$V^�+��~oh��v�������ue�=|����]F�s���[R#I��DM�?�X������pwT=��gR!����!������Q��� ��N��q�u0�-kr�5��mg��bX[��gU��\�����g,|�Ij5Z%^?�<�N(�2��Ft�Q1"��97M��{qy~t������[���nad�nad����k��1����y�$��|�� +����{O���q�}~i�:�3��~�~�u+�O�7X������0P��o�2pzZ
\�*��y+1�1n��q�`�i+�g��y}�#������=�*����M�m����i����C�U�J�����h�>?��q������/+�J�l*S������O�Q\P�_�*��bD��J��jP�����h�� F��^%�����^��aNO�^����R��
��,5�q���?���D��F�J��U�Q?����#x�l�|l�*�d��;g����hh���V�O`�����=Xe�P�Q��&�?�Z��l[��Q�Y
��D�FS7�p�ao�W)c����@�~W�W���#�P����- 5(���:�k��3�`V��@�0�������w�����M�;���8H�C�x��]���X���?�{�k��"�8����)O�z�C�e����5={�`R^��#aVD�������sl�.4T�tq3s�� �x���
���������]Y |��OV}�S9� n�JW"O���f$}��[�M��:.��RO; mR~����g%M��)?Nw�v����u ��B������:s���"�y�D�J�8B3TmX-�c�q�l���f�rD�d�
^� �/�*>}���W��o���M������|�pf�����<lB��?�)����[W6���8�MtQ�\�
��;|� oi�KA.��|����7�\[��y�[97�����O������B�J��^����������D���jK=0Z�s�����2H^ 2�pG����&������6�������B�[�#&).�h(�.�#0�N���Pd�df�e�������������
,Q�x����eW���}}�c��T�U:��O�
r���X����������l�8�J�S��m.���(�P���k��6�I6����~/8��������vK��Cxd�1�
����I��_!<��|X��F~v�_���|yV��}V�3���aL�"\�l/����E��W�V�����l�"X�>"����:[������+$�����
�>c�J2��h,������n�@8�2�-�?���iZ�ia��v��G��^�C�DO|f����g�m�x�)G�������A�M�0<��-�YLi@�E�(�DHy�~�e�\}�����)�xo�T�����`��kys
���{��� ,0�w����G~���+������.��L�J�� �.
��N�/��3�*��;Z�����W��DE�QK2d���6~Z�Q���N�Vk����y��3��~@/�OT
�.�$ �����<8��0�"� #���,y��maP,,�X����L�����������i�@h�V�S5�^�9u�>8��
���6�OA�A_����Q{)P��v ;)�;B�����`I)������6�VG�[K+��A�|a���: ^�)�nb���*x97���H�����]^}p�������
=fIB��V�i��h���1����yLw`��n�1����5��1G������v�E��&�r#�%�J\���jue�)� ���$8<��"��@��5��3�48G����s�w�ku\��xBT���� ���+[��f?]������kI��9S�(�������y�)V�J#�_)�������3c������W`P�����g9� n�$)Z"�����k�q^�]�e�K�+s�����x��� �E=<���/������DM����6�v�������9~^����SY�rm��V �i��22�}���?>+GI��a�(Q�+�n�Q�&�!z���H �X
/jC��������|�����v�����f��?��s�i�,@��=�����@a���\x���p=GU�`�-�u�*/�r}����/|���Z�+��������o��y=:��"d����'S�:5o^��(��6���j�U��Y���O2;z�}����Nm?��P�����Tw~��Ee���8����
*�Z��-a�����H^V� �-9�@���0��� y��0A�7�t���z����e�@p�p�&��h�&��'���i�W�5z��L�K�(�
B:j*���
�r����Se�&���^@`���T�_d���SM ���Y
`�@k��3�K�D>+[�p���?�V9����-2o�"���i�xD5�bi����jC��P���0s��������h���Y���l�^A�� ,�"��#g_)���R~��={���$"XU�ULF��o�J>�V����� N���K�����1�����������
[���*y����9{����y28o�w�U_K��o�����S9c5o>
��s�����h~���A�����lk���.(5�������=D�"'?03��C�r�z
�pd9�W���P���~�GL����k��P�RB�5�%V���0a���<�d�������h@�S�5�&>�m,�V��C��2~U��<�mA���������qf~�B��3�R�(�C:s��#�����b�3y���{�����<�;���-��{~$j#��q������mG~�~E�� Ar$� .)qW�ndJ���� �"b ����:���utw�L� ����=K�LO��uu�+����C��l1�\�]�;���u�������������ss
T��X�25�����w_��i��iwT���86�7��Ms� �B���$��v'��|l��A�R�zc������ �b�%k�F�� Gk�!��}�p�1T�����M�V���,"_�@��V����������!�=
�� ��7(4��4�?�4��5Q���s�N����b`���S_����l�����z�g�i�.yk�����T�w�^���8y��x3K�"1Y9� �^:�9L����%z���83�w���EM!���f��1�
kpD|����h��%�i?f�]�
��:��> �!>6����m��uB"��e�x
�8���������G"����_��z�,�v��?dLB������RP_0��p4�k+J�&`������L��[�{�u�[#p���,j�C��h����.@�yA/�kX ������:�#������7�Wb�`�5�.�$���Xgw7��n�&�T&"J�5���1�����`�Dm��bgPmziJJ��������bn1��j�����A�����!:��5�Z��4����#�L���&=i��"Gg��?J����������o��_|��r�=�K�E�(�o �����%y���i\s�qgm��>?X��Yxjs���D !2py@�X�78� ���C}}9�pG�K�L�nK��-�a��p_�i`X,Y���^[�"�/�`����@�d�Q)��,�V5��b� I��_�sy���UeMdv�9��+r��:���������������}W�����A�'A��D��Qn�[h�m��������������^�j$����Bu�Sm�l��8�B)cm<5Y�dh���Z$y������dM���R��(��]��e.� e_4���"�U����8�� fUr*���� �A�J���S.���k���oq��-��S�6�U���}G^�� �xv�@�"��G��*�{�9�(u�u�[BQ�*m4�����i������ �xgj���P�n�R3�
��vq.�q+E=���I�{
1@��2h�"0?��.�0.Pe���J���T�����S���@��`g_(���5�h������<�@�Q(���#�w"Ya�f�+mn;�8��s���
4��Ls�2�%
������U�Y��A������vt���I���z���'Q�/�T.p|#�L6P��|;���`
i�5��8 �B�v�
�vd���t��DRg���.���Y������;�{��z�>����P-����c�[��o��\�-r_��\�W@���\tN��{te�
�z/\E������ P����d��d������������?dXAk����dKI��r������R�S�r+���F��XQq��$h����5l�O<^��%����V*�-�Y��[d�{�#����-$`�����0���~�Mv����������4z
�Q]V�ngu�]Y��y���p;Y�l
{A�I�{hJ[��[����8L�X|�
y��P~>c�1��8�������|�p�����P���<���o� ��d}�+ l�:|��?�xuzu�4�� Y�����Y����)��L#����]��r
��@��m+1�-���M�- �t�M��������#(�VQ�]���p����:�M�T���d5c�&��iv���W�bM�����q��K���t���p�=���+�E�Q���[y�i8�!�T�/������xQz����=�8�8����d�f Y�����*�����vc�%p?����i
s(:fN�Ksq;8�-5�R ��8����61�X�����u����j����������on3 o?���=O~o��z#i�Ix�� ]�@���Vs�����Ih�����5��S��I�D]��Kih�1�%�
UN�rj�Lf[������i���%/G��X_���t�z
Eo��"�?�B�j������Z����t��4MRk\)xV��6���Vk ���]6�t��o���&
���*�����0)7�-��6�?����
���<�ZNm�:��A�<$]������������ ���9V���T��@���$M'w�T��9���(�\���>��D�aZ�M4*����;����\�Wc�@������R����&�n��%;�F^��6%�X��^� v��<>�@s��8'o��g���}�h���5Z��
-��[<��n��2�]<����������Q����S��}� ?�9zp�����Q���m�n�ku��?�)|G�������Q���u���q�o��( ��>�B6��/�6d�������r�0�����`��1!�z2
�.~;�X�Y�2�) �*q�I
Z������p�D�z�����>�W$������������5g�[����<��xZP����'��;�������-��e?+6�rG�-mT�i�l��b /�{?�f����.��b��c���~ ��$tDG$%��I/�����Z�V]���45�3A�A����s�7��&�H�R�<V�T'6 �(p�&n9,�
��i��Y�fZ�`b�����z~�-��nR�����
&���cGG67���8X1�w7rAp��z��6;e��s����Qr�������K��������tu������J+#B�5�� {u������xIfl����@����a��|b{�����O �q����&�^�B��G�l���j�������%x�����y���l�����^�B`��*h�6����2%�7I\i�3����Xb�-�e,�K�>"�i��n@��G+������&�, -��z������ZS�6�5P5��X$�tSh�
x�ft>2����R��d6�=�1��kn2;O6]^���T@�.4��J{S6��7B��M�9��F��#:�G�DxfKMML�K���X�����0�Sl]���9H����R�A�cH���8�������{���i��"U��|�^xL,������D�����
Z=�w)�|� �}�w���>�h�Ql��C�)�����.q�#Vp
��I���X%�����U��B<0S��4&��VK�zfb�
a����?�Y��7�d�4�" ���5p�x�g�.��C��w7-Zzxs��&�zFf���y�$��[�Y����B����B��������1�����Ge�3�(�����o�[�&�@�z�<U�=��J�2q�R�HK�����]q���e�>���&c�%�@�t�O����4����&ME-����1�I� �o��nBo��x�q��x���7�t��(���:[�E�?��aH���KH����'*�������>{y����eq�Y!�����������m'���?�B����/����N *(��$��I$�NwG"POlo5t�s��v:����T����FY(�#y
���y �.�'3��-�F ��R{I���y������G��Ra|�=��>�1t�����<�z ?�D*3�]O�N���H~�3������9������]$������}��iC�d���f����+��T���T?�}uzu���_N/�L=z?��s`1���I��F�WK�����O]M�Vp\X�Y�w�3���_J����$<����>�C:Y>����I4l�MR�i�'}@����V\#�����i����Q�;�:'q� '�����1P V��������<s�i�����\ �&D��9���|D�1���e��f��V����R���D���5���,�*�����~�~���py��Z��h��|������y/���85���K}���8I��r�������A]Q�j_;�A��p�L�=p��h��,MKL��?(�wP����zb�X�U����.?���]v[�}6E�n��>��/�����s��v[��A��������{�5����E:����5l:&h[�v�B�c
#nG��]�n��O�~�#�k�� &Fn��[k���wi���P_�?_B�����5����b����^/�I��� �'�!!T<�o!�'�����?�[A���bV��*@�x&�����������@���l^�W��3���>���7���s��w���U��R-��\j�<}���?mq�}������*��yU�����$��{/?������m�~�=�W��w�c�F�K|I0~n����\�C}��#�B�Z�m.=�s�k�����<�_��SXw1�
�>�J����SyV!K
��84��y���.���/>����������2k���~��������Q��`p"��GG���H��\w���Re����M�%��9�� a��zO�5S�-���q~�������u2��lg�s���%5KV9$���t|����r >�d���^���sf���>��,=vK|�����b������B���n~�>|�,u ���H�� b��k�o�����Q��b�;1�R
er�*rw��oktm�e9N�x�bG���_}+@�c�M6�S�Ng������Y�����g
�wM�����/���
88�h�z�L�����B����5�����N���0�
s��jK�P���/�M�~���?�G��6����V���LJu��,H�D���1�����^�B�@��x����%�����a����A�.��<�%B�\+oAW]����q�;��%��O�k������t�
'��Q_���
�����$��,Xfg�&��fjb�x���� 9��BeFJ��,I�J,D-eO��u�Cw0�&k��,����z2��G�������?MD7�xe5���)�Ssp\>9<��+�K���[��-_3e���\��b�zia)D0����9}
t�
��O���(wV��g�h�x�����Q��5�h�RI�2���5f�q~�^1*���')&�X��/�����[�p��] F�L��TU��FS<�p5?.����BLp�'���Q�Mrw��_�������k���|X��[�#Nf���(��������I|�c(����~c+s�n��F\^_�A���_F�H�wh����=m4_&K�����!��M-�Sy�%t�n�O�~�l>���������:��<DCo�'����a������/��S�G��!��?��k@@�p�7)��&��2����V�^�^�]��n��x��4�X��-ha�8f�)d��)�n��-c�H��?L���p�/0K��~�F���|��W&P�d���[&�c��
aJ�,�/hK���Z95~����?\�/��?�<�xy��g����\���i���l4�9��(!��4L���{y[B�W�l�X$�j��C�a�����t,IKC�jsdP�-Q���k�F���EN�Y��!�Kxpj��V�����L2�4��e�%���P����s��|�������
����4������7���p�9�mX��������v�W[z _@sP��J���\��qa_�U!C'�����G�aP-8k�����9��@o��Yy���"�/s��gp�_�JkC�r��|�'kp];g�?�CAQ�lM��g����N�����+��k\��;���������%|�c��`��7������-���6S�T���W��6��s��0�XpI�1���HD��a�'0��2q�6c�%Z?����B�z�b�S��km�&d��8������ih���O��r�G'e�/M�����0o�[���P\��|s����+��s����)�1�'�j�/����X���,!���o8��0��$'���@��W����i��X����Sx��]xP��L@�^�pwo�m}��:n5 |
V�������� ���m��u��b���r]4R���y6F'�ht"|!�A���V$���Z���C��,X������u�(@��*F�4x���L�/
�)2������$�h5!��4^�\U�4����|Yk��j�}V�
H���H@�X=fE�OM����t��wT�!�>"aBk�J���_��+_%���l���Vv���
������:L.�Pezg�E]|a�
�o�8�j{��4-X$C�B��?Q�=:�<W��A7�b!�`U��J�Il��kPa�+T�7�lO�q��a}����SZ���P�5�����{��;��l ���������d�4�=>��?��5&��v����N9�z���7��e\� u)���}���fm� O
��CXc�"��lvM��Imt�(M:�����sp���������|��n���X�8�a��
�|b�3����C��<!Y�CW�KQ���n��G��l�a;Yq�G�{�[%mth�FB�,?�'��4Y�s ��)�B��X ��xVi�r��\����-���upcC7��=����9f��������2���<�goc�����+��i��>G%��i��JA��\����XV�qI�$4�Iu+�,����ZA�G�N�|l�M�S�� �]���(����V�����C���2x�"2.� -T
�`�'
8(� A����F�����nE�n����q?�x�P�(����-5��5�yz�S�\Z��K�^�����Y�X�'1�F�*��F�c5v`Zr2��.x�����$>��A�W�#v���t=������&�X���7�p���Q��F�#x�5,��(1�m��L]�����Tj2�J�$2��Zi-C�[I�0�33�S6��fV5.)�`9W��+����W���B��5��'����?�����i���^������@�� .�sHU�J���f�/���l�E<~G�k�����D�j$�x�����v/L�P��4�3dx���\3������ �V=��|94p���,������3�0u;��Q���(�����c1�n0�$��*�M��
�=��� ��L*.���:��@,�5�z5I+gY����N��_�6Ca�������F���o�:����kMP������ e���������,(Az����={y~��2�j�f�����d�0�3-���VZ<������B�(�D
��0l�%��������SW� �k5�(�bK��`��t�I����S�{��\����� �#[�S���:��lR����u�5Q�\B]g�w��*���'y�,)�`# ���F+�h q�,�I�~2�����|���~����D��9{6�����"�__����n���m:C%�]$C��Cd����C�P�� ���u�Z��{��~ �����Z/=�C����:� 9�t<��)�:���$�c����k�`�j;7MH]m4ezgS�� �����=�4�Y����N��5��rP)����f1��R}u��:�W���U ����������"��=li�~�������~$�U~�����6i
��Y����(j�6��������=�/�IZ����������������+�I�'��&�cJ3���|'l�~�*��z�uuZ�At��b&l]������y�t��U>i9b$�ec���e�h�=E��� �@Y����@�k2br� Dp7"����O�PM��_���,�E��|
Z#r�LOgm{J4� ��'�'�`j:\s���Z>r �������Uo�(S@�Qf�����N:\Y/�]�g�MBi/��{x�|��u�����"-� 'a#
�VH��V����{?^~�c�%g����4��)��.���%����m���.L(T�����������:�xuvq5~w�*R�'&��b�U��O]]�H������>�v�v��1�������)6�����;�+��s����9���m��r�n���-�������<�!�D�~�u�Wg$��������VA5������ ,"Vj��?��Bv�i��N�+���F�Q�+�nZ�9�����'J���#�>����3����]��T��q"�t[��� �(�V8���4���=�3JS���Oo���Z3x������5Pb�FY�����kse]�N���.[���uPT����`���`Ppc���F����0���1X��x�:f��]��:v�?��tE�Z��@�$���^�x!8z�:\����*�z\�I�Y��R��x5�7KC��A��wH"�C���~\�7R[��:l����bA�_%�X2���o91
L�|5���e���PL�x���<?(�"~�����)
�W8��r���zn�E��v����y{�C��b���B�F��������6R��A�J�*�/� ��7���I=�M\�D[�#��W�H�I���MF�9X����(a���?�
XT����r >���)��@�����'��C���/�����q-�N�����0�����}����Z�5+ZF
��#4`3���5�
���e/��B��|�
7��P\M>0����@��}*�[���������������?T�R��3!��@0���T���M[���p6��z�d�I��������_A��I�z'������}gk�_�g�3�2% �#I��S������y�q�u�����FSz�������~4��'��&X�g(��hfi��5�H�6������ah��V7���2�o/:7L8I����>��Y��{QP�<��{��&K�`@?_���*���x| �cT}����@�I�]]��������&>X�I=������c�#���D��8d�``�}��*����d��&���Y���b�9�n��� ��ld���!�J��E��=sA��������Q/y�0j�q��.>� ����mZ�@�o�B�?H�J%iM��&�������<���t���M]\z���L�A/����=�zF���OZ"�,���F��q�f��B�;��������\�U��� w�y�����K��V���|���Z�f$���!~����:���b���rS���9��>w�~C ���H 7��� 3
Z��������x����!������#��#�������������R�Wa��g��W%xt,��x ��X�+��G.!K�j �����m:��xeB]���Ww�x��^@����57t%[������+x�k���&F^�=�
����
��W�����3�k�F��!��_�w�7����� \���#�mzl�Ik(K�WS�JZ������O�W��&E\E� �F�]���|�P����Ve�'�*�>Qr��Zl1���+pTt�'�5J�\�9,N����9�� '��tz����8����DF�l��d��7H����
I�XqZ������F#�9Q���o�2-c���7hmr���`BN��w���@���&5w��"jqg�L��?U�t�%�{M�A�!)�0�;�;��=&a$
I�Y@���A]��/g�g�m�>�L��R��P��m�oz}e���4���:{�=��|���������_aO�H�*��V��Y&:=e&ZI��m-K����~��z���=ib�\�Z�@g.������.9#�I��J��eM�*H?w�6_�W9>9~2�g���F�I�Dc)����?�<�Z����i<������ �"zm�b>������Hx@nB��h�B�v9��8}6M������+Q|��T�S-bx��F�#�z��I�y�o�|P���;���h ~B����� �]�-��F��d�7�]��k����z����= ����� �Q��;'uj���k��b�w��R���2��5�M���H�j��r��������K�1R���7rt��9#:���� 9c)�� ��KQCbp�����������8�4��u�9�2k�a�8�o�s��Og^�u�� ����.�e���z*0f�0���^MMZ>5i)1�j��m�*��";������~�$>�=#��TF��F/���Qd��"D�CW���>��~(�u���]!�rop����I�����L�/d�A��)��"�WL��~�R��2�Wq&V\�
zC�p@��g_�E��`:����L�*&.����k���]H1�y4?������t~l\�x`����T��%=V[W�� �u�'(.V�X�r*���Z�p���an�W�����;����vj��7/l���w����x���%}����7Vqg����`Y=���Y%����3�4/����o��/n���� Joe Conway wrote:
Since the feature freeze is only about a week off, I wanted to post this
patch even though it is not yet ready to be applied.
Sorry -- I just realized that two new files for ValuesScan didn't make
it into the patch posted earlier. Here they are now -- please untar in
your postgres sourcetree root in addition to applying the patch.
(I thought "cvs diff -cN" should have included the new files, since I
had earlier done "cvs add" on them, but it didn't work. I could swear
that worked for me in the past...)
Thanks,
Joe
Attachments:
Joe Conway <mail@joeconway.com> writes:
Tom Lane wrote:
There are basically two ways you could go about this:
1. Make a new jointree leaf node type to represent a VALUES construct,
and dangle the list of lists of expressions off that.
2. Make a new RangeTblEntry type to represent a VALUES construct, and
just put a RangeTblRef to it into the jointree. The expressions
dangle off the RangeTblEntry.
You seem to have done *both*, which is certainly not what I had in mind.
I'd drop the RangeTblEntry changes, I think.
Shoving all the tuples into a tuplestore is not doing anything for you
from a performance point of view. I was thinking more of evaluating the
targetlists on-the-fly. Basically what I foresaw as the executor
mechanism was something like a Result node, except with a list of
targetlists instead of just one, and part of its runtime state would be
an index saying which one to evaluate next. (The update logic for the
index would be just like Append's logic for which subplan to eval next.)
Result as it currently stands is a pretty queer beast because it can
have a child plan or not. I'm tempted to suggest splitting it into
two node types, perhaps call the one with a child "Filter" and reserve
the name "Result" for the one with no child. The reason for doing this
in this context is that we could just make the no-child case be
multi-targetlist-capable (rather than having separate nearly identical
node types with single and multi tlists). AFAICS multi tlists don't
make any sense for the filter-a-child-plan scenario, so that's why I
want to push that case off to a different node type.
regards, tom lane
Tom Lane wrote:
There are basically two ways you could go about this:
1. Make a new jointree leaf node type to represent a VALUES construct,
and dangle the list of lists of expressions off that.
2. Make a new RangeTblEntry type to represent a VALUES construct, and
just put a RangeTblRef to it into the jointree. The expressions
dangle off the RangeTblEntry.You seem to have done *both*, which is certainly not what I had in mind.
I'd drop the RangeTblEntry changes, I think.
Good feedback -- thanks! But without the RTE, how would VALUES in the
FROM clause work? Or should I just drop that part and focus on just the
InsertStmt case?
Joe
Joe Conway <mail@joeconway.com> writes:
Good feedback -- thanks! But without the RTE, how would VALUES in the
FROM clause work?
Is it different from INSERT? I'm just imagining a Values node in
the jointree and nothing in the rangetable.
If I'm reading the spec correctly, VALUES is exactly parallel to SELECT
in the grammar, which means that to use it in FROM you would need
parentheses and an alias:
SELECT ... FROM (SELECT ...) AS foo
SELECT ... FROM (VALUES ...) AS foo
ISTM that this should be represented using an RTE_SUBQUERY node in the
outer query; the alias attaches to that node, not to the VALUES itself.
So I don't think you need that alias field in the jointree entry either.
If we stick with the plan of representing VALUES as if it were SELECT *
FROM (valuesnode), then this approach would make the second query above
have a structure like
Query
.rtable -> RTE_SUBQUERY
.subquery -> Query
.jointree -> Values
(leaving out a ton of detail of course, but those are the key nodes).
To get this to reverse-list in the expected form, we'd need a small
kluge in ruleutils.c that short-circuits the display of "SELECT
... FROM" etc when it sees a Values node at the top of the jointree.
This seems like a fairly small price to pay for keeping Query in
approximately its present form, though.
One thought is that we might allow Query.jointree to point to either
a FromExpr or a Values node, and disallow Values from appearing further
down in the jointree (except perhaps after flattening of subqueries
in the planner). The alternative is that there's a FromExpr atop
the Values node in the jointree even in the simple case; which seems
uglier but it might avoid breaking some code that expects the top level
to always be FromExpr.
regards, tom lane
Tom Lane wrote:
ISTM that this should be represented using an RTE_SUBQUERY node in the
outer query; the alias attaches to that node, not to the VALUES itself.
So I don't think you need that alias field in the jointree entry either.If we stick with the plan of representing VALUES as if it were SELECT *
FROM (valuesnode), then this approach would make the second query above
have a structure likeQuery
.rtable -> RTE_SUBQUERY
.subquery -> Query
.jointree -> Values(leaving out a ton of detail of course, but those are the key nodes).
OK, I'll go try to wrap my mind around that this evening and see where
it takes me.
Thanks,
Joe
Are you going to apply this? Seems it is ready.
---------------------------------------------------------------------------
Joe Conway wrote:
Tom Lane wrote:
Christopher Kings-Lynne <chris.kings-lynne@calorieking.com> writes:
Strange. Last time I checked I thought MySQL dump used 'multivalue
lists in inserts' for dumps, for the same reason that we use COPYI think Andrew identified the critical point upthread: they don't try
to put an unlimited number of rows into one INSERT, only a megabyte
or so's worth. Typical klugy-but-effective mysql design approach ...OK, so given that we don't need to be able to do 1 million
multi-targetlist insert statements, here is rev 2 of the patch.It is just slightly more invasive, but performs *much* better. In fact,
it can handle as many targetlists as you have memory to deal with. It
also deals with DEFAULT values in the targetlist.I've attached a php script that I used to do crude testing. Basically I
tested 3 cases in this order:single-INSERT-multi-statement:
------------------------------
"INSERT INTO foo2a (f1,f2) VALUES (1,2);"
-- repeat statement $loopcount timessingle-INSERT-at-once:
----------------------
"INSERT INTO foo2b (f1,f2) VALUES (1,2);INSERT INTO foo2a (f1,f2)
VALUES (1,2);INSERT INTO foo2a (f1,f2) VALUES (1,2)..."
-- build a single SQL string by looping $loopcount times,
-- and execute it all at oncemulti-INSERT-at-once:
---------------------
"INSERT INTO foo2c (f1,f2) VALUES (1,2),(1,2),(1,2)..."
-- build a single SQL string by looping $loopcount times,
-- and execute it all at onceHere are the results:
$loopcount = 100000;
single-INSERT-multi-statement Elapsed time is 34 seconds
single-INSERT-at-once Elapsed time is 7 seconds
multi-INSERT-at-once Elapsed time is 4 seconds
about 370MB peak memory usage$loopcount = 200000;
single-INSERT-multi-statement Elapsed time is 67 seconds
single-INSERT-at-once Elapsed time is 12 seconds
multi-INSERT-at-once Elapsed time is 9 seconds
about 750MB peak memory usage$loopcount = 300000;
single-INSERT-multi-statement Elapsed time is 101 seconds
single-INSERT-at-once Elapsed time is 18 seconds
multi-INSERT-at-once Elapsed time is 13 seconds
about 1.1GB peak memory usageSomewhere beyond this, my machine goes into swap hell, and I didn't have
the patience to wait for it to complete :-)It would be interesting to see a side-by-side comparison with MySQL
since that seems to be our benchmark on this feature. I'll try to do
that tomorrow if no one beats me to it.There is only one downside to the current approach that I'm aware of.
The command-result tag is only set by the "original" query, meaning that
even if you insert 300,000 rows using this method, the command-result
tag looks like "INSERT 0 1"; e.g.:regression=# create table foo2(f1 int default 42,f2 int default 6);
CREATE TABLE
regression=# insert into foo2 (f1,f2) values
(default,12),(default,10),(115,21);
INSERT 0 1
regression=# select * from foo2;
f1 | f2
-----+----
42 | 12
42 | 10
115 | 21
(3 rows)Any thoughts on how to fix that?
Thanks,
Joe
[ application/x-php is not supported, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian <bruce@momjian.us> writes:
Are you going to apply this? Seems it is ready.
I thought Joe was off in a corner doing a whole new version.
(I'm willing to help if he needs help...)
regards, tom lane
Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
Are you going to apply this? Seems it is ready.
I thought Joe was off in a corner doing a whole new version.
(I'm willing to help if he needs help...)
OK, just checking.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
Are you going to apply this? Seems it is ready.
I thought Joe was off in a corner doing a whole new version.
(I'm willing to help if he needs help...)
Yeah, I was going to post the latest tonight.
I'm afraid though that after 2 or so days heading down the last path you
suggested (namely making a new jointree leaf node) I was having trouble,
and at the same time came to the conclusion that adding a new RTE was
alot cleaner and made more sense to me. So I'm hoping you won't want to
send me back to the drawing board again. I believe I have cleaned up the
things you objected to:
1. Now I'm not doing both alternative -- the targetlists are only
attached to the RTE from the point of parse analysis onward.
2. I've eliminated the tuplestore in favor of runtime evaluation
of the targetlists which are in an array (allowing forward or
backward scanning -- although I haven't tested the latter yet).
I've also solved the INSERT related issues that I had earlier:
1. Fixed the rules regression test -- now all regression tests pass
2. Fixed evaluation of DEFAULT values
3. Improved memory consumption and speed some more -- basically
we are approximately equal to mysql as long as we don't swap,
and we consume about twice the RAM as mysql instead of several
times as much. I have more analysis of memory use I'd also like
to share later.
4. I think the INSERT part of this is ready to go basically, but
I need a bit more time to test corner cases.
I've made some progress on "SELECT ... FROM (VALUES ...) AS ..."
1. No more shift/reduce issues
2. The ValuesScan work and memory improvements mentioned above
applies here too.
3. This part still needs the most work though.
I'll post a patch in a few hours -- there is some debug code in there
currently that I should clean up before I send it to the list.
BTW, I'm reserving Saturday, Sunday, and Monday (taking Monday off from
my day job) to work on outstanding issues. I can continue to work
through the end of next Friday, 4 August. After that I'm heading to
Germany on a business trip and my "spare" time will evaporate for a few
weeks.
Joe
Joe Conway wrote:
Tom Lane wrote:
I thought Joe was off in a corner doing a whole new version.
(I'm willing to help if he needs help...)Yeah, I was going to post the latest tonight.
Sorry for the delay. Ever see the movie "The Money Pit"? This afternoon
I started to think I lived in that house :-(
Anyway, as mentioned below, I think the attached works well for the
"INSERT ... VALUES (...), (...), ..." and related cases. There are still
things wrong that I have not even tried to fix with respect to FROM
clause VALUES lists. Namely column aliases have no effect, and neither
does "ORDER BY" clause (I'm pretty sure addRangeTableEntryForValues
needs work among other places).
From a memory usage standpoint, I got the following using 1,000,000
values targetlists:
sql length = 6000032
NOTICE: enter transformInsertStmt
MessageContext: 478142520 total in 66 blocks; 5750400 free (3 chunks);
472392120 used
NOTICE: enter transformRangeValues
MessageContext: 478142520 total in 66 blocks; 5749480 free (6 chunks);
472393040 used
NOTICE: enter updateTargetListEntry
MessageContext: 629137464 total in 84 blocks; 44742464 free (999991
chunks); 584395000 used
NOTICE: exit transformInsertStmt
MessageContext: 629137464 total in 84 blocks; 44742408 free (999991
chunks); 584395056 used
NOTICE: start ExecInitValuesScan
MessageContext: 1015013432 total in 130 blocks; 6614008 free (8 chunks);
1008399424 used
NOTICE: end ExecInitValuesScan
MessageContext: 1015013432 total in 130 blocks; 6614008 free (8 chunks);
1008399424 used
ExecutorState: 8024632 total in 3 blocks; 21256 free (8 chunks); 8003376
used
This shows original SQL statement is about 6MB, by the time we get to
parse analysis we're at almost 500 MB, and that memory is never
recovered. Transforming from ResTarget to TargetEntry chews up about
100MB. Then between exiting transformInsertStmt and entering
ExecInitValuesScan we double in memory usage to about 1 GB. It isn't
shown here, but we add another 200 MB or so during tuple projection. So
we top out at about 1.2 GB. Note that mysql tops out at about 600 MB for
this same SQL.
I'm not sure what if anything can be done to improve the above -- I'm
open to suggestions.
Please note that this patch requires an initdb, although I have not yet
bothered to bump CATVERSION.
Thanks for help, comments, suggestions, etc...
Joe
Show quoted text
I'm afraid though that after 2 or so days heading down the last path you
suggested (namely making a new jointree leaf node) I was having trouble,
and at the same time came to the conclusion that adding a new RTE was
alot cleaner and made more sense to me. So I'm hoping you won't want to
send me back to the drawing board again. I believe I have cleaned up the
things you objected to:1. Now I'm not doing both alternative -- the targetlists are only
attached to the RTE from the point of parse analysis onward.
2. I've eliminated the tuplestore in favor of runtime evaluation
of the targetlists which are in an array (allowing forward or
backward scanning -- although I haven't tested the latter yet).I've also solved the INSERT related issues that I had earlier:
1. Fixed the rules regression test -- now all regression tests pass
2. Fixed evaluation of DEFAULT values
3. Improved memory consumption and speed some more -- basically
we are approximately equal to mysql as long as we don't swap,
and we consume about twice the RAM as mysql instead of several
times as much. I have more analysis of memory use I'd also like
to share later.
4. I think the INSERT part of this is ready to go basically, but
I need a bit more time to test corner cases.I've made some progress on "SELECT ... FROM (VALUES ...) AS ..."
1. No more shift/reduce issues
2. The ValuesScan work and memory improvements mentioned above
applies here too.
3. This part still needs the most work though.I'll post a patch in a few hours -- there is some debug code in there
currently that I should clean up before I send it to the list.BTW, I'm reserving Saturday, Sunday, and Monday (taking Monday off from
my day job) to work on outstanding issues. I can continue to work
through the end of next Friday, 4 August. After that I'm heading to
Germany on a business trip and my "spare" time will evaporate for a few
weeks.
Attachments:
Tom Lane wrote:
If I'm reading the spec correctly, VALUES is exactly parallel to SELECT
in the grammar, which means that to use it in FROM you would need
parentheses and an alias:SELECT ... FROM (SELECT ...) AS foo
SELECT ... FROM (VALUES ...) AS foo
One of the things I'm struggling with is lack of column aliases. Would
it be reasonable to require something like this?
SELECT ... FROM (VALUES ...) AS foo(col1, col2, ...)
The other issue is how to determine column type. Even better would be to
require (similar to SRF returning record):
SELECT ... FROM (VALUES ...) AS foo(col1 type1, col2 type2, ...)
This would unambiguously identify the column aliases and types. Assuming
we stick with the spec:
SELECT ... FROM (VALUES ...) AS foo
1. How should we assign column names?
values1, values2, ...?
or
col1, col2, ...?
or
???
2. How should we assign datatypes? Use the first "row" and try to coerce
the rest to that type?
Joe
Joe Conway <mail@joeconway.com> writes:
I'm afraid though that after 2 or so days heading down the last path you
suggested (namely making a new jointree leaf node) I was having trouble,
and at the same time came to the conclusion that adding a new RTE was
alot cleaner and made more sense to me. So I'm hoping you won't want to
send me back to the drawing board again. I believe I have cleaned up the
things you objected to:
I was just objecting to having both a new RTE type and a new jointree
node type --- you only need one or the other. Opting for the new RTE
type is fine with me, and it probably is a bit cleaner at the end of
the day.
I still dislike the way you're doing things in the executor though.
I don't see the point of using the execScan.c machinery; most of the
time that'll be useless overhead. As I said before, I think the right
direction here is to split Result into two single-purpose node types
and make the non-filter version capable of taking a list of targetlists.
As far as reducing memory use goes, it seems to me that there's no need
for the individual "targetlists" to have ResTarget/TargetEntry
decoration. For the simple case where the expressions are just Const
nodes, this could save something like a third of the space (there's also
a List node per item, which we can't do much about). I think we'd have
to gin up a fake targetlist to attach to the Plan node, but there'd be
only one.
Since the result-node split is my hot button, I'm willing to volunteer
to make it happen. Do you want to concentrate on the remaining
parser-area issues and leave the executor part to me?
regards, tom lane
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?
SELECT ... FROM (VALUES ...) AS foo(col1, col2, ...)
Requiring column aliases is counter to spec ...
The other issue is how to determine column type. Even better would be to
require (similar to SRF returning record):
SELECT ... FROM (VALUES ...) AS foo(col1 type1, col2 type2, ...)
... and this is even further away from it.
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.
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.
regards, tom lane
Tom Lane wrote:
Joe Conway <mail@joeconway.com> writes:
I'm afraid though that after 2 or so days heading down the last path you
suggested (namely making a new jointree leaf node) I was having trouble,
and at the same time came to the conclusion that adding a new RTE was
alot cleaner and made more sense to me. So I'm hoping you won't want to
send me back to the drawing board again. I believe I have cleaned up the
things you objected to:I was just objecting to having both a new RTE type and a new jointree
node type --- you only need one or the other. Opting for the new RTE
type is fine with me, and it probably is a bit cleaner at the end of
the day.
Great!
I still dislike the way you're doing things in the executor though.
I don't see the point of using the execScan.c machinery; most of the
time that'll be useless overhead. As I said before, I think the right
direction here is to split Result into two single-purpose node types
and make the non-filter version capable of taking a list of targetlists.
OK.
As far as reducing memory use goes, it seems to me that there's no need
for the individual "targetlists" to have ResTarget/TargetEntry
decoration. For the simple case where the expressions are just Const
nodes, this could save something like a third of the space (there's also
a List node per item, which we can't do much about). I think we'd have
to gin up a fake targetlist to attach to the Plan node, but there'd be
only one.
OK, I'll take a look at that (actually I was just in that general
vicinity anyway).
Since the result-node split is my hot button, I'm willing to volunteer
to make it happen. Do you want to concentrate on the remaining
parser-area issues and leave the executor part to me?
Sure, sounds good to me.
Joe
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
Joe Conway <mail@joeconway.com> writes:
Tom Lane wrote:
As for the types, I believe that the spec pretty much dictates that we
apply the same type resolution algorithm as for a UNION.
Where do I find that algorithm -- somewhere in nodeAppend.c?
select_common_type(), in the parser.
regards, tom lane
I wrote:
I still dislike the way you're doing things in the executor though.
I don't see the point of using the execScan.c machinery; most of the
time that'll be useless overhead. As I said before, I think the right
direction here is to split Result into two single-purpose node types
and make the non-filter version capable of taking a list of targetlists.
After more thought I've reconsidered this. The "ValuesScan" node is
still redundant with Result's non-filter case, but we should probably
get rid of the latter not the former. The reason is that in the general
case of VALUES-in-FROM, we do need all the generality of execScan.
Consider
SELECT x,y,x+y
FROM (VALUES (1,2),(3,4),...) AS foo(x,y)
WHERE x < y;
which AFAICS is perfectly legal SQL. We need a qual condition for the
WHERE and a projection step to form the x+y result. We could make a
non-filtering Result clause do all that but it'd really be reinventing
the execScan wheel.
So what I'm currently thinking is
1. Implement ValuesScan.
2. Convert all existing uses of Result without a child node into
ValuesScan.
3. Rename Result to Filter and rip out whatever code is only used for
the no-child-node case.
Steps 2 and 3 are just in the nature of housekeeping and can wait till
after the VALUES feature is in.
As far as avoiding overhead goes, here's what I'm thinking:
* The Values RTE node should contain a list of lists of bare
expressions, without TargetEntry decoration (you probably do not
need ResTarget in the raw parse tree for VALUES, either).
* The ValuesScan plan node will just reference this list-of-lists
(avoiding making a copy). It will need to contain a targetlist
because all plan nodes do, but the base version of that will just
be a trivial "Var 1", "Var 2", etc. (The planner might replace that
with a nontrivial targetlist in cases such as the example above.)
* At runtime, ValuesScan evaluates each sublist of expressions and
stores the results into a virtual tuple slot which is returned as
the "scan tuple" to execScan. If the targetlist is nontrivial then
it is evaluated with this tuple as input. If the targetlist is
a trivial Var list then the existing "physical tuple" optimization
kicks in and execScan will just return the scan tuple unmodified.
So for INSERT ... VALUES, the execScan layer will cost us nothing
in memory space and not much in execution time.
There are still some things I don't like about the way you did
ValuesScan but I'll work on improving that.
regards, tom lane
Tom Lane wrote:
So what I'm currently thinking is
1. Implement ValuesScan.
2. Convert all existing uses of Result without a child node into
ValuesScan.
3. Rename Result to Filter and rip out whatever code is only used for
the no-child-node case.Steps 2 and 3 are just in the nature of housekeeping and can wait till
after the VALUES feature is in.
Sounds good to me.
As far as avoiding overhead goes, here's what I'm thinking:
* The Values RTE node should contain a list of lists of bare
expressions, without TargetEntry decoration (you probably do not
need ResTarget in the raw parse tree for VALUES, either).* The ValuesScan plan node will just reference this list-of-lists
(avoiding making a copy). It will need to contain a targetlist
because all plan nodes do, but the base version of that will just
be a trivial "Var 1", "Var 2", etc. (The planner might replace that
with a nontrivial targetlist in cases such as the example above.)
I'll work on that today.
* At runtime, ValuesScan evaluates each sublist of expressions and
stores the results into a virtual tuple slot which is returned as
the "scan tuple" to execScan. If the targetlist is nontrivial then
it is evaluated with this tuple as input. If the targetlist is
a trivial Var list then the existing "physical tuple" optimization
kicks in and execScan will just return the scan tuple unmodified.
So for INSERT ... VALUES, the execScan layer will cost us nothing
in memory space and not much in execution time.There are still some things I don't like about the way you did
ValuesScan but I'll work on improving that.
OK.
Thanks,
Joe
Tom Lane wrote:
As far as avoiding overhead goes, here's what I'm thinking:
* The Values RTE node should contain a list of lists of bare
expressions, without TargetEntry decoration (you probably do not
need ResTarget in the raw parse tree for VALUES, either).* The ValuesScan plan node will just reference this list-of-lists
(avoiding making a copy). It will need to contain a targetlist
because all plan nodes do, but the base version of that will just
be a trivial "Var 1", "Var 2", etc. (The planner might replace that
with a nontrivial targetlist in cases such as the example above.)
I wanted to post an updated patch even though there are still things not
working again after conversion to bare expressions. Note that I hacked
enough of the executor stuff so I could test my changes on the parser
area. The basic "INSERT ... VALUES (...), (...), ..." does work, but
without DEFAULT again :-(.
The good news is that from a memory and perfomance standpoint, my simple
test now shows us outperforming mysql:
$loopcount = 1000000;
Postgres:
multi-INSERT-at-once Elapsed time is 12 seconds
~420MB
MySQL:
multi-INSERT-at-once Elapsed time is 17 seconds
~600MB
$loopcount = 2000000;
Postgres:
multi-INSERT-at-once Elapsed time is 29 seconds
~730MB
MySQL:
multi-INSERT-at-once Elapsed time is 37 seconds
~1.2GB (this one is from memory -- I didn't write it in my notes)
Joe
Attachments:
multi-insert-r18.diff.gzapplication/x-gzip; name=multi-insert-r18.diff.gzDownload
�iN�D multi-insert-r18.diff �]{s����[���i+���~9'>�:J�;��ZJ�t���� � E*$�����~w�$(�������� .���o �oG�F�������q#��7� �Q�����I������;��Ec�Vn�����w�`�����yr~<aK���1���0L�K�h{�����'������E�'�����[�����\����#��R�wwwoT��e�l|�n6���=��ZCVo�OEP������������54���8��N��fT��EA�����*��s6�����9���UT������Qu+w��������>�KI���{�F=�g<np��Mx��~�wU������
���;�A+p�?r��N:`��>l����o���%�~�#��Bon��j���w��d�j�n�����a_#�{v��5��/��r��|z���$�a��;JfK�����r��j@����(q/|^�R����j�������B�5v�Q�k�y��1��u���)�a�!��FB<���,��g�|:��vt�f<�DU?4��<���z
:>��\���'��v����sp��R���@Q�@`�Z[��a���3=�\�X���� u�k��/���d�>����=t�N���^����u;��%��66<�)Tdy��U�q��6��q�*�^�?:z
�V���|X�;��m
k1���o�0j�t�s4�_���.5��N���;Ls��������#4�=�ntz��6�@9o���i�[#�����O.�O^�r�����d?4
ib�����||�%���BO5�?�,����K.���H��p-[*�4h��V��J.��>���3��+EdF����� ��z+OU���u�X0����\>7So!�%1�p7��5�� ^{�!��������&�O��gB����3�k.������m ?��� G�}����0c��C��[j�t��`h�Z���=�Rg�t
��_�jm����f�����0�W;�
��ok#u���51��(��]���v���Z����u
�9�jI�s������'��H�F��`4'����J��jzZ�N�I��~r����e0� �.��]�}�����Z���u$61��}��1;|q��f�_����a�E�Kz�|���
M����T�&�iX��UV���6
Y
�N;�dU��#
+���J���:���i����8�������2�/����Vtp�r�`�7Q��h�K��9�~�� �0�*c�r�2��
2l�w[�NEs�m��8�<z`��X[�������a"*O�p�^G�;��0�={szZ�aLn�������3��2P
z�l�
X����!m�@@/[�A���M������R���8�H��<(]��b4v������l@ed���f������^��/}�2����!�X�=c����
���^��7=�F
�|���3�4v�_��0�!R�*j�mj�&�i������C����� �/���n����C��:}��5`W���u�d���D���M�L�0������-�c!�]kjK
���?l;�Q+�����t@v�h����u����c����\F��|g�[}�hSi�2B?��O������"�uR�����#c6��(�)a�|.>���E�l���6��0l�<8�_`)~���@S+�R��];dQ�I��T����!3X��v[�.��V�@y-�}}mMq�ra���q��6 �����`�SG`��~1dr�KA�Q�^�8LvY�Y�\�
/��y�O_p�lSYm��z
��n�F�<!����9��D�9���9,�9�*���K�
��$.����a�AQ���p�/��{�����
.0E�Rnb�F�%W�������2���3^���n���Pf�E5� ��s7����BH�z�O�C�#:�~�
S>'|uB�h�A�s�����?jr�6�XS�������|���KBB��}�/���aD2B���_�]H(���+��/i�L���yT'E`+�M��9���!Q.�h�I53_�zf:������~�����=��g�o!t��P#���4C����?w�I�
*�C�OK7 �+������ PHw����)�Z�U��2;\,������R��P �Bz)�mo���_�K2#o=���`��@H+!��\k�Ct�G�Q7��;t������K�]'�������x��m*=���������� �]����$q__7t�C���v�a��Q�X�%���@)� /��
Xe�A�&��Z��9SZF��*����3.Y��H�/| )��(�q��i���n�#��9��A�vW�1��H�+���������c`������7K�x��4�)��"��T�f-352C��DM�����(���O5��V��M����@@"&9����p�~����GU����ZM<����]~��3E��`^L���G^2�������(� ������ (&Z�k���h��dq���F\lY?o/p��O��gi�1`���O���G%�j��f�z�������}�����\�����������q�5���^��T�54Y�y@���.��y����F��t�m�����%
V�8�0~��l�k��:����M����!C,��A�q|�U���k���wP{"<�%NS���^p��������U�5��_G�9������S��^�>{����W<Hmn�F�� ������o�����K�a�� �M94O����'/N���'���t���t�� ��t�k��I�A��b�>`��.����?�|7�����M��/����������xbD�����|�� q��������`����� ���)/��0Z��|>�����{���<��S��S�� �I� >wc"rC�����s �(r/�`���`Q=��j���^�X1���f3�����/�TTcA4��Z�Q���I"^H�Ls��|X����D<40�x��Mq����M���ZK��{�X��?����I��.��b4M��+�� ��c���<P#��xP%�5���J���(��Zd(D�K��R/J���]<678��s/���P��N��*2*:I"�O��BF���`���YF�J�)D��f�L
}52:1 67�x��C��A��~Q@�m��B���D]i!����#%#D�����,��g�ej����V�mY��A�V��66s5�����8�����'r�)�23i'1���n��j1���K�S<�D��[|b����$�<D����C������#G���'�g{-��NNu�D�)e�0=��e���wgG����J�������\9f�D��nR��r\XZL����6��E"��3{�7�@6�eO� i��/��,�s����T�T��"�'z����T��%�����d��:<�U����ZS���C{��n�2���Ll�%6��C�N�����{��������������Xf��5��#��������U��T>^y�+��a,mN�9# h�Y�VN��6�����cn\�QY>c��:������(<�g_&��A��hs���
�2��,0��E�e���;�au�@�?G���k�B3�t�>�5:5V!uD���"���u����NM���F,r)���~S�/�%�����y
@]i� �����/"��
��`
�y�Y�zj�����M�
7����� E�����}�����3���$��n���O�DQ���Ru����/�x��<��i�GM4����,#���<Kr����]��#�����}��?|��Pd?&�Gg���������Cn�� ��7���w��KsZ]���X��<TT�4�:kH=����k+�����=�M���.X`C�����D/��}Y����]z����5�Khg��uht����-3t�����lx�[����1Oo���88b�GU#A_N� X�5c�t���O$7�U���1��<