Re: proposal: possibility to read dumped table's name from file
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>,
Justin Pryzby <pryzby@telsasoft.com>, Dean Rasheed <dean.a.rasheed@gmail.com>, Stephen Frost <sfrost@snowman.net>, Surafel Temesgen <surafel3000@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-09-17T12:16:15Z
Lists: pgsql-hackers
Attachments
- pg_dump-filteropt-20210917.patch (text/x-patch) patch
pá 17. 9. 2021 v 14:07 odesílatel Daniel Gustafsson <daniel@yesql.se> napsal: > > On 17 Sep 2021, at 13:59, Pavel Stehule <pavel.stehule@gmail.com> wrote: > > pá 17. 9. 2021 v 13:56 odesílatel Daniel Gustafsson <daniel@yesql.se > <mailto:daniel@yesql.se>> napsal: > > > On 17 Sep 2021, at 13:51, Pavel Stehule <pavel.stehule@gmail.com > <mailto:pavel.stehule@gmail.com>> wrote: > > > pá 17. 9. 2021 v 13:42 odesílatel Daniel Gustafsson <daniel@yesql.se > <mailto:daniel@yesql.se> <mailto:daniel@yesql.se <mailto:daniel@yesql.se>>> > napsal: > > > > I am unable to write a filter statement which can > > > handle this relname: > > > > > > CREATE TABLE "a"" > > > ""b" (a integer); > > > > > > Are you able to craft one for that? > > > > > > I am not able to dump this directly in pg_dump. Is it possible? > > > > Sure, see below: > > > > $ ./bin/psql filter > > psql (15devel) > > Type "help" for help. > > > > I didn't ask on this > > > > I asked if you can use -t and some for filtering this name? > > I didn't try as I don't see how that's relevant? Surely we're not > limiting the > capabilities of a filtering file format based on the quoting semantics of a > shell? > this patch just use existing functionality, that can be buggy too. but I had a bug in this part - if I detect double double quotes on input I have to send double quotes to output too. It should be fixed in attached patch [pavel@localhost pg_dump]$ echo 'include table "a""\n""b"' | ./pg_dump --filter=- -- -- PostgreSQL database dump -- -- Dumped from database version 15devel -- Dumped by pg_dump version 15devel > -- > Daniel Gustafsson https://vmware.com/ > >
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix array subscript warnings
- 17935e1fdf0a 17.0 landed
-
Read include/exclude commands for dump/restore from file
- a5cf808be55b 17.0 landed
-
Allow records to span multiple lines in pg_hba.conf and pg_ident.conf.
- 8f8154a503c7 14.0 cited