Lists: | pgsql-docspgsql-hackerspgsql-patches |
---|
From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_dump -t broken for mixed case table names in beta3? |
Date: | 2006-11-28 19:27:55 |
Message-ID: | 456C395A.EE98.0025.0@wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
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(at)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 null
tranImageSeqNo | "TranImageSeqNoT" | not null
logRecordSeqNo | "LogRecordSeqNoT" | not null
operation | "OperationT" | not null
tableName | "TableNameT" | not null
Indexes:
"DbTranLogRecordPK" PRIMARY KEY, btree ("countyNo",
"tranImageSeqNo", "logRecordSeqNo")
"DbTranLogRecord_tableName" btree ("countyNo", "tableName",
operation)
dtr=# \q
postgres(at)DTR3:~> pg_dump -s -t DbTranLogRecord dtr
pg_dump: No matching tables were found
postgres(at)DTR3:~>
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_dump -t broken for mixed case table names in beta3? |
Date: | 2006-11-28 19:43:17 |
Message-ID: | 5470.1164742997@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> 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
From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump -t broken for mixed case table names in |
Date: | 2006-11-28 19:49:31 |
Message-ID: | 456C3E6A.EE98.0025.0@wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
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 <tgl(at)sss(dot)pgh(dot)pa(dot)us> 11/28/06 1:43 PM >>>
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> 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
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL Docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pg_dump -t broken for mixed case table names in beta3? |
Date: | 2006-11-28 22:51:09 |
Message-ID: | 20061128225109.GA5713@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
On Tue, Nov 28, 2006 at 02:43:17PM -0500, Tom Lane wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> 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 <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Attachment | Content-Type | Size |
---|---|---|
pg_dump_camel_case_example.patch | text/plain | 800 bytes |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL Docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pg_dump -t broken for mixed case table names in beta3? |
Date: | 2006-11-28 22:54:55 |
Message-ID: | 7411.1164754495@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers pgsql-patches |
David Fetter <david(at)fetter(dot)org> 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