Re: [HACKERS] Fix dumping pre-10 DBs by pg_dump10 if table "name" exists - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Fix dumping pre-10 DBs by pg_dump10 if table "name" exists
Date
Msg-id 20547.1509462038@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Fix dumping pre-10 DBs by pg_dump10 if table "name" exists  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Responses Re: [HACKERS] Fix dumping pre-10 DBs by pg_dump10 if table "name" exists
List pgsql-hackers
Vitaly Burovoy <vitaly.burovoy@gmail.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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Add some const decorations to prototypes
Next
From: Arthur Zakirov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting