aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_language.h26
-rw-r--r--src/include/catalog/pg_pltemplate.h26
-rw-r--r--src/include/commands/proclang.h1
-rw-r--r--src/include/utils/acl.h3
5 files changed, 33 insertions, 27 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index e7ab0e78f02..79dd0cdb10e 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.394 2007/03/25 11:56:04 ishii Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.395 2007/03/26 16:58:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200703251
+#define CATALOG_VERSION_NO 200703261
#endif
diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h
index a7e449e5139..bf4fdd2774f 100644
--- a/src/include/catalog/pg_language.h
+++ b/src/include/catalog/pg_language.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.29 2007/01/05 22:19:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.30 2007/03/26 16:58:41 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -35,11 +35,12 @@
CATALOG(pg_language,2612)
{
- NameData lanname;
+ NameData lanname; /* Language name */
+ Oid lanowner; /* Language's owner */
bool lanispl; /* Is a procedural language */
bool lanpltrusted; /* PL is trusted */
Oid lanplcallfoid; /* Call handler for PL */
- Oid lanvalidator; /* optional validation function */
+ Oid lanvalidator; /* Optional validation function */
aclitem lanacl[1]; /* Access privileges */
} FormData_pg_language;
@@ -54,26 +55,27 @@ typedef FormData_pg_language *Form_pg_language;
* compiler constants for pg_language
* ----------------
*/
-#define Natts_pg_language 6
+#define Natts_pg_language 7
#define Anum_pg_language_lanname 1
-#define Anum_pg_language_lanispl 2
-#define Anum_pg_language_lanpltrusted 3
-#define Anum_pg_language_lanplcallfoid 4
-#define Anum_pg_language_lanvalidator 5
-#define Anum_pg_language_lanacl 6
+#define Anum_pg_language_lanowner 2
+#define Anum_pg_language_lanispl 3
+#define Anum_pg_language_lanpltrusted 4
+#define Anum_pg_language_lanplcallfoid 5
+#define Anum_pg_language_lanvalidator 6
+#define Anum_pg_language_lanacl 7
/* ----------------
* initial contents of pg_language
* ----------------
*/
-DATA(insert OID = 12 ( "internal" f f 0 2246 _null_ ));
+DATA(insert OID = 12 ( "internal" PGUID f f 0 2246 _null_ ));
DESCR("Built-in functions");
#define INTERNALlanguageId 12
-DATA(insert OID = 13 ( "c" f f 0 2247 _null_ ));
+DATA(insert OID = 13 ( "c" PGUID f f 0 2247 _null_ ));
DESCR("Dynamically-loaded C functions");
#define ClanguageId 13
-DATA(insert OID = 14 ( "sql" f t 0 2248 _null_ ));
+DATA(insert OID = 14 ( "sql" PGUID f t 0 2248 _null_ ));
DESCR("SQL-language functions");
#define SQLlanguageId 14
diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h
index a5c05f4d069..7f33eed49e3 100644
--- a/src/include/catalog/pg_pltemplate.h
+++ b/src/include/catalog/pg_pltemplate.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.3 2007/01/05 22:19:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.4 2007/03/26 16:58:41 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -37,6 +37,7 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
{
NameData tmplname; /* name of PL */
bool tmpltrusted; /* PL is trusted? */
+ bool tmpldbacreate; /* PL is installable by db owner? */
text tmplhandler; /* name of call handler function */
text tmplvalidator; /* name of validator function, or NULL */
text tmpllibrary; /* path of shared library */
@@ -54,13 +55,14 @@ typedef FormData_pg_pltemplate *Form_pg_pltemplate;
* compiler constants for pg_pltemplate
* ----------------
*/
-#define Natts_pg_pltemplate 6
+#define Natts_pg_pltemplate 7
#define Anum_pg_pltemplate_tmplname 1
#define Anum_pg_pltemplate_tmpltrusted 2
-#define Anum_pg_pltemplate_tmplhandler 3
-#define Anum_pg_pltemplate_tmplvalidator 4
-#define Anum_pg_pltemplate_tmpllibrary 5
-#define Anum_pg_pltemplate_tmplacl 6
+#define Anum_pg_pltemplate_tmpldbacreate 3
+#define Anum_pg_pltemplate_tmplhandler 4
+#define Anum_pg_pltemplate_tmplvalidator 5
+#define Anum_pg_pltemplate_tmpllibrary 6
+#define Anum_pg_pltemplate_tmplacl 7
/* ----------------
@@ -68,11 +70,11 @@ typedef FormData_pg_pltemplate *Form_pg_pltemplate;
* ----------------
*/
-DATA(insert ( "plpgsql" t "plpgsql_call_handler" "plpgsql_validator" "$libdir/plpgsql" _null_ ));
-DATA(insert ( "pltcl" t "pltcl_call_handler" _null_ "$libdir/pltcl" _null_ ));
-DATA(insert ( "pltclu" f "pltclu_call_handler" _null_ "$libdir/pltcl" _null_ ));
-DATA(insert ( "plperl" t "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ ));
-DATA(insert ( "plperlu" f "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ ));
-DATA(insert ( "plpythonu" f "plpython_call_handler" _null_ "$libdir/plpython" _null_ ));
+DATA(insert ( "plpgsql" t t "plpgsql_call_handler" "plpgsql_validator" "$libdir/plpgsql" _null_ ));
+DATA(insert ( "pltcl" t t "pltcl_call_handler" _null_ "$libdir/pltcl" _null_ ));
+DATA(insert ( "pltclu" f f "pltclu_call_handler" _null_ "$libdir/pltcl" _null_ ));
+DATA(insert ( "plperl" t t "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ ));
+DATA(insert ( "plperlu" f f "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ ));
+DATA(insert ( "plpythonu" f f "plpython_call_handler" _null_ "$libdir/plpython" _null_ ));
#endif /* PG_PLTEMPLATE_H */
diff --git a/src/include/commands/proclang.h b/src/include/commands/proclang.h
index 7f38a8542ac..0ae128285d1 100644
--- a/src/include/commands/proclang.h
+++ b/src/include/commands/proclang.h
@@ -15,6 +15,7 @@ extern void CreateProceduralLanguage(CreatePLangStmt *stmt);
extern void DropProceduralLanguage(DropPLangStmt *stmt);
extern void DropProceduralLanguageById(Oid langOid);
extern void RenameLanguage(const char *oldname, const char *newname);
+extern void AlterLanguageOwner(const char *name, Oid newOwnerId);
extern bool PLTemplateExists(const char *languageName);
#endif /* PROCLANG_H */
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 14522bc6fb1..5eb054e1466 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.100 2007/01/23 05:07:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.101 2007/03/26 16:58:41 tgl Exp $
*
* NOTES
* An ACL array is simply an array of AclItems, representing the union
@@ -274,6 +274,7 @@ extern bool pg_class_ownercheck(Oid class_oid, Oid roleid);
extern bool pg_type_ownercheck(Oid type_oid, Oid roleid);
extern bool pg_oper_ownercheck(Oid oper_oid, Oid roleid);
extern bool pg_proc_ownercheck(Oid proc_oid, Oid roleid);
+extern bool pg_language_ownercheck(Oid lan_oid, Oid roleid);
extern bool pg_namespace_ownercheck(Oid nsp_oid, Oid roleid);
extern bool pg_tablespace_ownercheck(Oid spc_oid, Oid roleid);
extern bool pg_opclass_ownercheck(Oid opc_oid, Oid roleid);