Re: pg_dump --where option - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Re: pg_dump --where option
Date
Msg-id CALAY4q_JgOZ684NNv8_qQ74qzApOmyKvV9Av-sNP8hTUUBBDUw@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump --where option  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: pg_dump --where option
List pgsql-hackers


On Fri, Jul 31, 2020 at 1:38 AM Daniel Gustafsson <daniel@yesql.se> wrote:

>  $ pg_dump -d cary --where="test1:a3 = ( select max(aa1) from test2 )" > testdump2
>  $ pg_dump: error: processing of table "public.test1" failed
>
> both test1 and test2 exist in the database and the same subquery works under psql.
>

This is because pg_dump uses schema-qualified object name I add documentation about to use schema-qualified name when using sub query


 
> I also notice that the regression tests for pg_dump is failing due to the patch, I think it is worth looking into the failure messages and also add some test cases on the new "where" clause to ensure that it can cover as many use cases as possible.


I fix regression test  failure on the attached patch.

I don’t add tests because single-quotes and double-quotes are meta-characters for PROVE too.

regards

Surafel

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: On login trigger: take three
Next
From: Ashutosh Sharma
Date:
Subject: Re: recovering from "found xmin ... from before relfrozenxid ..."