1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Retire xlateSqlType/xlateSqlFunc; all type name translations are now

handled as special productions.  This is needed to keep us honest about
user-schema type names that happen to coincide with system type names.
Per pghackers discussion 24-Apr.  To avoid bloating the keyword list
too much, I removed the translations for datetime, timespan, and lztext,
all of which were slated for destruction several versions back anyway.
This commit is contained in:
Tom Lane
2002-05-03 00:32:19 +00:00
parent c2def1b128
commit 53cedcac22
12 changed files with 186 additions and 186 deletions

View File

@ -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",