From 9aeb1eff241a6f5954b8428542988cf9a184409b Mon Sep 17 00:00:00 2001
From: Michael Meskes <meskes@postgresql.org>
Date: Sun, 29 Jun 2003 09:25:19 +0000
Subject: [PATCH] Just another sync.

---
 src/interfaces/ecpg/ChangeLog         |  4 ++++
 src/interfaces/ecpg/include/Makefile  |  2 +-
 src/interfaces/ecpg/preproc/preproc.y | 26 +++++++++++++++++++++++---
 3 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 67629d5bea9..0185496fe06 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -1524,6 +1524,10 @@ Thu Jun 26 13:26:13 CEST 2003
 
 	- Added another compatibility level INFORMIX_SE.
 	- Synced again.
+	
+Sun Jun 29 11:22:48 CEST 2003
+
+	- Just another sync.
 	- Set ecpg version to 3.0.0
 	- Set ecpg library to 4.0.0
 	- Set pgtypes library to 1.0.0
diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
index e4c1530f3c7..7320a76c2ea 100644
--- a/src/interfaces/ecpg/include/Makefile
+++ b/src/interfaces/ecpg/include/Makefile
@@ -5,7 +5,7 @@ include $(top_builddir)/src/Makefile.global
 install: all installdirs install-headers
 
 .PHONY: install-headers
-ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informix.h pgtypes_error.h pgtypes_numeric.h pgtypes_timestamp.h pgtypes_date.h datetime.h decimal.h pgtypes_interval.h
+ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informix.h pgtypes_error.h pgtypes_numeric.h pgtypes_timestamp.h pgtypes_date.h datetime.h decimal.h pgtypes_interval.h sqltypes.h
 
 install-headers: $(ecpg_headers)
 	for i in $^; do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); done
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 6b79bd17747..6c6006c175e 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.241 2003/06/27 00:33:26 tgl Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.242 2003/06/29 09:25:19 meskes Exp $ */
 
 /* Copyright comment */
 %{
@@ -1730,7 +1730,7 @@ DropStmt:  DROP drop_type any_name_list opt_drop_behavior
 			{ $$ = cat_str(4, make_str("drop"), $2, $3, $4); }
 		;
 
-drop_type:	TABLE		{ $$ = make_str("table"); }
+drop_type:	TABLE			{ $$ = make_str("table"); }
 		| SEQUENCE		{ $$ = make_str("sequence"); }
 		| VIEW			{ $$ = make_str("view"); }
 		| INDEX			{ $$ = make_str("index"); }
@@ -2177,10 +2177,28 @@ opt_force: FORCE			{ $$ = make_str("force"); }
  *
  *****************************************************************************/
 
-RenameStmt:  ALTER TABLE relation_expr RENAME opt_column opt_name TO name
+RenameStmt:  ALTER AGGREGATE func_name '(' aggr_argtype ')' RENAME TO name
+			{ $$ = cat_str(6, make_str("alter aggregate"), $3, make_str("("), $5, make_str(") rename to"), $9); }
+	| ALTER CONVERSION_P any_name RENAME TO name
+			{ $$ = cat_str(4, make_str("alter conversion"), $3, make_str("rename to"), $6); }
+	| ALTER DATABASE database_name RENAME TO database_name
+			{ $$ = cat_str(4, make_str("alter database"), $3, make_str("rename to"), $6); }
+	| ALTER FUNCTION func_name func_args RENAME TO name
+			{ $$ = cat_str(5, make_str("alter function"), $3, $4, make_str("rename to"), $7); }
+	| ALTER GROUP_P UserId RENAME TO UserId
+			{ $$ = cat_str(4, make_str("alter group"), $3, make_str("rename to"), $6); }
+	| ALTER LANGUAGE name RENAME TO name
+			{ $$ = cat_str(4, make_str("alter language"), $3, make_str("rename to"), $6); }
+	| ALTER OPERATOR CLASS any_name USING access_method RENAME TO name
+			{ $$ = cat_str(6, make_str("alter operator class"), $4, make_str("using"), $6, make_str("rename to"), $9); }
+	| ALTER SCHEMA name RENAME TO name
+			{ $$ = cat_str(4, make_str("alter schema"), $3, make_str("rename to"), $6); }
+	| ALTER TABLE relation_expr RENAME opt_column opt_name TO name
 			{ $$ = cat_str(7, make_str("alter table"), $3, make_str("rename"), $5, $6, make_str("to"), $8); }
 	| ALTER TRIGGER name ON relation_expr RENAME TO name
 			{ $$ = cat_str(6, make_str("alter trigger"), $3, make_str("on"), $5, make_str("rename to"), $8); }
+	| ALTER USER UserId RENAME TO UserId
+			{ $$ = cat_str(4, make_str("alter user"), $3, make_str("rename to"), $6); }
 		;
 
 opt_name:  name				{ $$ = $1; }
@@ -3476,6 +3494,8 @@ a_expr:  c_expr
 			{ $$ = cat_str(3, $1, make_str("not in"), $4); }
 		| a_expr qual_all_Op sub_type select_with_parens %prec Op
 			{ $$ = cat_str(4, $1, $2, $3, $4); }
+		| a_expr qual_all_Op sub_type '(' a_expr ')' %prec Op
+			{ $$ = cat_str(6, $1, $2, $3, make_str("("), $5, make_str(")")); }
 		| UNIQUE select_with_parens %prec Op
 			{ $$ = cat2_str(make_str("unique"), $2); }
 		| r_expr
-- 
GitLab