Re: [BUGS] pg_restore ignores -C when using a restore list -L

2010-06-10 Thread Russell Smith
On 15/05/10 05:15, Alvaro Herrera wrote: > Excerpts from Tom Lane's message of vie may 14 13:26:06 -0400 2010: > > >> However, I think -C is a special case because it's quite un-obvious >> to the user that it effectively acts as a filter switch --- in fact a >> de-filtering switch, because the l

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Kevin Grittner
Hartmut Goebel wrote: > re. 1): While this may be true for many applications it is using > hand-crafted SQL statements, it is plain wrong for all applications > using some abstraction layer. These layers need to quote column > names anyway and the application does not need to be changed here > a

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 03:10, schrieb Bruce Momjian: > The point is that if WINDOW was not a reserved word in 8.3 but is in > 8.4, then every reference to a user column of WINDOW in any 8.4 > application will need to be double-quoted, and odds are the user did not > do that in 8.3. This argument is like:

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 05.06.2010 22:02, schrieb Dimitri Fontaine: > Alvaro Herrera writes: > >> I don't think "dumps must be human-readable" is an argument to reject >> such a switch, as long as it's off by default. And I haven't seen any >> other valid argument either, so +1 from me. > > Well as Bruce said this o

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 07.06.2010 02:32, schrieb Robert Haas: > But we will likely add more > keywords at some point in the future, and while providing an output > format that quotes everything won't fix every potential problem, it > might make life easier for some people. +10 Exactly my point: Make life easier fo

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > Robert Haas wrote: > > > In a way, the fact that the restore fails can be seen as a feature --- > > > they get the error before the go live on 8.4. ?(Yeah, I am serious.) > > > > Eeh, I've had this happen to me on earlier releases, and it didn't

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stefan Kaltenbrunner
Hartmut Goebel wrote: Am 07.06.2010 02:32, schrieb Robert Haas: But we will likely add more keywords at some point in the future, and while providing an output format that quotes everything won't fix every potential problem, it might make life easier for some people. +10 Exactly my point: M

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Robert Haas
On Thu, Jun 10, 2010 at 9:02 AM, Stefan Kaltenbrunner wrote: > I for myself would be rather annoyed if we started quoting all column names > in our dumps. This is seriously hampering readability and while it is > already annoying that pg_dump output is slightly different from the original > DDL us

Re: [BUGS] pg_restore ignores -C when using a restore list -L

2010-06-10 Thread Robert Haas
On Thu, Jun 10, 2010 at 3:58 AM, Russell Smith wrote: > On 15/05/10 05:15, Alvaro Herrera wrote: >> Excerpts from Tom Lane's message of vie may 14 13:26:06 -0400 2010: >> >> >>> However, I think -C is a special case because it's quite un-obvious >>> to the user that it effectively acts as a filter

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stefan Kaltenbrunner
Robert Haas wrote: On Thu, Jun 10, 2010 at 9:02 AM, Stefan Kaltenbrunner wrote: I for myself would be rather annoyed if we started quoting all column names in our dumps. This is seriously hampering readability and while it is already annoying that pg_dump output is slightly different from the o

Re: [BUGS] pg_restore ignores -C when using a restore list -L

