From: | "Andrea Urbani" <matfanjol(at)mail(dot)com> |
---|---|
To: | "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com> |
Cc: | "PostgreSQL mailing lists" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: pg_dump: patterns and tables with uppercase letters |
Date: | 2016-12-22 05:52:50 |
Message-ID: | trinity-aedbc098-e013-4a69-adfd-a5c45eabb0d7-1482385970017@3capp-mailcom-lxa02 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello Michael,</div>
<div>it works: thank you and sorry.</div>
<div>Bye</div>
<div>Andrea</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Thursday, December 22, 2016 at 5:32 AM<br/>
<b>From:</b> "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com><br/>
<b>To:</b> "Andrea Urbani" <matfanjol(at)mail(dot)com><br/>
<b>Cc:</b> "PostgreSQL mailing lists" <pgsql-bugs(at)postgresql(dot)org><br/>
<b>Subject:</b> Re: [BUGS] pg_dump: patterns and tables with uppercase letters</div>
<div name="quoted-content">On Wed, Dec 21, 2016 at 8:35 PM, Andrea Urbani <matfanjol(at)mail(dot)com> wrote:<br/>
> Hello to everybody,<br/>
> if you have table names with uppercase letters you will not be able to use<br/>
> the patterns in pg_dump.<br/>
> In particular the processSQLNamePattern function, inside<br/>
> src/fe_utils/strings_utils.c, is converting to lowercase when the text is<br/>
> not double quoted, but when it is double quoted, all the |*+?()[]{}.^$\<br/>
> characters are quoted.<br/>
<br/>
You are missing the point here... The pattern analysis matches what is<br/>
done in psql. So you could do want you want by moving the regex<br/>
pattern out of the double quotes for example:<br/>
$ pg_dump --table '"tDocuments"*' | grep "CREATE TABLE" | grep tDocuments<br/>
CREATE TABLE "tDocuments" (<br/>
CREATE TABLE "tDocumentsFiles" (<br/>
<br/>
The fine docs explain the full behavior here, the first paragraph<br/>
being especially explicit about the use of double quotes:<br/>
<a href="https://www.postgresql.org/docs/devel/static/app-psql.html#app-psql-patterns" target="_blank">https://www.postgresql.org/docs/devel/static/app-psql.html#app-psql-patterns</a><br/>
--<br/>
Michael</div>
</div>
</div>
</div></div></body></html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Kartashov | 2016-12-22 11:01:22 | Can't build uuid-ossp extension from source |
Previous Message | Michael Paquier | 2016-12-22 04:32:02 | Re: pg_dump: patterns and tables with uppercase letters |