Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > Tom Lane írta: >> Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: >>> Yes. Plain SERIALs can be updated with given values >>> whereas IDENTITY columns cannot. >> >> Really? How is pg_dump going to deal with that? > It emits ALTER TABLE ... SET GENE

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: Tom Lane írta: The latter would treat GENERATED BY DEFAULT AS IDENTITY the same as SERIAL. Is there any good reason to distinguish the two? Yes. Plain SERIALs can be updated with given values where

Re: [PATCHES] CREATE TABLE LIKE INCLUDING INDEXES support

2007-04-04 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > Uh, shouldn't CREATE TABLE LIKE INCLUDING CONSTRAINTS already be including > any indexes in the parent table? You could argue it should for unique indexes since our unique indexes are how we implement unique constraints. But I see no particular reason

Re: [PATCHES] CREATE TABLE LIKE INCLUDING INDEXES support

2007-04-04 Thread Bruce Momjian
Uh, shouldn't CREATE TABLE LIKE INCLUDING CONSTRAINTS already be including any indexes in the parent table? --- Trevor Hardcastle wrote: > Greetings all, > > I wrote this patch about a week ago to introduce myself to coding

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Alvaro Herrera
Joshua D. Drake wrote: > Alvaro Herrera wrote: > >ITAGAKI Takahiro wrote: > >>Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >> > >>>Here is the autovacuum patch I am currently working with. This is > >>>basically the same as the previous patch; I have tweaked the database > >>>list management so tha

Re: [PATCHES] pgbench transaction timestamps

2007-04-04 Thread Tatsuo Ishii
> Tatsuo, would you please comment on this patch too? No problem. I will come up with a comment by the end of this week. -- Tatsuo Ishii SRA OSS, Inc. Japan > --- > > Greg Smith wrote: > > This patch changes the way pgbench

Re: [PATCHES] Optimized pgbench for 8.3

2007-04-04 Thread Tatsuo Ishii
> Tatsuo, would you please comment on this patch? Sure. I will come up with a comment by the end of this week. -- Tatsuo Ishii SRA OSS, Inc. Japan > --- > > ITAGAKI Takahiro wrote: > > The attached is a patch to optimize con

Re: [PATCHES] pgbench transaction timestamps

2007-04-04 Thread Bruce Momjian
Tatsuo, would you please comment on this patch too? --- Greg Smith wrote: > This patch changes the way pgbench outputs its latency log files so that > every transaction gets a timestamp and notes which transaction type was

Re: [PATCHES] Optimized pgbench for 8.3

