The following bug has been logged online:
Bug reference: 4855
Logged by: Jim Michaels
Email address: jmichae3@yahoo.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);