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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vitaly Burovoy <vitaly.burovoy@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-10-31T15:00:38Z
Lists: 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


Commits

  1. In client support of v10 features, use standard schema handling.

  2. Fix underqualified cast-target type names in pg_dump and psql queries.

  3. Add CREATE SEQUENCE AS <data type> clause

  4. pg_dump: Fix some schema issues when dumping sequences