Skip to content

Commit 45d8f61

Browse files
author
Michael Meskes
committed
Added more compat stuff ot the parser.
1 parent 2c91493 commit 45d8f61

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,15 @@ Mon Jul 14 09:34:04 CEST 2003
15781578

15791579
Tue Jul 15 14:28:53 CEST 2003
15801580

1581-
_ Started to add error codes for backend error messages.
1581+
- Started to add error codes for backend error messages.
1582+
1583+
Thu Jul 17 09:15:59 CEST 2003
1584+
1585+
- Fixed some bugs in informix compat functions.
1586+
1587+
Fri Jul 18 16:31:10 CEST 2003
1588+
1589+
- Added some more compatibility features to the parser.
15821590
- Set ecpg version to 3.0.0
15831591
- Set ecpg library to 4.0.0
15841592
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.12 2003/07/17 11:27:55 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.13 2003/07/18 14:32:56 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -354,17 +354,14 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
354354
{
355355
case ECPGt_short:
356356
case ECPGt_unsigned_short:
357-
/* ((short *) ind)[act_tuple] = variable->len;*/
358357
*((short *) (ind + offset * act_tuple)) = variable->len;
359358
break;
360359
case ECPGt_int:
361360
case ECPGt_unsigned_int:
362-
/* ((int *) ind)[act_tuple] = variable->len;*/
363361
*((int *) (ind + offset * act_tuple)) = variable->len;
364362
break;
365363
case ECPGt_long:
366364
case ECPGt_unsigned_long:
367-
/* ((long *) ind)[act_tuple] = variable->len;*/
368365
*((long *) (ind + offset * act_tuple)) = variable->len;
369366
break;
370367
#ifdef HAVE_LONG_LONG_INT_64

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.248 2003/07/14 12:18:25 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.249 2003/07/18 14:32:56 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -1818,12 +1818,24 @@ TruncateStmt: TRUNCATE opt_table qualified_name
18181818
*
18191819
*****************************************************************************/
18201820

1821+
/* This is different from the backend as we try to be compatible with many other
1822+
* embedded SQL implementations. So we accept their syntax as well and
1823+
* translate it to the PGSQL syntax. */
1824+
18211825
FetchStmt: FETCH fetch_direction from_in name ecpg_into_using
18221826
{ $$ = cat_str(4, make_str("fetch"), $2, $3, $4); }
1827+
| FETCH fetch_direction name ecpg_into_using
1828+
{ $$ = cat_str(4, make_str("fetch"), $2, make_str("from"), $3); }
1829+
| FETCH from_in name ecpg_into_using
1830+
{ $$ = cat_str(3, make_str("fetch"), $2, $3); }
18231831
| FETCH name ecpg_into_using
18241832
{ $$ = cat2_str(make_str("fetch"), $2); }
18251833
| FETCH fetch_direction from_in name
18261834
{ $$ = cat_str(4, make_str("fetch"), $2, $3, $4); }
1835+
| FETCH fetch_direction name
1836+
{ $$ = cat_str(4, make_str("fetch"), $2, make_str("from"), $3); }
1837+
| FETCH from_in name
1838+
{ $$ = cat_str(3, make_str("fetch"), $2, $3); }
18271839
| FETCH name
18281840
{ $$ = cat2_str(make_str("fetch"), $2); }
18291841
| MOVE fetch_direction from_in name
@@ -1832,8 +1844,7 @@ FetchStmt: FETCH fetch_direction from_in name ecpg_into_using
18321844
{ $$ = cat2_str(make_str("move"), $2); }
18331845
;
18341846

1835-
fetch_direction: /* EMPTY */ { $$ = EMPTY; }
1836-
| NEXT { $$ = make_str("next"); }
1847+
fetch_direction: NEXT { $$ = make_str("next"); }
18371848
| PRIOR { $$ = make_str("prior"); }
18381849
| FIRST_P { $$ = make_str("first"); }
18391850
| LAST_P { $$ = make_str("last"); }
@@ -1853,7 +1864,7 @@ fetch_count: IntConst { $$ = $1; }
18531864
;
18541865

18551866
from_in: IN_P { $$ = make_str("in"); }
1856-
| FROM { $$ = make_str("from"); }
1867+
| FROM { $$ = make_str("from"); }
18571868
;
18581869

18591870
/*****************************************************************************

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy