pg_dump -t broken for mixed case table names in beta3?
pg_dump -t broken for mixed case table names in beta3?
От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Unless I'm missing something, pg_dump is not allowing selective dump of
a table where the table name is mixed case. The -t switch still works
for lower case. Even though quotes weren't previously needed on the
pg_dump command line, I tried that with no better luck.
postgres@DTR3:~> psql dtr
Welcome to psql 8.2beta3, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit
dtr=# \d "DbTranLogRecord" Table "public.DbTranLogRecord" Column | Type | Modifiers
----------------+-------------------+-----------countyNo | "CountyNoT" | not nulltranImageSeqNo | "TranImageSeqNoT" | not nulllogRecordSeqNo | "LogRecordSeqNoT" | not nulloperation | "OperationT" | not nulltableName | "TableNameT" | not null
Indexes: "DbTranLogRecordPK" PRIMARY KEY, btree ("countyNo",
"tranImageSeqNo", "logRecordSeqNo") "DbTranLogRecord_tableName" btree ("countyNo", "tableName",
operation)
dtr=# \q
postgres@DTR3:~> pg_dump -s -t DbTranLogRecord dtr
pg_dump: No matching tables were found
postgres@DTR3:~>
Re: pg_dump -t broken for mixed case table names in beta3?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Kevin Grittner" writes: > Unless I'm missing something, pg_dump is not allowing selective dump of > a table where the table name is mixed case. You do it like this: $ pg_dump -s -t '"DbTranLogRecord"' dtr A bit ugly but the conflict between shell and SQL quoting rules sometimes forces us into compromises :-( Perhaps it's worth having an example for this in the pg_dump man page? regards, tom lane
Re: pg_dump -t broken for mixed case table names in
От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Thanks much; it might have been a while before I tried that nested quoting technique. I think it's worth documenting. Would you like me to try to put a doc patch together, or would it be better for someone else to do so? -Kevin >>> Tom Lane 11/28/06 1:43 PM >>> "Kevin Grittner" writes: > Unless I'm missing something, pg_dump is not allowing selective dump of > a table where the table name is mixed case. You do it like this: $ pg_dump - s - t '"DbTranLogRecord"' dtr A bit ugly but the conflict between shell and SQL quoting rules sometimes forces us into compromises :- ( Perhaps it's worth having an example for this in the pg_dump man page? regards, tom lane
Re: pg_dump -t broken for mixed case table names in beta3?
On Tue, Nov 28, 2006 at 02:43:17PM -0500, Tom Lane wrote:
> "Kevin Grittner" writes:
> > Unless I'm missing something, pg_dump is not allowing selective dump of
> > a table where the table name is mixed case.
>
> You do it like this:
>
> $ pg_dump -s -t '"DbTranLogRecord"' dtr
>
> A bit ugly but the conflict between shell and SQL quoting rules
> sometimes forces us into compromises :-(
>
> Perhaps it's worth having an example for this in the pg_dump man page?
Please find enclosed a patch which adds this :)
Cheers,
D
--
David Fetter http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Re: pg_dump -t broken for mixed case table names in beta3?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
David Fetter writes: > On Tue, Nov 28, 2006 at 02:43:17PM -0500, Tom Lane wrote: >> Perhaps it's worth having an example for this in the pg_dump man page? > Please find enclosed a patch which adds this :) Already done, thanks. regards, tom lane