aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 74e5a15cc8d..6aa5fae182e 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.2 2002/04/27 03:45:02 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.3 2002/05/03 00:32:16 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -133,21 +133,22 @@ DefineType(List *names, List *parameters)
/*
* Note: if argument was an unquoted identifier, parser will
- * have applied xlateSqlType() to it, so be prepared to
+ * have applied translations to it, so be prepared to
* recognize translated type names as well as the nominal
* form.
*/
- if (strcasecmp(a, "double") == 0)
+ if (strcasecmp(a, "double") == 0 ||
+ strcasecmp(a, "float8") == 0 ||
+ strcasecmp(a, "pg_catalog.float8") == 0)
alignment = 'd';
- else if (strcasecmp(a, "float8") == 0)
- alignment = 'd';
- else if (strcasecmp(a, "int4") == 0)
+ else if (strcasecmp(a, "int4") == 0 ||
+ strcasecmp(a, "pg_catalog.int4") == 0)
alignment = 'i';
- else if (strcasecmp(a, "int2") == 0)
+ else if (strcasecmp(a, "int2") == 0 ||
+ strcasecmp(a, "pg_catalog.int2") == 0)
alignment = 's';
- else if (strcasecmp(a, "char") == 0)
- alignment = 'c';
- else if (strcasecmp(a, "bpchar") == 0)
+ else if (strcasecmp(a, "char") == 0 ||
+ strcasecmp(a, "pg_catalog.bpchar") == 0)
alignment = 'c';
else
elog(ERROR, "DefineType: \"%s\" alignment not recognized",