BUG #4901: Column name "window" breaks pg_dump/pg_restore - Mailing list pgsql-bugs

From Steve Purcell
Subject BUG #4901: Column name "window" breaks pg_dump/pg_restore
Date
Msg-id 200907051258.n65Cwi1x034109@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4901: Column name "window" breaks pg_dump/pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4901
Logged by:          Steve Purcell
Email address:      steve@sanityinc.com
PostgreSQL version: 8.4.0
Operating system:   Linux (Debian Unstable)
Description:        Column name "window" breaks pg_dump/pg_restore
Details:

The DB schema for openx (openx.org) contains a table with a column called
"window", which now causes a syntax error if unquoted.  pg_dump doesn't
quote the column, so pg_restore/psql fail on the pg_dump output.  Here's
what pg_dump spits out for the table:


CREATE TABLE ox_data_bkt_a (
    server_conv_id bigint NOT NULL,
    server_ip character varying(16) DEFAULT ''::character varying NOT NULL,
    tracker_id integer NOT NULL,
    date_time timestamp without time zone,
    action_date_time timestamp without time zone,
    creative_id integer NOT NULL,
    zone_id integer NOT NULL,
    ip_address character varying(16) DEFAULT ''::character varying NOT
NULL,
    action integer,
    window integer,
    status integer
);

....

COPY ox_data_bkt_a (server_conv_id, server_ip, tracker_id, date_time,
action_date_time, creative_id, zone_id, ip_a
ddress, action, window, status) FROM stdin;

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4899: Open parenthesis breaks query plan
Next
From: Tom Lane
Date:
Subject: Re: BUG #4901: Column name "window" breaks pg_dump/pg_restore