BUG #4855: Explain errors on drop table if exists

Поиск
Список
Период
Сортировка
От Jim Michaels
Тема BUG #4855: Explain errors on drop table if exists
Дата
Msg-id 200906160658.n5G6wCh5049372@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4855: Explain errors on drop table if exists  (Frank Heikens <frankheikens@mac.com>)
Re: BUG #4855: Explain errors on drop table if exists  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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);

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4854: Problems with replaying WAL files on Warm Standby
Следующее
От: Frank Heikens
Дата:
Сообщение: Re: BUG #4855: Explain errors on drop table if exists