pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_dump: regular expression notation for tables
2+ messages / 2 participants
[nested] [flat]
* pg_dump: regular expression notation for tables
@ 2022-09-06 08:15 PG Doc comments form <noreply@postgresql.org>
2022-09-27 01:57 ` Re: pg_dump: regular expression notation for tables Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2022-09-06 08:15 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: peter@ter.dk
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/14/app-pgdump.html
Description:
Hi,
The pg_dump page mentions:
https://www.postgresql.org/docs/current/app-pgdump.html#PG-DUMP-EXAMPLES
==
To dump all schemas whose names start with east or west and end in gsm,
excluding any schemas whose names contain the word test:
$ pg_dump -n 'east*gsm' -n 'west*gsm' -N '*test*' mydb > db.sql
The same, using regular expression notation to consolidate the switches:
$ pg_dump -n '(east|west)*gsm' -N '*test*' mydb > db.sql
==
However the manual doesn't mention anything about regular expressions
otherwise.
If it is possible to use regular expressions then the examples would have
issues:
east*gsm would match easgsm, eastgsm, eastttttgsm, but not east.gsm or
east_tower.gsm
(east|west)*gsm would match gsm, eastgsm, eastwesteastgsm, but not east.gsm
or east_tower.gsm
Perhaps regular expressions are not supported, but simply some sort of glob
expression?
- Peter Brodersen
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pg_dump: regular expression notation for tables
2022-09-06 08:15 pg_dump: regular expression notation for tables PG Doc comments form <noreply@postgresql.org>
@ 2022-09-27 01:57 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2022-09-27 01:57 UTC (permalink / raw)
To: peter@ter.dk; pgsql-docs@lists.postgresql.org
On Tue, Sep 6, 2022 at 08:15:14AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/14/app-pgdump.html
> Description:
>
> Hi,
>
> The pg_dump page mentions:
>
> https://www.postgresql.org/docs/current/app-pgdump.html#PG-DUMP-EXAMPLES
> ==
> To dump all schemas whose names start with east or west and end in gsm,
> excluding any schemas whose names contain the word test:
> $ pg_dump -n 'east*gsm' -n 'west*gsm' -N '*test*' mydb > db.sql
>
> The same, using regular expression notation to consolidate the switches:
> $ pg_dump -n '(east|west)*gsm' -N '*test*' mydb > db.sql
> ==
>
> However the manual doesn't mention anything about regular expressions
> otherwise.
>
> If it is possible to use regular expressions then the examples would have
> issues:
>
> east*gsm would match easgsm, eastgsm, eastttttgsm, but not east.gsm or
> east_tower.gsm
> (east|west)*gsm would match gsm, eastgsm, eastwesteastgsm, but not east.gsm
> or east_tower.gsm
>
> Perhaps regular expressions are not supported, but simply some sort of glob
> expression?
The pg_dump documentation says "(see Patterns below)" in several places,
and that link points to:
https://www.postgresql.org/docs/15/app-psql.html#APP-PSQL-PATTERNS
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-09-27 01:57 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 08:15 pg_dump: regular expression notation for tables PG Doc comments form <noreply@postgresql.org>
2022-09-27 01:57 ` Bruce Momjian <bruce@momjian.us>
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