BUG #4855: Explain errors on drop table if exists

From: "Jim Michaels" <jmichae3(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4855: Explain errors on drop table if exists
Date: 2009-06-16 06:58:12
Message-ID: 200906160658.n5G6wCh5049372@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4855
Logged by: Jim Michaels
Email address: jmichae3(at)yahoo(dot)com
PostgreSQL version: 8.3.7
Operating system: Windows XP Pro Sp3
Description: Explain errors on drop table if exists
Details:

This syntax clearly works in the regular SQL pane and is outlined as
acceptable syntax in the manual.
Using PGAdminIII and the following query, I get this explain error:
Query result with 0 rows will be returned.

ERROR: syntax error at or near "DROP"
LINE 91: DROP TABLE IF EXISTS work;
^

********** Error **********

ERROR: syntax error at or near "DROP"
SQL state: 42601
Character: 2584

DROP TABLE IF EXISTS work;
CREATE TABLE work (
id serial UNIQUE,
name varchar(45) NOT NULL default '',
start_time timestamp NOT NULL default '2000-01-01 00:00:00
America/Vancouver',
end_time timestamp NOT NULL default '2000-01-01 00:00:00
America/Vancouver',
tasknum int default NULL,
prj varchar(45) default NULL,
church int NOT NULL default '0',
satisfied int NOT NULL default '0',
PRIMARY KEY (id)
);
--CREATE UNIQUE INDEX work_pri_id ON work(id);
CREATE INDEX work_name ON work(name);
CREATE INDEX work_start_time ON work(start_time); --sometimes I will be
starting with the start
CREATE INDEX work_end_time ON work(end_time); --most of the time I will be
starting with the end
CREATE INDEX work_tasknum ON work(tasknum);
CREATE INDEX work_prj ON work(prj);

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Frank Heikens 2009-06-16 08:00:02 Re: BUG #4855: Explain errors on drop table if exists
Previous Message Tom Lane 2009-06-15 23:35:07 Re: BUG #4854: Problems with replaying WAL files on Warm Standby