Re: Fix dumping pre-10 DBs by pg_dump10 if table "name" exists

From: Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix dumping pre-10 DBs by pg_dump10 if table "name" exists
Date: 2017-10-31 15:52:52
Message-ID: CAKOSWNmKYyRv9B6Jh8q2gWYnFkPGGxeO107hc+Zt7oE2Ley+Fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/31/17, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com> writes:
>> Recently my colleagues found a bug.
>
>> - "SELECT 'bigint'::name AS sequence_type, "
>> + "SELECT 'bigint'::pg_catalog.name AS sequence_type,
>
> Good catch, but I think we could simplify this by just omitting the cast
> altogether:
>
> - "SELECT 'bigint'::name AS sequence_type, "
> + "SELECT 'bigint' AS sequence_type,
>
> pg_dump doesn't particularly care whether the column comes back marked
> as 'name' or 'text' or 'unknown'.
>
> regards, tom lane

OK, just for convenience I'm attaching your version of the fix.
I left an other "NULL::name AS rolname" at
src/bin/pg_dump/pg_dump.c:2978 because can't check (remoteVersion <
90000) it and it is under strict "selectSourceSchema(fout,
"pg_catalog");" schema set.

--
Best regards,
Vitaly Burovoy

Attachment Content-Type Size
0001-Fix-dumping-schema-if-a-table-named-name-exists.ver2.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-10-31 16:34:10 Re: Re: PANIC: invalid index offnum: 186 when processing BRIN indexes in VACUUM
Previous Message Greg Stark 2017-10-31 15:48:39 Re: Anyone have experience benchmarking very high effective_io_concurrency on NVME's?