Skip to content

Commit b8ffc99

Browse files
committed
Minor kibitzing.
1 parent d60f10b commit b8ffc99

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/backend/catalog/pg_proc.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.74 2002/05/22 17:20:58 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.75 2002/05/22 18:33:15 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -140,7 +140,6 @@ ProcedureCreate(const char *procedureName,
140140
elog(ERROR, "method %s already an attribute of type %s",
141141
procedureName, format_type_be(typev[0]));
142142

143-
144143
/*
145144
* All seems OK; prepare the data to be inserted into pg_proc.
146145
*/
@@ -177,7 +176,6 @@ ProcedureCreate(const char *procedureName,
177176
CStringGetDatum(probin));
178177
/* proacl will be handled below */
179178

180-
181179
rel = heap_openr(ProcedureRelationName, RowExclusiveLock);
182180
tupDesc = rel->rd_att;
183181

@@ -220,7 +218,8 @@ ProcedureCreate(const char *procedureName,
220218
procedureName);
221219
}
222220

223-
/* do not change existing permissions, either */
221+
/* do not change existing ownership or permissions, either */
222+
replaces[Anum_pg_proc_proowner-1] = ' ';
224223
replaces[Anum_pg_proc_proacl-1] = ' ';
225224

226225
/* Okay, do it... */
@@ -258,9 +257,9 @@ ProcedureCreate(const char *procedureName,
258257
/* Verify function body */
259258
if (OidIsValid(languageValidator))
260259
{
261-
/* Advance command counter so recursive functions can be defined */
260+
/* Advance command counter so new tuple can be seen by validator */
262261
CommandCounterIncrement();
263-
OidFunctionCall1(languageValidator, retval);
262+
OidFunctionCall1(languageValidator, ObjectIdGetDatum(retval));
264263
}
265264

266265
return retval;

0 commit comments

Comments
 (0)