Skip site navigation (1) Skip section navigation (2)

Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hartmut Goebel" <h(dot)goebel(at)goebel-consult(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date: 2010-06-03 14:15:38
Message-ID: 24266.1275574538@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Hartmut Goebel" <h(dot)goebel(at)goebel-consult(dot)de> writes:
> If a 8.3 table contains a column named "window", the dump can not be
> restored into a 8.4 database. Reasons: a) "window" is a new keyword in 8.4
> b) pg_dump does not quote column names.

This is one of the cases where it's helpful to use the newer version's
pg_dump.

> Solution: pg_dump should quote *all* column-names, no matter if they are
> keywords or not.

That was considered and rejected long ago.  Readability of the dump
script is something that we put a nonzero value on.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2010-06-03 14:16:55
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Previous:From: Bruce MomjianDate: 2010-06-03 14:13:20
Subject: Re: BUG #5364: citext behavior when type not in public schema

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group