[pgsql-jp: 34849] Re: PostgreSQL8.0.1のecpg がコアダンプ

TANIDA Yutaka tanida @ sra.co.jp
2005年 2月 9日 (水) 16:32:47 JST


谷田です。

この件は、露骨にバグですね。とりあえずパッチを作っておきました。

#何というか、ecpgはこの手のつまらないバグが多い・・・
##添付ファイル制限に引っかかったorz

On Wed, 09 Feb 2005 14:52:53 +0900
aya <shigeto_aya_za @ mail.toyota.co.jp> wrote:

> 具体的には以下のプログラムです。
> 
> #include <sqlca.h>
> int main(){
>     EXEC SQL create temp table tmptable as select * from atbl;
>     exit(0);
> }
> 
> create temp table 構文はサポートされなくなって
> しまったのでしょうか?

これは"create table as"構文ですね。

-- 
TANIDA Yutaka <tanida @ sra.co.jp>

./src/interfaces/ecpg/preproc/preproc.c
*** ./src/interfaces/ecpg/preproc/preproc.c.orig	2005-02-09 16:13:16.000000000 +0900
--- ./src/interfaces/ecpg/preproc/preproc.c	2005-02-09 16:14:07.000000000 +0900
***************
*** 16841,16847 ****
  			if (FoundInto == 1)
  				mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT may not specify INTO");
  
! 			yyval.str = cat_str(8, make_str("create"), yyvsp[-6].str, make_str("table"), yyvsp[-4].str, yyvsp[-3].str, yyvsp[-2].str, yyvsp[0].str);
  		}
      break;
  
--- 16841,16847 ----
  			if (FoundInto == 1)
  				mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT may not specify INTO");
  
! 			yyval.str = cat_str(7, make_str("create"), yyvsp[-6].str, make_str("table"), yyvsp[-4].str, yyvsp[-3].str, yyvsp[-2].str, yyvsp[0].str);
  		}
      break;
  
./src/interfaces/ecpg/preproc/preproc.y
*** ./src/interfaces/ecpg/preproc/preproc.y.orig	2005-02-09 16:13:08.000000000 +0900
--- ./src/interfaces/ecpg/preproc/preproc.y	2005-02-09 16:13:38.000000000 +0900
***************
*** 1580,1586 ****
  			if (FoundInto == 1)
  				mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT may not specify INTO");
  
! 			$$ = cat_str(8, make_str("create"), $2, make_str("table"), $4, $5, $6, $8);
  		}
  		;
  
--- 1580,1586 ----
  			if (FoundInto == 1)
  				mmerror(PARSE_ERROR, ET_ERROR, "CREATE TABLE / AS SELECT may not specify INTO");
  
! 			$$ = cat_str(7, make_str("create"), $2, make_str("table"), $4, $5, $6, $8);
  		}
  		;
  



pgsql-jp メーリングリストの案内