Re: pg_dump --where option

From: Surafel Temesgen <surafel3000(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Carter Thaxton <carter(dot)thaxton(at)gmail(dot)com>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>
Subject: Re: pg_dump --where option
Date: 2020-09-14 10:04:56
Message-ID: CALAY4q_JgOZ684NNv8_qQ74qzApOmyKvV9Av-sNP8hTUUBBDUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 31, 2020 at 1:38 AM Daniel Gustafsson <daniel(at)yesql(dot)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 Content-Type Size
pg_dump_where_clause-v2.patch text/x-patch 13.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2020-09-14 10:26:07 Re: recovering from "found xmin ... from before relfrozenxid ..."
Previous Message Pavel Stehule 2020-09-14 09:44:54 Re: On login trigger: take three