BUG #18923: pg_dump 18beta1 fails to process complex table names - Mailing list pgsql-bugs
From | PG Bug reporting form |
---|---|
Subject | BUG #18923: pg_dump 18beta1 fails to process complex table names |
Date | |
Msg-id | 18923-e79273f87c6bed69@postgresql.org Whole thread Raw |
List | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18923 Logged by: Philippe BEAUDOIN Email address: phb.emaj@free.fr PostgreSQL version: 18beta1 Operating system: Linux Description: I have just run the E-Maj project regression test suite with PG18 beta1 and found a pg_dump abort when trying to dump a schema prefixed table having a complex name including single quote, double quote and space. Here is a test case to reproduce it : #!/bin/sh PG18_BIN=/home/postgres/pg/pg18/bin PG18_PORT=5418 echo "------ Setup a new database with a single schema and table" $PG18_BIN/dropdb -h localhost -p $PG18_PORT --if-exists bug $PG18_BIN/createdb -h localhost -p $PG18_PORT bug $PG18_BIN/psql -h localhost -p $PG18_PORT bug <<EOF select version(); SET client_min_messages TO WARNING; CREATE SCHEMA "phil's schema""3"; SET search_path="phil's schema""3"; DROP TABLE IF EXISTS "phil's tbl1"; CREATE TABLE "phil's tbl1" ( "phil's col11" INT NOT NULL PRIMARY KEY, "phil's col12" TEXT ); EOF echo "------ Dump the database" $PG18_BIN/pg_dump --version $PG18_BIN/pg_dump -h localhost -p $PG18_PORT --verbose bug >/dev/null And here is what I get : ------ Setup a new database with a single schema and table version ---------------------------------------------------------------------------------------------------------- PostgreSQL 18beta1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, 64-bit (1 row) SET CREATE SCHEMA SET DROP TABLE CREATE TABLE ------ Dump the database pg_dump (PostgreSQL) 18beta1 pg_dump: executing SELECT pg_catalog.set_config('search_path', '', false); pg_dump: last built-in OID is 16383 pg_dump: reading extensions pg_dump: identifying extension members pg_dump: reading schemas pg_dump: reading user-defined tables pg_dump: reading user-defined functions pg_dump: reading user-defined types pg_dump: reading procedural languages pg_dump: reading user-defined aggregate functions pg_dump: reading user-defined operators pg_dump: reading user-defined access methods pg_dump: reading user-defined operator classes pg_dump: reading user-defined operator families pg_dump: reading user-defined text search parsers pg_dump: reading user-defined text search templates pg_dump: reading user-defined text search dictionaries pg_dump: reading user-defined text search configurations pg_dump: reading user-defined foreign-data wrappers pg_dump: reading user-defined foreign servers pg_dump: reading default privileges pg_dump: reading user-defined collations pg_dump: reading user-defined conversions pg_dump: reading type casts pg_dump: reading transforms pg_dump: reading table inheritance information pg_dump: reading event triggers pg_dump: finding extension tables pg_dump: finding inheritance relationships pg_dump: reading column info for interesting tables pg_dump: flagging inherited columns in subtables pg_dump: reading partitioning data pg_dump: reading indexes pg_dump: flagging indexes in partitioned tables pg_dump: reading extended statistics pg_dump: reading constraints pg_dump: reading triggers pg_dump: reading rewrite rules pg_dump: reading policies pg_dump: reading row-level security policies pg_dump: reading publications pg_dump: reading publication membership of tables pg_dump: reading publication membership of schemas pg_dump: reading subscriptions pg_dump: reading subscription membership of tables pg_dump: reading large objects pg_dump: reading dependency data pg_dump: saving encoding = UTF8 pg_dump: saving "standard_conforming_strings = on" pg_dump: saving "search_path = " pg_dump: creating SCHEMA "phil's schema"3" pg_dump: creating TABLE "phil's schema"3.phil's tbl1" pg_dump: processing data for table "phil's schema"3.phil's tbl1" pg_dump: dumping contents of table "phil's schema"3.phil's tbl1" pg_dump: error: query failed: ERROR: syntax error at or near "s" LINE 1: EXECUTE getAttributeStats('{"phil's schema""3","phil's schem... ^ pg_dump: detail: Query was: EXECUTE getAttributeStats('{"phil's schema""3","phil's schema""3"}'::pg_catalog.name[],'{"phil's tbl1","phil's tbl1_pkey"}'::pg_catalog.name[])
pgsql-bugs by date: