aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/define.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-09-21 18:39:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-09-21 18:39:26 +0000
commiteb3adab5685ce5a60bcf96628244f1e2a8e0ab3b (patch)
tree55ba25cb13ec6a414c7faf86a6d8da8357cfbfe7 /src/backend/commands/define.c
parentbc499687641a021e0dac3e146611b5a553cf0c5b (diff)
downloadpostgresql-eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b.tar.gz
postgresql-eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b.zip
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.
Diffstat (limited to 'src/backend/commands/define.c')
-rw-r--r--src/backend/commands/define.c8
1 files changed, 4 insertions, 4 deletions
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';
}