Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data - Mailing list pgsql-hackers

From Carter Thaxton
Subject Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data
Date
Msg-id CAGiT_HNKeWDK9YFUMS1vct5XSchM+kK=Fa+bJ8c8WTpeFpJFDg@mail.gmail.com
Whole thread Raw
In response to Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
 
>   pg_dump --where "bar:created_at >= 2018-05-01'"

I am wondering how this works at parsing if the table name, or one of
the columns includes a colon character :)

The proposed patch will handle quoted identifiers.  E.g. the following will work just fine:

  pg_dump --where 'table:"column:with:colons" = 5'

Note the use of single quotes in the shell, and then double quotes in the WHERE clause.  There are also many other options for quoting in the shell, of course.


 
Please don't top-post on the PostgreSQL lists. See <http://idallen.com/topposting.html>

Sorry.  Thanks for the reminder.

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Copy function for logical replication slots
Next
From: Amit Langote
Date:
Subject: Re: pgsql: Clarify use of temporary tables within partition trees