From eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 21 Sep 2002 18:39:26 +0000 Subject: Provide an upgrade strategy for dump files containing functions declared with OPAQUE. CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all accept references to functions declared with OPAQUE --- but they will issue a NOTICE, and will modify the function entries in pg_proc to have the preferred type-safe argument or result types instead of OPAQUE. Per recent pghackers discussions. --- src/backend/commands/define.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/define.c') diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 09687818d83..5b0624a03ea 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.80 2002/09/04 20:31:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.81 2002/09/21 18:39:25 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -44,17 +44,17 @@ /* * Translate the input language name to lower case. * - * Output buffer should be NAMEDATALEN long. + * Output buffer must be NAMEDATALEN long. */ void case_translate_language_name(const char *input, char *output) { int i; + MemSet(output, 0, NAMEDATALEN); /* ensure result Name is zero-filled */ + for (i = 0; i < NAMEDATALEN - 1 && input[i]; ++i) output[i] = tolower((unsigned char) input[i]); - - output[i] = '\0'; } -- cgit v1.2.3