My patches

Started by Michael Meskesover 27 years ago2 messages
#1Michael Meskes
meskes@usa.net
2 attachment(s)

Hmm, I start wondering if my email goes through or not. So I send the
remaining patches to this list instead of the hackers list so I can check
whether I get them back. I have the feeling some of my mail simply doesn't
make it through. Could that be? Do we have to send email from the subscribed
address? I'm pretty sure some of my comments didn't make it into my mailbox.

Anyway, I include two patches, one fixing the remaining bugs in ecpg, one
with an improvement to the docs.

And I CC this to Marc (hope you don't mind) just to check it.

Michael
--
Dr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!
Senior-Consultant | business: Michael.Meskes@mummert.de | Go Rhein Fire!
Mummert+Partner | private: Michael.Meskes@usa.net | Use Debian
Unternehmensberatung AG | Michael.Meskes@gmx.net | GNU/Linux!

Attachments:

patch.ecpgtext/plain; charset=iso-8859-1Download
diff -rcN ecpg/ChangeLog ecpg.mm/ChangeLog
*** ecpg/ChangeLog	Sat Aug 29 08:19:34 1998
--- ecpg.mm/ChangeLog	Thu Sep 17 19:23:47 1998
***************
*** 311,313 ****
--- 311,339 ----
  	- Removed one line of code that AIX complains about since it was not
  	  needed anyway
  	- Set library version to 2.6.1
+ 
+ Mon Aug 31 09:40:04 CEST 1998
+ 
+ 	- Minor patch to Makefile
+ 	- Put pgc.l in sync with scan.l
+ 
+ Tue Sep  1 11:31:05 CEST 1998
+ 
+ 	- Fixed another bug in preproc.y
+ 
+ Thu Sep  3 12:21:16 CEST 1998
+ 
+ 	- Sync preproc.y with gram.y
+ 
+ Mon Sep 14 09:21:02 CEST 1998
+ 
+ 	- Sync preproc.y with gram.y yet again
+ 
+ Thu Sep 17 08:55:33 CEST 1998
+ 
+ 	- Synced preproc.y and gram.y one more time
+ 
+ Thu Sep 17 19:23:24 CEST 1998
+ 
+ 	- Added missing ´;´ in preproc.y
+ 	- Set version to 2.4.2
diff -rcN ecpg/preproc/Makefile ecpg.mm/preproc/Makefile
*** ecpg/preproc/Makefile	Tue Aug 25 19:11:38 1998
--- ecpg.mm/preproc/Makefile	Mon Sep 14 09:20:32 1998
***************
*** 3,9 ****
  
  MAJOR_VERSION=2
  MINOR_VERSION=4
! PATCHLEVEL=1
  
  CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
  	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
--- 3,9 ----
  
  MAJOR_VERSION=2
  MINOR_VERSION=4
! PATCHLEVEL=2
  
  CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
  	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
***************
*** 26,31 ****
--- 26,35 ----
  # Rule that really do something.
  ecpg: $(OBJ)
  	$(CC) -o ecpg $(OBJ) $(LEXLIB)
+ 
+ pgc.c: pgc.l
+ 	$(LEX) $<
+ 	mv lex.yy.c pgc.c
  
  y.tab.h y.tab.c: preproc.y
  	$(YACC) $(YFLAGS) $<
diff -rcN ecpg/preproc/keywords.c ecpg.mm/preproc/keywords.c
*** ecpg/preproc/keywords.c	Tue Sep  1 06:46:11 1998
--- ecpg.mm/preproc/keywords.c	Mon Sep 14 09:22:28 1998
***************
*** 150,155 ****
--- 150,156 ----
  	{"notnull", NOTNULL},
  	{"null", NULL_P},
  	{"numeric", NUMERIC},
+ 	{"of", OF},
  	{"oids", OIDS},
  	{"on", ON},
  	{"operator", OPERATOR},
diff -rcN ecpg/preproc/pgc.l ecpg.mm/preproc/pgc.l
*** ecpg/preproc/pgc.l	Tue Sep  1 06:46:11 1998
--- ecpg.mm/preproc/pgc.l	Tue Sep  1 11:28:18 1998
***************
*** 340,345 ****
--- 340,348 ----
  						if (isascii((unsigned char)yytext[i]) && isupper(yytext[i]))
  							yytext[i] = tolower(yytext[i]);
  
+ 					if (i >= NAMEDATALEN)
+ 						yytext[NAMEDATALEN-1] = '\0';
+ 
  					keyword = ScanKeywordLookup((char*)yytext);
  					if (keyword != NULL) {
  						return keyword->value;
***************
*** 477,482 ****
--- 480,488 ----
  					for(i = 0; yytext[i]; i++)
  						if (isascii((unsigned char)yytext[i]) && isupper(yytext[i]))
  							yytext[i] = tolower(yytext[i]);
+ 
+ 					if (i >= NAMEDATALEN)
+ 						yytext[NAMEDATALEN-1] = '\0';
  
  					keyword = ScanKeywordLookup((char*)yytext);
  					if (keyword != NULL) {
diff -rcN ecpg/preproc/preproc.y ecpg.mm/preproc/preproc.y
*** ecpg/preproc/preproc.y	Tue Sep  1 06:46:14 1998
--- ecpg.mm/preproc/preproc.y	Thu Sep 17 19:23:09 1998
***************
*** 528,534 ****
  %token		TYPECAST
  
  /* Keywords (in SQL92 reserved words) */
! %token  ACTION, ADD, ALL, ALTER, AND, ANY AS, ASC,
                  BEGIN_TRANS, BETWEEN, BOTH, BY,
                  CASCADE, CAST, CHAR, CHARACTER, CHECK, CLOSE, COLLATE, COLUMN, COMMIT, 
                  CONSTRAINT, CREATE, CROSS, CURRENT, CURRENT_DATE, CURRENT_TIME, 
--- 528,534 ----
  %token		TYPECAST
  
  /* Keywords (in SQL92 reserved words) */
! %token  ABSOLUTE, ACTION, ADD, ALL, ALTER, AND, ANY AS, ASC,
                  BEGIN_TRANS, BETWEEN, BOTH, BY,
                  CASCADE, CAST, CHAR, CHARACTER, CHECK, CLOSE, COLLATE, COLUMN, COMMIT, 
                  CONSTRAINT, CREATE, CROSS, CURRENT, CURRENT_DATE, CURRENT_TIME, 
***************
*** 537,550 ****
                  END_TRANS, EXECUTE, EXISTS, EXTRACT,
                  FETCH, FLOAT, FOR, FOREIGN, FROM, FULL,
                  GRANT, GROUP, HAVING, HOUR_P,
!                 IN, INNER_P, INSERT, INTERVAL, INTO, IS,
                  JOIN, KEY, LANGUAGE, LEADING, LEFT, LIKE, LOCAL,
                  MATCH, MINUTE_P, MONTH_P, NAMES,
!                 NATIONAL, NATURAL, NCHAR, NO, NOT, NOTIFY, NULL_P, NUMERIC,
!                 ON, OPTION, OR, ORDER, OUTER_P,
!                 PARTIAL, POSITION, PRECISION, PRIMARY, PRIVILEGES, PROCEDURE, PUBLIC,
!                 REFERENCES, REVOKE, RIGHT, ROLLBACK,
!                 SECOND_P, SELECT, SET, SUBSTRING,
                  TABLE, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE,
  		TO, TRAILING, TRANSACTION, TRIM,
                  UNION, UNIQUE, UPDATE, USER, USING,
--- 537,550 ----
                  END_TRANS, EXECUTE, EXISTS, EXTRACT,
                  FETCH, FLOAT, FOR, FOREIGN, FROM, FULL,
                  GRANT, GROUP, HAVING, HOUR_P,
!                 IN, INNER_P, INSENSITIVE, INSERT, INTERVAL, INTO, IS,
                  JOIN, KEY, LANGUAGE, LEADING, LEFT, LIKE, LOCAL,
                  MATCH, MINUTE_P, MONTH_P, NAMES,
!                 NATIONAL, NATURAL, NCHAR, NEXT, NO, NOT, NOTIFY, NULL_P, NUMERIC,
!                 OF, ON, ONLY, OPTION, OR, ORDER, OUTER_P,
!                 PARTIAL, POSITION, PRECISION, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC,
!                 READ, REFERENCES, RELATIVE, REVOKE, RIGHT, ROLLBACK,
!                 SCROLL, SECOND_P, SELECT, SET, SUBSTRING,
                  TABLE, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE,
  		TO, TRAILING, TRANSACTION, TRIM,
                  UNION, UNIQUE, UPDATE, USER, USING,
***************
*** 620,626 ****
  %type  <str> 	ColId default_expr ColQualifier columnDef ColQualList
  %type  <str>    ColConstraint ColConstraintElem default_list NumericOnly FloatOnly
  %type  <str>    OptTableElementList OptTableElement TableConstraint
! %type  <str>    ConstraintElem key_actions constraint_list
  %type  <str>    res_target_list res_target_el res_target_list2
  %type  <str>    res_target_el2 opt_id relation_name database_name
  %type  <str>    access_method attr_name class index_name name func_name
--- 620,626 ----
  %type  <str> 	ColId default_expr ColQualifier columnDef ColQualList
  %type  <str>    ColConstraint ColConstraintElem default_list NumericOnly FloatOnly
  %type  <str>    OptTableElementList OptTableElement TableConstraint
! %type  <str>    ConstraintElem key_actions constraint_list ColPrimaryKey
  %type  <str>    res_target_list res_target_el res_target_list2
  %type  <str>    res_target_el2 opt_id relation_name database_name
  %type  <str>    access_method attr_name class index_name name func_name
***************
*** 667,672 ****
--- 667,673 ----
  %type  <str>    ViewStmt LoadStmt CreatedbStmt opt_database1 opt_database2 location
  %type  <str>    DestroydbStmt ClusterStmt grantee RevokeStmt encoding
  %type  <str>	GrantStmt privileges operation_commalist operation
+ %type  <str>	cursor_clause, opt_cursor, opt_readonly, opt_of
  
  %type  <str>	ECPGWhenever ECPGConnect connection_target ECPGOpen open_opts
  %type  <str>	indicator ECPGExecute ecpg_expr dotext
***************
*** 1083,1091 ****
  				{
  					$$ = cat3_str($1, $2, $3);
  				}
! 	| ColId SERIAL
  		{
! 			$$ = make2_str($1, make1_str(" serial"));
  		}
  		;
  
--- 1084,1092 ----
  				{
  					$$ = cat3_str($1, $2, $3);
  				}
! 	| ColId SERIAL ColPrimaryKey
  		{
! 			$$ = make3_str($1, make1_str(" serial "), $3);
  		}
  		;
  
***************
*** 1097,1102 ****
--- 1098,1113 ----
  			| ColConstraint		{ $$ = $1; }
  		;
  
+ ColPrimaryKey:  PRIMARY KEY
+                 {
+ 			$$ = make1_str("primary key");
+                 }
+               | /*EMPTY*/
+ 		{
+ 			$$ = make1_str("");
+ 		}
+                 ;
+ 
  ColConstraint:
  		CONSTRAINT name ColConstraintElem
  				{
***************
*** 1106,1115 ****
--- 1117,1145 ----
  				{ $$ = $1; }
  		;
  
+ /* The column constraint WITH NULL gives a shift/reduce error
+  * because it requires yacc to look more than one token ahead to
+  * resolve WITH TIME ZONE and WITH NULL.
+  * So, leave it out of the syntax for now.
+                        | WITH NULL_P
+                                {
+                                        $$ = NULL;
+                                }
+  * - thomas 1998-09-12
+  *
+  * DEFAULT NULL is already the default for Postgres.
+  * Bue define it here and carry it forward into the system
+  * to make it explicit.
+  * - thomas 1998-09-13
+  */
  ColConstraintElem:  CHECK '(' constraint_expr ')'
  				{
  					$$ = make3_str(make1_str("check("), $3, make1_str(")"));
  				}
+ 			| DEFAULT NULL_P
+ 				{
+ 					$$ = make1_str("default null");
+ 				}
  			| DEFAULT default_expr
  				{
  					$$ = cat2_str(make1_str("default"), $2);
***************
*** 1143,1152 ****
  				}
  		;
  
  default_expr:  AexprConst
  				{	$$ = $1; }
- 			| NULL_P
- 				{	$$ = make1_str("null"); }
  			| '-' default_expr %prec UMINUS
  				{	$$ = cat2_str(make1_str("-"), $2); }
  			| default_expr '+' default_expr
--- 1173,1188 ----
  				}
  		;
  
+ /* The Postgres default column value is NULL.
+  * Rather than carrying DEFAULT NULL forward as a clause,
+  * let's just have it be a no-op.
+                         | NULL_P
+ 				{	$$ = make1_str("null"); }
+  * - thomas 1998-09-13
+  */
+ 
  default_expr:  AexprConst
  				{	$$ = $1; }
  			| '-' default_expr %prec UMINUS
  				{	$$ = cat2_str(make1_str("-"), $2); }
  			| default_expr '+' default_expr
***************
*** 1559,1565 ****
  		;
  
  TriggerFuncArgs:  TriggerFuncArg
! 				{ $$ = $1 }
  			| TriggerFuncArgs ',' TriggerFuncArg
  				{ $$ = cat3_str($1, make1_str(","), $3); }
  			| /*EMPTY*/
--- 1595,1601 ----
  		;
  
  TriggerFuncArgs:  TriggerFuncArg
! 				{ $$ = $1; }
  			| TriggerFuncArgs ',' TriggerFuncArg
  				{ $$ = cat3_str($1, make1_str(","), $3); }
  			| /*EMPTY*/
***************
*** 1667,1678 ****
  /*****************************************************************************
   *
   *		QUERY:
!  *			fetch/move [forward | backward] [number | all ] [ in <portalname> ]
   *
   *****************************************************************************/
  
  FetchStmt:	FETCH opt_direction fetch_how_many opt_portal_name INTO into_list
  				{
  					$$ = cat4_str(make1_str("fetch"), $2, $3, $4);
  				}
  		|	MOVE opt_direction fetch_how_many opt_portal_name
--- 1703,1719 ----
  /*****************************************************************************
   *
   *		QUERY:
!  *                     fetch/move [forward | backward] [ # | all ] [ in <portalname> ]
!  *                     fetch [ forward | backward | absolute | relative ]
!  *                           [ # | all | next | prior ] [ [ in | from ] <portalname> ]
   *
   *****************************************************************************/
  
  FetchStmt:	FETCH opt_direction fetch_how_many opt_portal_name INTO into_list
  				{
+ 					if (strncmp($2, "relative", strlen("relative")) == 0 && atol($3) == 0L)
+ 						yyerror("FETCH/RELATIVE at current position is not supported");
+ 
  					$$ = cat4_str(make1_str("fetch"), $2, $3, $4);
  				}
  		|	MOVE opt_direction fetch_how_many opt_portal_name
***************
*** 1683,1700 ****
  
  opt_direction:	FORWARD		{ $$ = make1_str("forward"); }
  		| BACKWARD	{ $$ = make1_str("backward"); }
  		| /*EMPTY*/	{ $$ = make1_str(""); /* default */ }
  		;
  
! fetch_how_many:  Iconst
! 			   { $$ = $1;
! 				 if (atol($1) <= 0) yyerror("Please specify nonnegative count for fetch"); }
  		| ALL		{ $$ = make1_str("all"); }
  		| /*EMPTY*/	{ $$ = make1_str(""); /*default*/ }
  		;
  
  opt_portal_name:  IN name		{ $$ = cat2_str(make1_str("in"), $2); }
! 		| name			{ $$ = cat2_str(make1_str("in"), $1); }
  		| /*EMPTY*/		{ $$ = make1_str(""); }
  		;
  
--- 1724,1749 ----
  
  opt_direction:	FORWARD		{ $$ = make1_str("forward"); }
  		| BACKWARD	{ $$ = make1_str("backward"); }
+ 		| RELATIVE      { $$ = make1_str("relative"); }
+                 | ABSOLUTE
+  				{
+ 					fprintf(stderr, "FETCH/ABSOLUTE not supported, using RELATIVE");
+ 					$$ = make1_str("absolute");
+ 				}
  		| /*EMPTY*/	{ $$ = make1_str(""); /* default */ }
  		;
  
! fetch_how_many:   Iconst        { $$ = $1; }
! 		| '-' Iconst    { $$ = make2_str(make1_str("-"), $2); }
  		| ALL		{ $$ = make1_str("all"); }
+ 		| NEXT		{ $$ = make1_str("next"); }
+ 		| PRIOR		{ $$ = make1_str("prior"); }
  		| /*EMPTY*/	{ $$ = make1_str(""); /*default*/ }
  		;
  
  opt_portal_name:  IN name		{ $$ = cat2_str(make1_str("in"), $2); }
! 		| FROM name		{ $$ = cat2_str(make1_str("from"), $2); }
! /*		| name			{ $$ = cat2_str(make1_str("in"), $1); */
  		| /*EMPTY*/		{ $$ = make1_str(""); }
  		;
  
***************
*** 2328,2333 ****
--- 2377,2386 ----
  				{
  					$$ = make3_str(make1_str("values("), $3, make1_str(")"));
  				}
+ 		| DEFAULT VALUES
+ 				{
+ 					$$ = make1_str("default values");
+ 				}
  		| SELECT opt_unique res_target_list2
  			 from_clause where_clause
  			 group_clause having_clause
***************
*** 2404,2414 ****
   *				CURSOR STATEMENTS
   *
   *****************************************************************************/
! CursorStmt:  DECLARE name opt_binary CURSOR FOR
   			 SELECT opt_unique res_target_list2
  			 from_clause where_clause
  			 group_clause having_clause
  			 union_clause sort_clause
  				{
  					struct cursor *ptr, *this;
  	
--- 2457,2468 ----
   *				CURSOR STATEMENTS
   *
   *****************************************************************************/
! CursorStmt:  DECLARE name opt_cursor CURSOR FOR
   			 SELECT opt_unique res_target_list2
  			 from_clause where_clause
  			 group_clause having_clause
  			 union_clause sort_clause
+ 			 cursor_clause
  				{
  					struct cursor *ptr, *this;
  	
***************
*** 2438,2444 ****
--- 2492,2517 ----
  				}
  		;
  
+ opt_cursor:  BINARY             { $$ = make1_str("binary"); }
+                | INSENSITIVE	{ $$ = make1_str("insensitive"); }
+                | SCROLL         { $$ = make1_str("scroll"); }
+                | INSENSITIVE SCROLL	{ $$ = make1_str("insensitive scroll"); }
+                | /*EMPTY*/      { $$ = make1_str(""); }
+                ;
+ 
+ cursor_clause:  FOR opt_readonly	{ $$ = cat2_str(make1_str("for"), $2); }
+                | /*EMPTY*/              { $$ = make1_str(""); }
+ 
+                ;
+ 
+ opt_readonly:  READ ONLY		{ $$ = make1_str("read only"); }
+                | UPDATE opt_of
+                        {
+                                yyerror("DECLARE/UPDATE not supported; Cursors must be READ ONLY.");
+                        }
+                ;
  
+ opt_of:  OF columnList { $$ = make2_str(make1_str("of"), $2); }
  
  /*****************************************************************************
   *
***************
*** 3776,3781 ****
--- 3849,3855 ----
   */
  ColId:  ident							{ $$ = $1; }
  		| datetime						{ $$ = $1; }
+ 		| ABSOLUTE						{ $$ = make1_str("absolute"); }
  		| ACTION						{ $$ = make1_str("action"); }
  		| CACHE							{ $$ = make1_str("cache"); }
  		| CYCLE							{ $$ = make1_str("cycle"); }
***************
*** 3787,3804 ****
  		| FUNCTION						{ $$ = make1_str("function"); }
  		| INCREMENT						{ $$ = make1_str("increment"); }
  		| INDEX							{ $$ = make1_str("index"); }
  		| KEY							{ $$ = make1_str("key"); }
  		| LANGUAGE						{ $$ = make1_str("language"); }
  		| LOCATION						{ $$ = make1_str("location"); }
  		| MATCH							{ $$ = make1_str("match"); }
  		| MAXVALUE						{ $$ = make1_str("maxvalue"); }
  		| MINVALUE						{ $$ = make1_str("minvalue"); }
  		| OPERATOR						{ $$ = make1_str("operator"); }
  		| OPTION						{ $$ = make1_str("option"); }
  		| PASSWORD						{ $$ = make1_str("password"); }
! 		| PRIVILEGES					{ $$ = make1_str("privileges"); }
  		| RECIPE						{ $$ = make1_str("recipe"); }
  		| ROW							{ $$ = make1_str("row"); }
  		| SERIAL						{ $$ = make1_str("serial"); }
  		| START							{ $$ = make1_str("start"); }
  		| STATEMENT						{ $$ = make1_str("statement"); }
--- 3861,3886 ----
  		| FUNCTION						{ $$ = make1_str("function"); }
  		| INCREMENT						{ $$ = make1_str("increment"); }
  		| INDEX							{ $$ = make1_str("index"); }
+ 		| INSENSITIVE						{ $$ = make1_str("insensitive"); }
  		| KEY							{ $$ = make1_str("key"); }
  		| LANGUAGE						{ $$ = make1_str("language"); }
  		| LOCATION						{ $$ = make1_str("location"); }
  		| MATCH							{ $$ = make1_str("match"); }
  		| MAXVALUE						{ $$ = make1_str("maxvalue"); }
  		| MINVALUE						{ $$ = make1_str("minvalue"); }
+ 		| NEXT							{ $$ = make1_str("next"); }
+ 		| OF							{ $$ = make1_str("of"); }
+ 		| ONLY							{ $$ = make1_str("only"); }
  		| OPERATOR						{ $$ = make1_str("operator"); }
  		| OPTION						{ $$ = make1_str("option"); }
  		| PASSWORD						{ $$ = make1_str("password"); }
! 		| PRIOR							{ $$ = make1_str("prior"); }
! 		| PRIVILEGES						{ $$ = make1_str("privileges"); }
! 		| READ							{ $$ = make1_str("read"); }
  		| RECIPE						{ $$ = make1_str("recipe"); }
+ 		| RELATIVE						{ $$ = make1_str("relative"); }
  		| ROW							{ $$ = make1_str("row"); }
+ 		| SCROLL						{ $$ = make1_str("scroll"); }
  		| SERIAL						{ $$ = make1_str("serial"); }
  		| START							{ $$ = make1_str("start"); }
  		| STATEMENT						{ $$ = make1_str("statement"); }
***************
*** 4006,4012 ****
                                 switch(dimension)
                                 {
                                    case 0:
!                                       strcpy("[]", dim);
                                        break;
                                    case 1:
                                        *dim = '\0';
--- 4088,4094 ----
                                 switch(dimension)
                                 {
                                    case 0:
!                                       strcpy(dim, "[]");
                                        break;
                                    case 1:
                                        *dim = '\0';
patch.sgmltext/plain; charset=iso-8859-1Download
*** ecpg.sgml	Wed Jul 29 08:57:13 1998
--- /home/postgres/pg-mm/ecpg.sgml	Fri Sep 18 09:10:29 1998
***************
*** 45,59 ****
  from variables in your <Acronym>C</Acronym> program. Many <Acronym>RDBMS</Acronym> packages
  support this embedded language.
  
! <Para>
! There is an ANSI-standard describing how the embedded language should
! work. Most embedded <Acronym>SQL</Acronym> preprocessors I have seen and heard of make
! extensions so it is difficult to obtain portability between them
! anyway. I have not read the standard but I hope that my implementation
! does not deviate too much and that it would be possible to port programs
! with embedded <Acronym>SQL</Acronym> written for other <Acronym>RDBMS</Acronym> packages 
! to <ProductName>Postgres</ProductName> and thus
! promoting the spirit of free software.
  
  <Sect1>
  <Title>The Concept</Title>
--- 45,56 ----
  from variables in your <Acronym>C</Acronym> program. Many <Acronym>RDBMS</Acronym> packages
  support this embedded language.
  
! <Para> There is an ANSI-standard describing how the embedded language should
! work. <Application>ecpg</Application> was designed to meet this standard as much as possible. So it is
! possible to port programs with embedded <Acronym>SQL</Acronym> written for
! other <Acronym>RDBMS</Acronym> packages to
! <ProductName>Postgres</ProductName> and thus promoting the spirit of free
! software.
  
  <Sect1>
  <Title>The Concept</Title>
***************
*** 432,456 ****
  
  <VariableList>
  <VarListEntry>
- <Term>Preprocessor output</Term>
- <ListItem>
- <Para>
- The variables should be static.
- </Para>
- </ListItem>
- </VarListEntry>
- 
- <VarListEntry>
- <Term>Preprocessor cannot do syntax checking on your <Acronym>SQL</Acronym> statements</Term>
- <ListItem>
- <Para>
- Whatever you write is copied more or less exactly to the <ProductName>Postgres</ProductName> and
- you will not be able to locate your errors until run-time.
- </Para>
- </ListItem>
- </VarListEntry>
- 
- <VarListEntry>
  <Term>no restriction to strings only</Term>
  <ListItem>
  <Para>
--- 429,434 ----
***************
*** 485,535 ****
  <Term>records</Term>
  <ListItem>
  <Para>
! Possibility to define records or structures in the declare section
! in a way that the record can be filled from one row in the database.
  
- <Para>
- This is a simpler way to handle an entire row at a time.
- </Para>
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>array operations</Term>
  <ListItem>
  <Para>
! Oracle has array operations that enhances speed. When implementing it in
! <Application>ecpg</Application> it is done for compatibility reasons only. For them to
! improve speed would require a lot more insight in the <ProductName>Postgres</ProductName> internal
! mechanisms than I possess.
  </Para>
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>indicator variables</Term>
  <ListItem>
  <Para>
! Oracle has indicator variables that tell if a value is <Type>null</Type> or if
! it is empty. This largely simplifies array operations and provides for a
! way to hack around some design flaws in the handling of <Type>VARCHAR2</Type>
! (like that an empty string isn't distinguishable from a
! <Type>null</Type> value). I am not sure if this is an Oracle extension or part
! of the ANSI standard.
  </Para>
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>typedefs</Term>
  <ListItem>
  <Para>
! As well as complex types like records and arrays, typedefs would be
! a good thing to take care of.
  </Para>
  </ListItem>
  </VarListEntry>
- 
  <VarListEntry>
  <Term>conversion of scripts</Term>
  <ListItem>
--- 463,521 ----
  <Term>records</Term>
  <ListItem>
  <Para>
! Records or structures have to be defined in the declare section.
  
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>missing statements</Term>
  <ListItem>
  <Para>
! The following statements are not implemented thus far:
! <VariableList>
! <VarListEntry>
! <Term> exec sql type</Term>
! </VarListEntry>
! <VarListEntry>
! <Term> exec sql prepare</Term>
! </VarListEntry>
! <VarListEntry>
! <Term> exec sql allocate</Term>
! </VarListEntry>
! <VarListEntry>
! <Term> exec sql free</Term>
! </VarListEntry>
! <VarListEntry>
! <Term> exec sql whenever sqlwarning</Term>
! </VarListEntry>
! <VarListEntry>
! <Term> SQLSTATE</Term>
! </VarListEntry>
! </VariableList>
  </Para>
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>message ´no data found´</Term>
  <ListItem>
  <Para>
! The error message for "no data" in an exec sql insert select from statement
! has to be 100.
  </Para>
  </ListItem>
  </VarListEntry>
  
  <VarListEntry>
! <Term>sqlwanr[6]</Term>
  <ListItem>
  <Para>
! sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified in a SET
! DESCRIPTOR statement will be ignored.
  </Para>
  </ListItem>
  </VarListEntry>
  <VarListEntry>
  <Term>conversion of scripts</Term>
  <ListItem>
#2The Hermit Hacker
scrappy@hub.org
In reply to: Michael Meskes (#1)
Re: My patches

Applied...

On Sat, 19 Sep 1998, Michael Meskes wrote:

Hmm, I start wondering if my email goes through or not. So I send the
remaining patches to this list instead of the hackers list so I can check
whether I get them back. I have the feeling some of my mail simply doesn't
make it through. Could that be? Do we have to send email from the subscribed
address? I'm pretty sure some of my comments didn't make it into my mailbox.

Anyway, I include two patches, one fixing the remaining bugs in ecpg, one
with an improvement to the docs.

And I CC this to Marc (hope you don't mind) just to check it.

Michael
--
Dr. Michael Meskes | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!
Senior-Consultant | business: Michael.Meskes@mummert.de | Go Rhein Fire!
Mummert+Partner | private: Michael.Meskes@usa.net | Use Debian
Unternehmensberatung AG | Michael.Meskes@gmx.net | GNU/Linux!

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org