From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | a couple of ideas |
Date: | 2004-04-19 17:48:21 |
Message-ID: | 408410E5.1010507@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
As I was playing around with prelimiary stuff for regression testing the
CSV patch, I had a couple of ideas I thought I might float.
Context: many of the tests will write a table out and read it back into
a duplicate table and then perform a symmetric difference on the 2
tables. Making the query for this is slightly error prone, so I made two
functions, one to generate the query in text, and the other perform the
query and return a set of records.
Idea 1: an eval facility for psql. e.g.:
\eval symdiffgen('foo','bar')
or
\eval select symdiffgen('foo','bar')
This would be a use of the first query. In effect we'd be providing for
a sort of macro facility.
Idea 2: allow a LIKE clause in the column specs where a function
returning a set of records is called. e.g., instead of
select * from symdiff('foo','bar') as diff(_table_name_ text, d date,
x text);
allow
select * from symdiff('foo','bar') as diff(_table_name_ text, like foo);
There may be good reasons not to do either of these, so I am just
floating them for discussion.
I might also have missed something obvious that would let me do things
easily some other way.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-04-19 18:05:22 | Re: [HACKERS] Remove MySQL Tools from Source? |
Previous Message | Bruce Momjian | 2004-04-19 17:46:38 | Re: [HACKERS] Why is libpgtcl still in CVS? |