Thread: 8.0 ecpg crashes with "create table as" statement.
ecpg on 8.0.x crashes while compiling "create table as" statements. For example, #include <sqlca.h> int main(){ EXEC SQL create table a as select 1; exit(0); } Here's a patch attached. -- TANIDA Yutaka <tanida@sra.co.jp>
Attachment
On Wed, Feb 09, 2005 at 04:34:01PM +0900, TANIDA Yutaka wrote: > ecpg on 8.0.x crashes while compiling "create table as" statements. For > example, > ... > Here's a patch attached. Thanks for the report and the patch. I just committed it to CVS HEAD and the 8.0 branch. 7.4 does not suffer from this bug. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
On Wed, 9 Feb 2005 12:27:13 +0100 Michael Meskes <meskes@postgresql.org> wrote: > Thanks for the report and the patch. I just committed it to CVS HEAD and > the 8.0 branch. 7.4 does not suffer from this bug. Probably, "create sequence" and "create domain" have same problems. Here's a patch for preproc.y . It's reported by Atsushi Mitani(mitani@sraw.co.jp) in Japanese ML. ============================================================= --- preproc.y.org 2005-02-07 09:18:44.000000000 +0900 +++ preproc.y 2005-02-10 11:17:03.000000000 +0900 @@ -1621,7 +1621,7 @@ *****************************************************************************/ CreateSeqStmt: CREATE OptTemp SEQUENCE qualified_name OptSeqList - { $$ = cat_str(4, make_str("create"), $2, make_str("sequence"), $4,$5); } + { $$ = cat_str(5, make_str("create"), $2, make_str("sequence"), $4,$5); } ; AlterSeqStmt: ALTER SEQUENCE qualified_name OptSeqList @@ -2705,7 +2705,7 @@ CreateDomainStmt: CREATE DOMAIN_P any_name opt_as Typename ColQualList { - $$ = cat_str(55555, make_str("create domain"), $3, $4, $5, $6); + $$ = cat_str(5, make_str("create domain"), $3, $4, $5, $6); } ; -- TANIDA Yutaka <tanida@sra.co.jp>
On Thu, Feb 10, 2005 at 01:05:18PM +0900, TANIDA Yutaka wrote: > Probably, "create sequence" and "create domain" have same problems. Here's > a patch for preproc.y . Or at least very similar ones. :-) Thanks a lot for the report. Patch committed to CVS HEAD and 8.0 branch. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!