Re: pgdump - Mailing list pgsql-hackers

From Neil Conway
Subject Re: pgdump
Date
Msg-id 1105942150.22946.46.camel@localhost.localdomain
Whole thread Raw
In response to Re: pgdump  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgdump  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pgdump  (Brendan Jurd <blakjak@blakjak.sytes.net>)
List pgsql-hackers
On Mon, 2005-01-17 at 00:54 -0500, Tom Lane wrote:
>     -t s1.t1
> [...] without any quoting rules it would then become impossible to
> deal with names containing dots.

Ah, yeah -- sorry, I was focusing on case conversion rather than quoting
in general.

> Are we willing to blow off that case?
> Or is it better to drop that part of the proposal?

I would be OK with just ignoring this case, but on reflection I would
prefer removing the "-t schema.table" syntax. Removing the feature
resolves the quoting issue and also simplifies pg_dump's behavior. We
lose the ability to dump table t1 in schema s1 and table t2 in schema s2
in a single command, but

(a) you can specify "-t t1 -t t2 -n s1 -n s2", although this might also
dump t1.s2 and/or t2.s1

(b) you can just run pg_dump twice, specifying the appropriate -t and -n
options each time

So the behavior would be that suggested earlier by David Skoll:

> pg_dump -t t1                          -- Dump table t1 in any schema
> pg_dump -n s1                          -- Dump all of schema s1
> pg_dump -t t1 -n s1                    -- Dump t1 in s1
> pg_dump -t t1 -t t2 -n s1              -- Dump s1.t1 and s1.t2
> pg_dump -t t1 -t t2 -n s1 -n s2        -- Dump s1.t1, s1.t2, s2.t1 and s2.t2

We'd only raise an error if we found no matching tables/schemas, as was
hashed out in July.

-Neil




pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: IBM releases 500 patents
Next
From: Tom Lane
Date:
Subject: ARC patent