Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-20 Thread Guillaume Lelarge
On Sat, 2012-10-20 at 14:28 -0400, Tom Lane wrote: > I wrote: > > It looks like I broke this in commit > > 4317e0246c645f60c39e6572644cff1cb03b4c65, because I removed this from > > _tocEntryRequired(): > > > - /* Ignore DATABASE entry unless we should create it */ > > - if (!ropt->createDB &&

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-20 Thread Tom Lane
I wrote: > It looks like I broke this in commit > 4317e0246c645f60c39e6572644cff1cb03b4c65, because I removed this from > _tocEntryRequired(): > - /* Ignore DATABASE entry unless we should create it */ > - if (!ropt->createDB && strcmp(te->desc, "DATABASE") == 0) > - return 0;

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-20 Thread Tom Lane
Robert Haas writes: > On Thu, Oct 18, 2012 at 11:19 AM, Alvaro Herrera > wrote: >> Hm, but the bug is said to happen only in 9.2, so if we don't backpatch >> we would leave 9.2 alone exhibiting this behavior. > Oh, yeah. I missed that. But then shouldn't we start by identifying > which commit

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-19 Thread Robert Haas
On Thu, Oct 18, 2012 at 11:19 AM, Alvaro Herrera wrote: > Robert Haas escribió: >> On Tue, Oct 16, 2012 at 10:31 AM, Guillaume Lelarge >> wrote: >> > Any comments on this? >> >> I'm not sure I'd want to back-patch this, since it is a behavior >> change, but I do think it's probably a good idea to

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-18 Thread Guillaume Lelarge
On Thu, 2012-10-18 at 12:19 -0300, Alvaro Herrera wrote: > Robert Haas escribió: > > On Tue, Oct 16, 2012 at 10:31 AM, Guillaume Lelarge > > wrote: > > > Any comments on this? > > > > I'm not sure I'd want to back-patch this, since it is a behavior > > change, but I do think it's probably a good

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-18 Thread Alvaro Herrera
Robert Haas escribió: > On Tue, Oct 16, 2012 at 10:31 AM, Guillaume Lelarge > wrote: > > Any comments on this? > > I'm not sure I'd want to back-patch this, since it is a behavior > change, but I do think it's probably a good idea to change it for 9.3. Hm, but the bug is said to happen only in 9

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-18 Thread Robert Haas
On Tue, Oct 16, 2012 at 10:31 AM, Guillaume Lelarge wrote: > Any comments on this? I'm not sure I'd want to back-patch this, since it is a behavior change, but I do think it's probably a good idea to change it for 9.3. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Post

Re: [HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-16 Thread Guillaume Lelarge
On Sat, 2012-10-13 at 16:47 +0200, Guillaume Lelarge wrote: > Hi, > > One of my colleagues, Jehan-Guillaume de Rorthais, found a weird > behaviour of the "-c" command line option in the pg_restore tool while > doing a training. Here is the following steps he followed: > > createdb foo > > pg_dum

[HACKERS] Bug in -c CLI option of pg_dump/pg_restore

2012-10-13 Thread Guillaume Lelarge
Hi, One of my colleagues, Jehan-Guillaume de Rorthais, found a weird behaviour of the "-c" command line option in the pg_restore tool while doing a training. Here is the following steps he followed: createdb foo pg_dump -Fc foo > foo.dump createdb bar pg_restore -c -d bar foo.dump bar contains