2010-06-10 Thread Tom Lane
Robert Haas writes: > I believe this is the commit: > http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=3a524653d18f29676b91f740634a673b72beb6b5 > It looks like the code was changed, but I don't see any doc updates. Eh? http://archives.postgresql.org/pgsql-committers/2010-05/msg00191

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Magnus Hagander
On Thu, Jun 10, 2010 at 15:35, Stefan Kaltenbrunner wrote: > Robert Haas wrote: >> >> On Thu, Jun 10, 2010 at 9:02 AM, Stefan Kaltenbrunner >> wrote: >>> >>> I for myself would be rather annoyed if we started quoting all column >>> names >>> in our dumps. This is seriously hampering readability a

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Bruce Momjian
Stefan Kaltenbrunner wrote: > > I do agree that the human readability of pg_dump is an asset in many > > situations - I have often dumped out the DDL for particular objects > > just to look at it, for example. However, I emphatically do NOT agree > > that leaving someone with a 500MB dump file (or

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Robert Haas
On Thu, Jun 10, 2010 at 9:35 AM, Stefan Kaltenbrunner wrote: >> I do agree that the human readability of pg_dump is an asset in many >> situations - I have often dumped out the DDL for particular objects >> just to look at it, for example.  However, I emphatically do NOT agree >> that leaving some

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Bruce Momjian
Magnus Hagander wrote: > On Thu, Jun 10, 2010 at 15:35, Stefan Kaltenbrunner > wrote: > > Robert Haas wrote: > >> > >> On Thu, Jun 10, 2010 at 9:02 AM, Stefan Kaltenbrunner > >> wrote: > >>> > >>> I for myself would be rather annoyed if we started quoting all column > >>> names > >>> in our dumps

Re: [BUGS] pg_restore ignores -C when using a restore list -L

2010-06-10 Thread Robert Haas
On Thu, Jun 10, 2010 at 9:39 AM, Tom Lane wrote: > Robert Haas writes: >> I believe this is the commit: > >> http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=3a524653d18f29676b91f740634a673b72beb6b5 > >> It looks like the code was changed, but I don't see any doc updates. > > Eh? > ht

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stefan Kaltenbrunner
Robert Haas wrote: On Thu, Jun 10, 2010 at 9:35 AM, Stefan Kaltenbrunner wrote: I do agree that the human readability of pg_dump is an asset in many situations - I have often dumped out the DDL for particular objects just to look at it, for example. However, I emphatically do NOT agree that le

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: > On Thu, Jun 10, 2010 at 15:35, Stefan Kaltenbrunner > wrote: > > that will pretty much defeat the purpose for most use cases i guess because > > people will dump with the defaults and only discover the problem after the > > fact. > > Well, if you d

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Bruce Momjian writes: > From a code perspective, the difficulting in adding such a flag is that > much of the quoting happens inside the backend, not by pg_dump, and > therefore there is significant code change required to add this flag. Yeah, and not only that, but you'd need the *old* server to

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stefan Kaltenbrunner
Stephen Frost wrote: * Magnus Hagander (mag...@hagander.net) wrote: On Thu, Jun 10, 2010 at 15:35, Stefan Kaltenbrunner wrote: that will pretty much defeat the purpose for most use cases i guess because people will dump with the defaults and only discover the problem after the fact. Well, if

[BUGS] Beta 2 build issue

2010-06-10 Thread Thom Brown
Not sure where this needed to be posted, so guessing it's supposed to be here? I've attempted to emerge beta 2 in Gentoo x64 with a 2.6.31-xen-r12 kernel, but it outputs the following: # less /var/tmp/portage/dev-db/postgresql-base-9.0_beta2/temp/build.log * CPV: dev-db/postgresql-base-9.0_beta

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Stefan Kaltenbrunner writes: > That is exactly what I think is "to big a promise" - I don't think we > can actually guarantee that this will fix the dump/restore issue (well > the dump might load but say the 3 lines of plpgsql using dynamic SQL > will still be broken). Yeah, that's a might

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Tom Lane
Thom Brown writes: > In file included from ../../src/include/c.h:851, > from crypt.c:44: > ../../src/include/port.h:392: error: expected identifier or '(' before > '__extension__' > ../../src/include/port.h:408: error: conflicting types for 'unsetenv' > /usr/include/stdlib.h:588:

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: > >From a code perspective, the difficulting in adding such a flag is that > much of the quoting happens inside the backend, not by pg_dump, and > therefore there is significant code change required to add this flag. So, that strikes me as the main argumen

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: > > Well, if you dump in custom format, it could be useful to be able to > > do this on pg_restore time. Not having followed this thread in detail, > > but would that work? That would be a much more useful option... > > I don't think so because muc

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stefan Kaltenbrunner writes: > > That is exactly what I think is "to big a promise" - I don't think we > > can actually guarantee that this will fix the dump/restore issue (well > > the dump might load but say the 3 lines of plpgsql using dynamic SQL

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Stephen Frost writes: > We're talking about a quote-everything option, not what quote_ident() > does today. I don't see why that needs to be done by the backend or why > pg_dump/pg_restore doesn't have enough info to handle that. Are you proposing to stick a SQL parser into pg_dump so that it ca

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Stephen Frost writes: > Erm, I don't know that we deal with function-body problems today, even > when using the newer version of pg_dump, do we? Right, any forward-compatibility problems arising inside functions are strictly the user's to deal with, and always have been. So Stefan's point is tha

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Erm, I don't know that we deal with function-body problems today, even > > when using the newer version of pg_dump, do we? > > Right, any forward-compatibility problems arising inside functions > are strictly the user's to deal wi

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Stephen Frost writes: > To this point, and perhaps to the other regarding VIEW definitions to > some extent, while the solution would move us from 80% to 90% of "things > in PG that might cause a restore from an older pg_dump to fail", I think > another metric we should consider is "% of our user

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of mié jun 09 21:35:57 -0400 2010: > Alvaro Herrera wrote: > > Excerpts from Bruce Momjian's message of mi\xc3\xa9 jun 09 21:10:21 -0400 > > 2010: > > > > > I think users would rather have the restore fail, and know right away > > > they have an issue, than t

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Heikki Linnakangas
On 10/06/10 16:21, Robert Haas wrote: I do agree that the human readability of pg_dump is an asset in many situations - I have often dumped out the DDL for particular objects just to look at it, for example. However, I emphatically do NOT agree that leaving someone with a 500MB dump file (or, fo

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Heikki Linnakangas writes: > On 10/06/10 16:21, Robert Haas wrote: >> I do agree that the human readability of pg_dump is an asset in many >> situations - I have often dumped out the DDL for particular objects >> just to look at it, for example. However, I emphatically do NOT agree >> that leavin

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stefan Kaltenbrunner
Tom Lane wrote: Heikki Linnakangas writes: On 10/06/10 16:21, Robert Haas wrote: I do agree that the human readability of pg_dump is an asset in many situations - I have often dumped out the DDL for particular objects just to look at it, for example. However, I emphatically do NOT agree that

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Thom Brown
On 10 June 2010 15:34, Tom Lane wrote: > Thom Brown writes: >> In file included from ../../src/include/c.h:851, >>                  from crypt.c:44: >> ../../src/include/port.h:392: error: expected identifier or '(' before >> '__extension__' >> ../../src/include/port.h:408: error: conflicting typ

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Tom Lane
Thom Brown writes: > On 10 June 2010 15:34, Tom Lane wrote: >> You need to look into why configure failed to detect that your platform >> has unsetenv. > Is that heimdal_strlcpy patch normal too? Sorry, no idea what you're talking about. (I don't do Gentoo.) regards, t

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Heikki Linnakangas writes: > > Much easier to do a schema-only dump, edit that, and dump data separately. > > That gets you out of the huge-file-to-edit problem, but the performance > costs of restoring a separate-data dump are a pretty serious > disadvant

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Stefan Kaltenbrunner (ste...@kaltenbrunner.cc) wrote: > well that is an argument for providing not only --schema-only and > --data-only but rather three options one for the table definitions, one > for the data and one for all the constraints and indexes. So basically > what pg_dump is curr

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Tom Lane
Stephen Frost writes: > Perhaps we should have a 'multi-file' option with a 'base-file-name' > parameter which then generates: > pre-data DDL > data > post-data DDL > psql script to run them in order (\i-style) Actually, I was thinking that the three-file approach is just unnecessary complicatio

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Actually, I was thinking that the three-file approach is just > unnecessary complication. What about two files, schema and data, > with the schema file including a \i for the data at the right place? > This could be enabled by a single additional switch > "

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Thom Brown
On 10 June 2010 16:48, Tom Lane wrote: > Thom Brown writes: >> On 10 June 2010 15:34, Tom Lane wrote: >>> You need to look into why configure failed to detect that your platform >>> has unsetenv. > >> Is that heimdal_strlcpy patch normal too? > > Sorry, no idea what you're talking about.  (I don

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Robert Haas
On Thu, Jun 10, 2010 at 10:25 AM, Tom Lane wrote: > Bruce Momjian writes: >> From a code perspective, the difficulting in adding such a flag is that >> much of the quoting happens inside the backend, not by pg_dump, and >> therefore there is significant code change required to add this flag. > >

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Alvaro Herrera
Excerpts from Thom Brown's message of jue jun 10 12:20:57 -0400 2010: > On 10 June 2010 16:48, Tom Lane wrote: > > Thom Brown writes: > >> On 10 June 2010 15:34, Tom Lane wrote: > >>> You need to look into why configure failed to detect that your platform > >>> has unsetenv. > > > >> Is that hei

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 13:46, schrieb Kevin Grittner: > I have a feeling that many here don't understand how ubiquitous such > frameworks are. I got his impression, too. :-( > Our programmers have no way to get a statement to > the database from within the application *without* all identifiers > being qu

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 03:35, schrieb Bruce Momjian: > Robert Haas wrote: >>> I think users would rather have the restore fail, and know right away >>> they have an issue, than to do the upgrade, and find out later that some >>> of their application queries fail and they need to run around fixing >>> them.

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 15:48, schrieb Robert Haas: > Maybe so, but I don't give either method high marks for convenience. > Suppose I have a server running 8.2 and I'm going to wipe it and > install the latest version of $DISTRIBUTION which bundles 8.4. What > our current policy essentially means is that

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 17:01, schrieb Tom Lane: > Um, I rather doubt that experience level has much of anything to do with > one's probability of getting blindsided by new SQL syntax. Please stop expecting the one doing the upgrade has a lot of knowledge at all. He is just the one pointed out to perform t

Re: [BUGS] BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

2010-06-10 Thread Hartmut Goebel
Am 10.06.2010 17:23, schrieb Heikki Linnakangas: > Much easier to do a schema-only dump, edit that, and dump data separately. I tries this in my very case. Did not work due sequences, triggers and primary keys. I ended up editing a 500 MB file in vi. -- Schönen Gruß - Regards Hartmut Goebel Dip

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Thom Brown
On 10 June 2010 17:48, Alvaro Herrera wrote: > Excerpts from Thom Brown's message of jue jun 10 12:20:57 -0400 2010: >> On 10 June 2010 16:48, Tom Lane wrote: >> > Thom Brown writes: >> >> On 10 June 2010 15:34, Tom Lane wrote: >> >>> You need to look into why configure failed to detect that yo

Re: [BUGS] Beta 2 build issue

2010-06-10 Thread Alvaro Herrera
Excerpts from Thom Brown's message of jue jun 10 13:11:25 -0400 2010: > Here's a mindless stab at a solution... should I disable kerberos in the > build? I suggest you look at config.log to try to determine what's the problem with unsetenv. -- Álvaro Herrera The PostgreSQL Company - Command P

[BUGS] BUG #5498: PgAdmin III write to file adds carriage return

2010-06-10 Thread Ramesh
The following bug has been logged online: Bug reference: 5498 Logged by: Ramesh Email address: ramn...@rediffmail.com PostgreSQL version: 8.1.7 Operating system: Linux Description:PgAdmin III write to file adds carriage return Details: I have connected PgAdmin III v

Re: [BUGS] Invalid YAML output from EXPLAIN

2010-06-10 Thread Bruce Momjian
Robert Haas wrote: > On Wed, Jun 9, 2010 at 4:48 PM, Robert Haas wrote: > > On Wed, Jun 9, 2010 at 4:47 PM, Dean Rasheed > > wrote: > >> On 9 June 2010 20:56, Robert Haas wrote: > >>> On Wed, Jun 9, 2010 at 3:50 PM, Tom Lane wrote: > Dean Rasheed writes: > > Hmm. Well it's quite subj

Re: [BUGS] Invalid YAML output from EXPLAIN

2010-06-10 Thread Tom Lane
Bruce Momjian writes: > So, is there still value to a YAML format vs. JSON? They look similar > to me in this simple case: Well, removing the various braces and brackets reduces the line count significantly. Not convinced it's really worth much though. regards, tom lane

Re: [BUGS] Invalid YAML output from EXPLAIN

2010-06-10 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > So, is there still value to a YAML format vs. JSON? They look similar > > to me in this simple case: > > Well, removing the various braces and brackets reduces the line count > significantly. Not convinced it's really worth much though. Ah, I see tha

Re: [BUGS] BUG #5497: plpythonu gives cache lookup error

2010-06-10 Thread David Gardner
Thanks, was able to rebuild plpython.so and it works. Also mapping SQL Arrays to Python lists is awesome. On 06/09/2010 09:05 PM, Tom Lane wrote: "David Gardner" writes: Description:plpythonu gives cache lookup error Fixed, thanks for the report! reg