mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list. Support for oldstyle internal functions is gone (no longer needed, since conversion is complete) and pg_language entry 'internal' now implies newstyle call convention. pg_language entry 'newC' is gone; both old and newstyle dynamically loaded C functions are now called language 'C'. A newstyle function must be identified by an associated info routine. See src/backend/utils/fmgr/README.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.80 2000/11/16 22:30:18 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.81 2000/11/20 20:36:47 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -169,10 +169,7 @@ CreateTrigger(CreateTrigStmt *stmt)
|
||||
funclang = ((Form_pg_proc) GETSTRUCT(tuple))->prolang;
|
||||
ReleaseSysCache(tuple);
|
||||
|
||||
if (funclang != ClanguageId &&
|
||||
funclang != NEWClanguageId &&
|
||||
funclang != INTERNALlanguageId &&
|
||||
funclang != NEWINTERNALlanguageId)
|
||||
if (funclang != ClanguageId && funclang != INTERNALlanguageId)
|
||||
{
|
||||
HeapTuple langTup;
|
||||
|
||||
@ -180,10 +177,10 @@ CreateTrigger(CreateTrigStmt *stmt)
|
||||
ObjectIdGetDatum(funclang),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(langTup))
|
||||
elog(ERROR, "CreateTrigger: cache lookup for PL %u failed",
|
||||
elog(ERROR, "CreateTrigger: cache lookup for language %u failed",
|
||||
funclang);
|
||||
if (((Form_pg_language) GETSTRUCT(langTup))->lanispl == false)
|
||||
elog(ERROR, "CreateTrigger: only builtin, C and PL functions are supported");
|
||||
elog(ERROR, "CreateTrigger: only internal, C and PL functions are supported");
|
||||
ReleaseSysCache(langTup);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user