|
9 | 9 | *
|
10 | 10 | *
|
11 | 11 | * IDENTIFICATION
|
12 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.33 2003/08/04 02:39:58 momjian Exp $ |
| 12 | + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.34 2003/09/10 19:59:23 momjian Exp $ |
13 | 13 | *
|
14 | 14 | * DESCRIPTION
|
15 | 15 | * These routines take the parse tree and pick out the
|
@@ -435,10 +435,23 @@ CreateFunction(CreateFunctionStmt *stmt)
|
435 | 435 | PointerGetDatum(languageName),
|
436 | 436 | 0,0,0);
|
437 | 437 | if (!HeapTupleIsValid(languageTuple))
|
| 438 | +/* Add any new languages to this list to invoke the hint. */ |
438 | 439 | ereport(ERROR,
|
439 | 440 | (errcode(ERRCODE_UNDEFINED_OBJECT),
|
440 |
| -errmsg("language \"%s\" does not exist",languageName))); |
441 |
| - |
| 441 | +errmsg("language \"%s\" does not exist",languageName), |
| 442 | + (strcmp(languageName,"plperl")==0|| |
| 443 | +strcmp(languageName,"plperlu")==0|| |
| 444 | +strcmp(languageName,"plphp")==0|| |
| 445 | +strcmp(languageName,"plpgsql")==0|| |
| 446 | +strcmp(languageName,"plpython")==0|| |
| 447 | +strcmp(languageName,"plpythonu")==0|| |
| 448 | +strcmp(languageName,"plr")==0|| |
| 449 | +strcmp(languageName,"plruby")==0|| |
| 450 | +strcmp(languageName,"plsh")==0|| |
| 451 | +strcmp(languageName,"pltcl")==0|| |
| 452 | +strcmp(languageName,"pltclu")==0) ? |
| 453 | +errhint("You need to use 'createlang' to load the language into the database.") :0)); |
| 454 | + |
442 | 455 | languageOid=HeapTupleGetOid(languageTuple);
|
443 | 456 | languageStruct= (Form_pg_language)GETSTRUCT(languageTuple);
|
444 | 457 |
|
|