summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2002-04-26 01:24:08 +0000
committerTom Lane2002-04-26 01:24:08 +0000
commita309032d2fbb02ce43c42b5d4da2dc8328f4bc9e (patch)
treec87966d2c2d436119a9e862035f6245249428c01 /src/include
parentd9375ad564c252832398c35cdec032be2ce95908 (diff)
Add current_schema() and current_schemas() inquiry functions.
Update has_table_privilege functions to cope with schema-qualified names in the same way as nextval() and others.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/namespace.h4
-rw-r--r--src/include/catalog/pg_proc.h13
-rw-r--r--src/include/utils/builtins.h4
4 files changed, 17 insertions, 8 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 28893a9f54a..cf718933365 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.126 2002/04/25 02:56:56 tgl Exp $
+ * $Id: catversion.h,v 1.127 2002/04/26 01:24:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200204242
+#define CATALOG_VERSION_NO 200204251
#endif
diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h
index 6509e61a736..c285977599d 100644
--- a/src/include/catalog/namespace.h
+++ b/src/include/catalog/namespace.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: namespace.h,v 1.10 2002/04/25 02:56:56 tgl Exp $
+ * $Id: namespace.h,v 1.11 2002/04/26 01:24:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -79,4 +79,6 @@ extern bool check_search_path(const char *proposed);
extern void assign_search_path(const char *newval);
extern void InitializeSearchPath(void);
+extern List *fetch_search_path(void);
+
#endif /* NAMESPACE_H */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 8fffef5af1a..35aee3f4342 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.233 2002/04/25 02:56:56 tgl Exp $
+ * $Id: pg_proc.h,v 1.234 2002/04/26 01:24:08 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1751,6 +1751,11 @@ DESCR("convert varchar to name");
DATA(insert OID = 1401 ( varchar PGNSP PGUID 12 f t t t f i 1 1043 "19" 100 0 0 100 name_text - _null_ ));
DESCR("convert name to varchar");
+DATA(insert OID = 1402 ( current_schema PGNSP PGUID 12 f t f t f s 0 19 "0" 100 0 0 100 current_schema - _null_ ));
+DESCR("current schema name");
+DATA(insert OID = 1403 ( current_schemas PGNSP PGUID 12 f t f t f s 0 1003 "0" 100 0 0 100 current_schemas - _null_ ));
+DESCR("current schema search list");
+
DATA(insert OID = 1406 ( isvertical PGNSP PGUID 12 f t f t f i 2 16 "600 600" 100 0 0 100 point_vert - _null_ ));
DESCR("vertically aligned?");
DATA(insert OID = 1407 ( ishorizontal PGNSP PGUID 12 f t f t f i 2 16 "600 600" 100 0 0 100 point_horiz - _null_ ));
@@ -2663,15 +2668,15 @@ DESCR("unary plus");
DATA(insert OID = 1915 ( numeric_uplus PGNSP PGUID 12 f t f t f i 1 1700 "1700" 100 0 0 100 numeric_uplus - _null_ ));
DESCR("unary plus");
-DATA(insert OID = 1922 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "19 19 25" 100 0 0 100 has_table_privilege_name_name - _null_ ));
+DATA(insert OID = 1922 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "19 25 25" 100 0 0 100 has_table_privilege_name_name - _null_ ));
DESCR("user privilege on relation by username, relname");
DATA(insert OID = 1923 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "19 26 25" 100 0 0 100 has_table_privilege_name_id - _null_ ));
DESCR("user privilege on relation by username, rel oid");
-DATA(insert OID = 1924 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "23 19 25" 100 0 0 100 has_table_privilege_id_name - _null_ ));
+DATA(insert OID = 1924 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "23 25 25" 100 0 0 100 has_table_privilege_id_name - _null_ ));
DESCR("user privilege on relation by usesysid, relname");
DATA(insert OID = 1925 ( has_table_privilege PGNSP PGUID 12 f t f t f s 3 16 "23 26 25" 100 0 0 100 has_table_privilege_id_id - _null_ ));
DESCR("user privilege on relation by usesysid, rel oid");
-DATA(insert OID = 1926 ( has_table_privilege PGNSP PGUID 12 f t f t f s 2 16 "19 25" 100 0 0 100 has_table_privilege_name - _null_ ));
+DATA(insert OID = 1926 ( has_table_privilege PGNSP PGUID 12 f t f t f s 2 16 "25 25" 100 0 0 100 has_table_privilege_name - _null_ ));
DESCR("current user privilege on relation by relname");
DATA(insert OID = 1927 ( has_table_privilege PGNSP PGUID 12 f t f t f s 2 16 "26 25" 100 0 0 100 has_table_privilege_id - _null_ ));
DESCR("current user privilege on relation by rel oid");
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index f386665cd2d..d46e6d8262b 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.179 2002/04/25 02:56:56 tgl Exp $
+ * $Id: builtins.h,v 1.180 2002/04/26 01:24:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -164,6 +164,8 @@ extern int namestrcpy(Name name, const char *str);
extern int namestrcmp(Name name, const char *str);
extern Datum current_user(PG_FUNCTION_ARGS);
extern Datum session_user(PG_FUNCTION_ARGS);
+extern Datum current_schema(PG_FUNCTION_ARGS);
+extern Datum current_schemas(PG_FUNCTION_ARGS);
/* numutils.c */
extern int32 pg_atoi(char *s, int size, int c);