Re: [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax
Дата
Msg-id ad45d787696f630b9efef02d4b7136c7721c72ee.camel@postgresql.org
обсуждение исходный текст
Ответ на [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax  ("Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>)
Ответы RE: [Bug Fix] ECPG: could not use some CREATE TABLE AS syntax  ("Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>)
Список pgsql-hackers
Higuchi-san,

> I found some "CREATE TABLE ... AS ... " syntaxes could not be used in
> ECPG. 
> ...
> [Investigation]
> In my investigation, parse.pl ignore type CreateAsStmt of gram.y and
> CreateAsStmt is defined in ecpg.trailer. ECPG use ecpg.trailer's
> CreateAsStmt. However, ecpg.trailer lacks some syntaxes. 

Correct, the syntax of create as statement was changed and those
changes have not been added to ecpg.

> I feel ignoring type CreateAsStmt of gram.y is strange. Seeing
> ecpg.trailer, it seems that ECPG wanted to output the message "CREATE
> TABLE AS cannot specify INTO" but is this needed now? In view of the
> maintenance, ECPG should use not ecpg.trailer's definition but
> gram.y's one. 

I beg to disagree, or I don't understand. Why would ecpg's changes to
the statement be wrong nowadays?

> I attached the patch for this and I will register this for next CF. 

I think the patch does not work correctly. The statement
CREATE TABLE a AS SELECT * INTO test FROM a;
is accepted with your patch, but it is not accepted in current ecpg nor
is it accepted by the backend when you execute it through ecpg. The
whole change of this rule has been made to make sure this syntax is not
accepted.

Michael

-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Reporting script runtimes in pg_regress
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: WAL insert delay settings