2007-04-04 Thread Bruce Momjian
Tatsuo, would you please comment on this patch? --- ITAGAKI Takahiro wrote: > The attached is a patch to optimize contrib/pgbench using new 8.3 features. > > - Use DROP IF EXISTS to suppress errors for initial loadings. > -

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Joshua D. Drake
Alvaro Herrera wrote: ITAGAKI Takahiro wrote: Alvaro Herrera <[EMAIL PROTECTED]> wrote: Here is the autovacuum patch I am currently working with. This is basically the same as the previous patch; I have tweaked the database list management so that after a change in databases (say a new databa

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Alvaro Herrera
ITAGAKI Takahiro wrote: > Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > Here is the autovacuum patch I am currently working with. This is > > basically the same as the previous patch; I have tweaked the database > > list management so that after a change in databases (say a new database > > is

Re: [PATCHES] [HACKERS] --enable-xml instead of --with-libxml?

2007-04-04 Thread Bruce Momjian
I have applied the following patch which adds documentation and an improved error message for an installation that does not use --with-libxml. --- Nikolay Samokhvalov wrote: > On 4/5/07, Bruce Momjian <[EMAIL PROTECTED]> wro

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread ITAGAKI Takahiro
Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Here is the autovacuum patch I am currently working with. This is > basically the same as the previous patch; I have tweaked the database > list management so that after a change in databases (say a new database > is created or a database is dropped), t

Re: [PATCHES] HOT WIP Patch - version 6.3

2007-04-04 Thread Tatsuo Ishii
> On 4/3/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > > > > Your patch has been added to the PostgreSQL unapplied patches list at: > > > > > Thanks Bruce. I would like to submit atleast one more revision > which would include couple of TODOs mentioned in my last mail. > I would also like to d

Re: [PATCHES] [GENERAL] dropping role w/dependent objects

2007-04-04 Thread Ed L.
On Wednesday April 4 2007 5:37 pm, Bruce Momjian wrote: > > Perhaps this could be added to the TODO list? I won't get > > to it anytime soon. > > Yes. What should the TODO text be? See if the attached patch is acceptable. If not, perhaps the TODO text should be: Enable end user to identify de

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Joshua D. Drake
Alvaro Herrera wrote: Hi, uhmmm patch? Here is the autovacuum patch I am currently working with. This is basically the same as the previous patch; I have tweaked the database list management so that after a change in databases (say a new database is created or a database is dropped), the

Re: [PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Alvaro Herrera
Alvaro Herrera wrote: > Hi, > > Here is the autovacuum patch I am currently working with. Obviously I forgot to attach the patch, sorry. -- Alvaro Herrera Developer, http://www.PostgreSQL.org/ "Para tener más hay que desear menos" Index: src/backend/postmaster/autovacuu

[PATCHES] autovacuum multiworkers, patch 5

2007-04-04 Thread Alvaro Herrera
Hi, Here is the autovacuum patch I am currently working with. This is basically the same as the previous patch; I have tweaked the database list management so that after a change in databases (say a new database is created or a database is dropped), the list is recomputed to account for the chang

Re: [PATCHES] HOT WIP Patch - version 6.3

2007-04-04 Thread Bruce Momjian
Pavan Deolasee wrote: > On 4/3/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > > > > Your patch has been added to the PostgreSQL unapplied patches list at: > > > > > Thanks Bruce. I would like to submit atleast one more revision > which would include couple of TODOs mentioned in my last mail. >

Re: [PATCHES] build/install xml2 when configured with libxml

2007-04-04 Thread Andrew Dunstan
Peter Eisentraut wrote: And if it is, then you have several options: . don't configure with libxml, or . don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or . change the xml2 Makefile Any of these could be worth considering, but it needs

Re: [PATCHES] build/install xml2 when configured with libxml

2007-04-04 Thread Peter Eisentraut
Andrew Dunstan wrote: > Well, how often is libxslt missing when libxml is present, in > practice? A local sample shows a probability of 100%. > And if it is, then you have several options: > . don't configure with libxml, or > . don't build contrib modules from the contrib Makefile (use the > in

Re: [PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for

2007-04-04 Thread Bruce Momjian
Jaime Casanova wrote: > On 4/2/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > > This has been saved for the 8.4 release: > > > >http://momjian.postgresql.org/cgi-bin/pgpatches_hold > > > > mmm... sorry, i have been busy... how many time we have? i can send > something for friday... Ye

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > Tom Lane írta: >>> The latter would treat GENERATED BY DEFAULT AS IDENTITY >>> the same as SERIAL. >> Is there any good reason to distinguish the two? > Yes. Plain SERIALs can be updated with given values > whereas IDENTITY columns cannot. Really?

Re: [PATCHES] build/install xml2 when configured with libxml

2007-04-04 Thread Andrew Dunstan
Peter Eisentraut wrote: Andrew Dunstan wrote: Since contrib/xml2 seems to be staying with us at least for now, this small patch enables it to be built and installed from the contrib Makefile when --with-libxml is given to configure. contrib/xml2 also requires libxslt. Well, how oft

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: So, I should allow DROP DEFAULT, implement SET DEFAULT GENERATED ALWAYS AS and modify the catalog so the GENERATED property is part of pg_attrdef. Sounds good. What about IDENTITY? Should it also be part of pg_attrdef?

Re: [PATCHES] build/install xml2 when configured with libxml

2007-04-04 Thread Peter Eisentraut
Andrew Dunstan wrote: > Since contrib/xml2 seems to be staying with us at least for now, this > small patch enables it to be built and installed from the contrib > Makefile when --with-libxml is given to configure. contrib/xml2 also requires libxslt. -- Peter Eisentraut http://developer.postgres

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > So, I should allow DROP DEFAULT, implement > SET DEFAULT GENERATED ALWAYS AS > and modify the catalog so the GENERATED property > is part of pg_attrdef. Sounds good. > What about IDENTITY? > Should it also be part of pg_attrdef? There are two ways

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: I have two questions about the dependency system. 1. Is there a built-in defense to avoid circular dependencies? It doesn't have a problem with them, if that's what you mean. 2. If I register dependencies bet

[PATCHES] build/install xml2 when configured with libxml

2007-04-04 Thread Andrew Dunstan
Since contrib/xml2 seems to be staying with us at least for now, this small patch enables it to be built and installed from the contrib Makefile when --with-libxml is given to configure. If there's no objection I'll apply in a day or two. cheers andrew Index: configure =

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > I have two questions about the dependency system. > 1. Is there a built-in defense to avoid circular dependencies? It doesn't have a problem with them, if that's what you mean. > 2. If I register dependencies between column, is there a way > t

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: Before you get too excited about making generated columns disappear automatically in all these cases, consider that dropping a column is not something to be done lightly --- it might contain irreplaceable data. The sta

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: >> Before you get too excited about making generated columns disappear >> automatically in all these cases, consider that dropping a column >> is not something to be done lightly --- it might contain irreplaceable >> data. > The standard says that the

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: I wrote: I see another problem with this patch: the code added to ATExecDropColumn is a crude hack. It doesn't work anyway since this is not the only possible way for columns to be dropped (another one that comes to mind immediately is DROP TYPE ... CASCADE). The only correct

Re: [PATCHES] HOT WIP Patch - version 6.3

2007-04-04 Thread Pavan Deolasee
On 4/3/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: Your patch has been added to the PostgreSQL unapplied patches list at: Thanks Bruce. I would like to submit atleast one more revision which would include couple of TODOs mentioned in my last mail. I would also like to do some cleanup and co

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
I wrote: > I see another problem with this patch: the code added to > ATExecDropColumn is a crude hack. It doesn't work anyway since this is > not the only possible way for columns to be dropped (another one that > comes to mind immediately is DROP TYPE ... CASCADE). The only correct > way to han

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > Here's the new version with the modifications you requested. I see another problem with this patch: the code added to ATExecDropColumn is a crude hack. It doesn't work anyway since this is not the only possible way for columns to be dropped (anothe

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: The idea wouldn't have considered to cross my mind if Tom didn't mention the action-at-a-distance behaviour. AFAIR, that remark had to do with NEXT VALUE FOR, which SQL2003 defines in a very weird way (it's not equivalent to

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > The idea wouldn't have considered to cross my mind > if Tom didn't mention the action-at-a-distance behaviour. AFAIR, that remark had to do with NEXT VALUE FOR, which SQL2003 defines in a very weird way (it's not equivalent to nextval() as one would

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Andrew Dunstan írta: Zoltan Boszormenyi wrote: Tom Lane írta: - unique index checks are done in two steps to avoid inflating the sequence if a unique index check is failed that doesn't reference the IDENTITY column This is just not acceptable --- there is nothing in the standard tha

Re: [PATCHES] xpath_array with namespaces support

2007-04-04 Thread Nikolay Samokhvalov
On 4/4/07, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote: So, choosing between two inefficient approaches: 1. mine, which in some cases use dummy element wrapping, that we could escape; 2. proposed by you, which leads to +1 parsing. ... I'd definitely choose the first one. I'd make it a bi

Re: [PATCHES] xpath_array with namespaces support

2007-04-04 Thread Peter Eisentraut
Am Mittwoch, 4. April 2007 15:20 schrieb Nikolay Samokhvalov: > > To determine if an XML datum is a document, call xml_is_document(). The > > implementation of that function is probably not the best possible one, > > but what the xpath() code does it totally wrong nevertheless. > > You are proposi

Re: [PATCHES] xpath_array with namespaces support

2007-04-04 Thread Peter Eisentraut
Am Mittwoch, 4. April 2007 14:43 schrieb Nikolay Samokhvalov: > > Why do we even need to support xpath on fragments? > > Why not? I find it useful and convenient. Well, rather than inventing bogus root wrapper elements, why not let users call xmlelement() to produce the wrapper element themselves

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Andrew Dunstan
Zoltan Boszormenyi wrote: Tom Lane írta: - unique index checks are done in two steps to avoid inflating the sequence if a unique index check is failed that doesn't reference the IDENTITY column This is just not acceptable --- there is nothing in the standard that requires such behavi

Re: [PATCHES] xpath_array with namespaces support

2007-04-04 Thread Peter Eisentraut
Am Mittwoch, 4. April 2007 14:42 schrieb Nikolay Samokhvalov: > > Why is the function not strict? > > Because in case of 3rd argument (NS mappings) being NULL, we shouldn't > return NULL immediately: If the namespace mapping is NULL then it is unknown, and therefore the result of the XPath expres

Re: [PATCHES] xpath_array with namespaces support

2007-04-04 Thread Peter Eisentraut
Am Mittwoch, 4. April 2007 14:42 schrieb Nikolay Samokhvalov: > Maybe it's worth to start keeping additional information in xml datum (i.e. > bit IS_DOCUMENT and, what is more important for xpath() function, a bit > indicating that XML value has only one root and can be considered as a tree > => th

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-04-04 Thread Zoltan Boszormenyi
Tom Lane írta: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: [ IDENTITY/GENERATED patch ] I got around to reviewing this today. Thanks for the review. Sorry for the bit late reply, I was ill and then occupied with some other work. - unique index checks are done in two steps t

Re: [PATCHES] COPY-able sql log outputs

2007-04-04 Thread Russell Smith
FAST PostgreSQL wrote: On Wed, 4 Apr 2007 02:26, Andrew Dunstan wrote: I am currently doing the following modifications to the patch as per the review comments. 1. Changing all references to 'sqllog' or 'sql' to 'csvlog' and 'csv' respectively. 2. Escaping the username and databasename 3. C