Skip site navigation (1) Skip section navigation (2)

Re: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Eugene" <eugenekuz(at)mail(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in
Date: 2007-02-26 17:43:12
Message-ID: 3683.1172511792@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Eugene" <eugenekuz(at)mail(dot)ru> writes:
> When a datascheme contains uppercase letters in its name, pg_dump doesn't
> recognize the scheme as valid

>> pg_dump -n "Schema" -U postgres database
> pg_dump:No matching schemas were found

This is not a bug.  The problem is that there are two levels of quoting
needed: one for the shell and one for SQL.  As you wrote it, the double
quotes are stripped off by the shell and so pg_dump gets Schema, which
is case-folded per normal SQL rules.  So you need to write

	pg_dump -n '"Schema"' -U postgres database

Now, the shell eats the single quotes and passes "Schema" to pg_dump.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: ferdinand.wessDate: 2007-02-27 11:32:57
Subject: BUG #3083: Installation to path with umlaufs fails with initdb
Previous:From: Bruce MomjianDate: 2007-02-26 15:21:23
Subject: Re: BUG #2969: Inaccuracies in Solaris FAQ

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group