Skip site navigation (1) Skip section navigation (2)

Re: BUG #1214: ecpg regression in 8.0.0beta1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "R(dot) Scott Bailey" <scott(dot)bailey(at)eds(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: BUG #1214: ecpg regression in 8.0.0beta1
Date: 2004-08-11 22:51:59
Message-ID: 20938.1092264719@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> The following code snippet does not compile under 8.0.0beta1:

> exec sql CREATE TEMPORARY TABLE OverallData (Class, Parameter, DataVal)
>   AS SELECT Class, Paramter, SUM(DataVal)
>   FROM PatrolData JOIN Metrics ON Parameter = MetricName
>   WHERE Aggregate = 1
>   GROUP BY Class, Parameter, RSBMIN(Tstamp) ;

Looks like a slip-up in copying a change from the main grammar.  I've
applied the attached patch to fix it.  Thanks for the report!

			regards, tom lane

*** src/interfaces/ecpg/preproc/preproc.y.orig	Wed Jul 21 18:40:54 2004
--- src/interfaces/ecpg/preproc/preproc.y	Wed Aug 11 18:30:40 2004
***************
*** 1546,1559 ****
   * SELECT ... INTO.
   */
  
! CreateAsStmt:  CREATE OptTemp TABLE qualified_name OptCreateAs WithOidsAs AS
  		{ FoundInto = 0; }
  		SelectStmt
  		{
  			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, make_str("as"), $9);
  		}
  		;
  
--- 1546,1559 ----
   * SELECT ... INTO.
   */
  
! CreateAsStmt:  CREATE OptTemp TABLE qualified_name OptCreateAs WithOidsAs
  		{ FoundInto = 0; }
  		SelectStmt
  		{
  			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);
  		}
  		;
  

In response to

Responses

pgsql-bugs by date

Next:From: anthony.cadutoDate: 2004-08-11 23:16:27
Subject: pg_restore many errors
Previous:From: Clifford ClarkDate: 2004-08-11 22:08:20
Subject: 8.0.0 beta failed to build on mac os x

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group