pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5765: pg_dump fail to find upper case table name
6+ messages / 5 participants
[nested] [flat]
* BUG #5765: pg_dump fail to find upper case table name
@ 2010-11-24 11:34 Cristiano <sumariva@gmail.com>
2010-11-24 13:28 ` Re: BUG #5765: pg_dump fail to find upper case table name Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 1 reply; 6+ messages in thread
From: Cristiano @ 2010-11-24 11:34 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 5765
Logged by: Cristiano
Email address: sumariva@gmail.com
PostgreSQL version: 8.4.4
Operating system: Linux
Description: pg_dump fail to find upper case table name
Details:
The following command line did not worked.
Using a table with lower case chars( no quoting ) works.
Also happen on pg_dump windows version.
Tested on 8.4.4 and 8.4.3
pg_dump --host www --port 5432 --username postgres --format plain
--column-inserts --verbose --file "streetTypes.sql" --table
public."streetTypes" "geocoding-dev"
Password:
pg_dump: No matching tables were found
pg_dump: *** aborted because of error
Test case: just create an table that need quoting.
CREATE TABLE "Test"() WITH ( OIDS=FALSE );
Call pg_dump to export.
pg_dump --host localhost --port 5432 --username postgres --format plain
--column-inserts --verbose --file "test.sql" --table public."Test" "test-db"
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5765: pg_dump fail to find upper case table name
2010-11-24 11:34 BUG #5765: pg_dump fail to find upper case table name Cristiano <sumariva@gmail.com>
@ 2010-11-24 13:28 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2010-11-24 15:04 ` Re: BUG #5765: pg_dump fail to find upper case table name Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 6+ messages in thread
From: Heikki Linnakangas @ 2010-11-24 13:28 UTC (permalink / raw)
To: Cristiano <sumariva@gmail.com>; +Cc: pgsql-bugs
On 24.11.2010 13:34, Cristiano wrote:
> pg_dump --host www --port 5432 --username postgres --format plain
> --column-inserts --verbose --file "streetTypes.sql" --table
> public."streetTypes" "geocoding-dev"
> Password:
> pg_dump: No matching tables were found
> pg_dump: *** aborted because of error
>
> Test case: just create an table that need quoting.
> CREATE TABLE "Test"() WITH ( OIDS=FALSE );
>
> Call pg_dump to export.
>
> pg_dump --host localhost --port 5432 --username postgres --format plain
> --column-inserts --verbose --file "test.sql" --table public."Test" "test-db"
Manual says (at the bottom of
http://www.postgresql.org/docs/8.4/static/app-pgdump.html):
> To specify an upper-case or mixed-case name in -t and related switches, you need to double-quote the name; else it will be folded to lower case (see Patterns). But double quotes are special to the shell, so in turn they must be quoted. Thus, to dump a single table with a mixed-case name, you need something like
>
> $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5765: pg_dump fail to find upper case table name
2010-11-24 11:34 BUG #5765: pg_dump fail to find upper case table name Cristiano <sumariva@gmail.com>
2010-11-24 13:28 ` Re: BUG #5765: pg_dump fail to find upper case table name Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
@ 2010-11-24 15:04 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-11-24 15:24 ` Re: BUG #5765: pg_dump fail to find upper case table name Pavel Golub <pavel@microolap.com>
2011-03-11 00:40 ` Re: BUG #5765: pg_dump fail to find upper case table name Bruce Momjian <bruce@momjian.us>
0 siblings, 2 replies; 6+ messages in thread
From: Kevin Grittner @ 2010-11-24 15:04 UTC (permalink / raw)
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; Cristiano <sumariva@gmail.com>; +Cc: pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
> Manual says (at the bottom of
> http://www.postgresql.org/docs/8.4/static/app-pgdump.html):
>
>> To specify an upper-case or mixed-case name in -t and related
>> switches, you need to double-quote the name; else it will be
>> folded to lower case (see Patterns). But double quotes are
>> special to the shell, so in turn they must be quoted. Thus, to
>> dump a single table with a mixed-case name, you need something
>> like
>>
>> $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql
Perhaps some of that should be moved up to the definition of the -t
switch? It wouldn't seem too out of place to me to put it somewhere
near this sentence:
| When using wildcards, be careful to quote the pattern if needed to
| prevent the shell from expanding the wildcards.
While examples are useful, information which is only provided there
is easily missed when someone goes to read up on a particular
switch.
-Kevin
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5765: pg_dump fail to find upper case table name
2010-11-24 11:34 BUG #5765: pg_dump fail to find upper case table name Cristiano <sumariva@gmail.com>
2010-11-24 13:28 ` Re: BUG #5765: pg_dump fail to find upper case table name Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2010-11-24 15:04 ` Re: BUG #5765: pg_dump fail to find upper case table name Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2010-11-24 15:24 ` Pavel Golub <pavel@microolap.com>
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Golub @ 2010-11-24 15:24 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-bugs
Hello, Kevin.
You wrote:
KG> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
KG>
>> Manual says (at the bottom of
>> http://www.postgresql.org/docs/8.4/static/app-pgdump.html):
>>
>>> To specify an upper-case or mixed-case name in -t and related
>>> switches, you need to double-quote the name; else it will be
>>> folded to lower case (see Patterns). But double quotes are
>>> special to the shell, so in turn they must be quoted. Thus, to
>>> dump a single table with a mixed-case name, you need something
>>> like
>>>
>>> $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql
KG>
KG> Perhaps some of that should be moved up to the definition of the -t
KG> switch? It wouldn't seem too out of place to me to put it somewhere
KG> near this sentence:
KG>
KG> | When using wildcards, be careful to quote the pattern if needed to
KG> | prevent the shell from expanding the wildcards.
+100
KG>
KG> While examples are useful, information which is only provided there
KG> is easily missed when someone goes to read up on a particular
KG> switch.
KG>
KG> -Kevin
--
With best wishes,
Pavel mailto:pavel@gf.microolap.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5765: pg_dump fail to find upper case table name
2010-11-24 11:34 BUG #5765: pg_dump fail to find upper case table name Cristiano <sumariva@gmail.com>
2010-11-24 13:28 ` Re: BUG #5765: pg_dump fail to find upper case table name Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2010-11-24 15:04 ` Re: BUG #5765: pg_dump fail to find upper case table name Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2011-03-11 00:40 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 6+ messages in thread
From: Bruce Momjian @ 2011-03-11 00:40 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; Cristiano <sumariva@gmail.com>; pgsql-bugs
Kevin Grittner wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
>
> > Manual says (at the bottom of
> > http://www.postgresql.org/docs/8.4/static/app-pgdump.html):
> >
> >> To specify an upper-case or mixed-case name in -t and related
> >> switches, you need to double-quote the name; else it will be
> >> folded to lower case (see Patterns). But double quotes are
> >> special to the shell, so in turn they must be quoted. Thus, to
> >> dump a single table with a mixed-case name, you need something
> >> like
> >>
> >> $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql
>
> Perhaps some of that should be moved up to the definition of the -t
> switch? It wouldn't seem too out of place to me to put it somewhere
> near this sentence:
>
> | When using wildcards, be careful to quote the pattern if needed to
> | prevent the shell from expanding the wildcards.
>
> While examples are useful, information which is only provided there
> is easily missed when someone goes to read up on a particular
> switch.
I have applied the attached doc patch to reference the example section
from the specific pg_dump options sections.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
/rtmp/pg_dump.diff (text/x-diff, 2.3K) download
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
new file mode 100644
index 25dc2a7..e78d275
*** a/doc/src/sgml/ref/pg_dump.sgml
--- b/doc/src/sgml/ref/pg_dump.sgml
*************** PostgreSQL documentation
*** 301,307 ****
linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
so multiple schemas can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards.
</para>
<note>
--- 301,308 ----
linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
so multiple schemas can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards; see
! <xref linkend="pg-dump-examples" endterm="pg-dump-examples-title">.
</para>
<note>
*************** PostgreSQL documentation
*** 435,441 ****
linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
so multiple tables can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards.
</para>
<para>
--- 436,443 ----
linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
so multiple tables can also be selected by writing wildcard characters
in the pattern. When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards; see
! <xref linkend="pg-dump-examples" endterm="pg-dump-examples-title">.
</para>
<para>
*************** CREATE DATABASE foo WITH TEMPLATE templa
*** 973,979 ****
</refsect1>
<refsect1 id="pg-dump-examples">
! <title>Examples</title>
<para>
To dump a database called <literal>mydb</> into a SQL-script file:
--- 975,981 ----
</refsect1>
<refsect1 id="pg-dump-examples">
! <title id="pg-dump-examples-title">Examples</title>
<para>
To dump a database called <literal>mydb</> into a SQL-script file:
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5765: pg_dump fail to find upper case table name
@ 2010-11-24 13:32 Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Grittner @ 2010-11-24 13:32 UTC (permalink / raw)
To: sumariva@gmail.com; pgsql-bugs
"Cristiano" wrote:
> Operating system: Linux
> Description: pg_dump fail to find upper case table name
> --table public."streetTypes"
Linux is eating the quotes. Try:
--table public.'"streetTypes"'
While a bit confusing, this is not a bug in the code. Perhaps the
documentation should specifically mention it....
-Kevin
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2011-03-11 00:40 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-24 11:34 BUG #5765: pg_dump fail to find upper case table name Cristiano <sumariva@gmail.com>
2010-11-24 13:28 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2010-11-24 15:04 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-11-24 15:24 ` Pavel Golub <pavel@microolap.com>
2011-03-11 00:40 ` Bruce Momjian <bruce@momjian.us>
2010-11-24 13:32 Re: BUG #5765: pg_dump fail to find upper case table name Kevin Grittner <Kevin.Grittner@wicourts.gov>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox