|
31 | 31 | * ENHANCEMENTS, OR MODIFICATIONS.
|
32 | 32 | *
|
33 | 33 | * IDENTIFICATION
|
34 |
| - * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.30 2000/11/20 20:36:52 tgl Exp $ |
| 34 | + * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.31 2000/12/08 00:09:07 tgl Exp $ |
35 | 35 | *
|
36 | 36 | **********************************************************************/
|
37 | 37 |
|
@@ -489,8 +489,12 @@ pltcl_func_handler(PG_FUNCTION_ARGS)
|
489 | 489 | {
|
490 | 490 | free(prodesc->proname);
|
491 | 491 | free(prodesc);
|
492 |
| - elog(ERROR, "pltcl: cache lookup for return type %u failed", |
493 |
| - procStruct->prorettype); |
| 492 | + if (!OidIsValid(procStruct->prorettype)) |
| 493 | + elog(ERROR, "pltcl functions cannot return type \"opaque\"" |
| 494 | + "\n\texcept when used as triggers"); |
| 495 | + else |
| 496 | + elog(ERROR, "pltcl: cache lookup for return type %u failed", |
| 497 | + procStruct->prorettype); |
494 | 498 | }
|
495 | 499 | typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
|
496 | 500 |
|
@@ -521,8 +525,11 @@ pltcl_func_handler(PG_FUNCTION_ARGS)
|
521 | 525 | {
|
522 | 526 | free(prodesc->proname);
|
523 | 527 | free(prodesc);
|
524 |
| - elog(ERROR, "pltcl: cache lookup for argument type %u failed", |
525 |
| - procStruct->proargtypes[i]); |
| 528 | + if (!OidIsValid(procStruct->proargtypes[i])) |
| 529 | + elog(ERROR, "pltcl functions cannot take type \"opaque\""); |
| 530 | + else |
| 531 | + elog(ERROR, "pltcl: cache lookup for argument type %u failed", |
| 532 | + procStruct->proargtypes[i]); |
526 | 533 | }
|
527 | 534 | typeStruct = (Form_pg_type) GETSTRUCT(typeTup);
|
528 | 535 |
|
|
0 commit comments