|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.2 2002/04/27 03:45:02 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.3 2002/05/03 00:32:16 tgl Exp $ |
12 | 12 | *
|
13 | 13 | * DESCRIPTION
|
14 | 14 | * The "DefineFoo" routines take the parse tree and pick out the
|
@@ -133,21 +133,22 @@ DefineType(List *names, List *parameters)
|
133 | 133 |
|
134 | 134 | /*
|
135 | 135 | * Note: if argument was an unquoted identifier, parser will
|
136 |
| - * have applied xlateSqlType() to it, so be prepared to |
| 136 | + * have applied translations to it, so be prepared to |
137 | 137 | * recognize translated type names as well as the nominal
|
138 | 138 | * form.
|
139 | 139 | */
|
140 |
| - if (strcasecmp(a, "double") == 0) |
| 140 | + if (strcasecmp(a, "double") == 0 || |
| 141 | + strcasecmp(a, "float8") == 0 || |
| 142 | + strcasecmp(a, "pg_catalog.float8") == 0) |
141 | 143 | alignment = 'd';
|
142 |
| - else if (strcasecmp(a, "float8") == 0) |
143 |
| - alignment = 'd'; |
144 |
| - else if (strcasecmp(a, "int4") == 0) |
| 144 | + else if (strcasecmp(a, "int4") == 0 || |
| 145 | + strcasecmp(a, "pg_catalog.int4") == 0) |
145 | 146 | alignment = 'i';
|
146 |
| - else if (strcasecmp(a, "int2") == 0) |
| 147 | + else if (strcasecmp(a, "int2") == 0 || |
| 148 | + strcasecmp(a, "pg_catalog.int2") == 0) |
147 | 149 | alignment = 's';
|
148 |
| - else if (strcasecmp(a, "char") == 0) |
149 |
| - alignment = 'c'; |
150 |
| - else if (strcasecmp(a, "bpchar") == 0) |
| 150 | + else if (strcasecmp(a, "char") == 0 || |
| 151 | + strcasecmp(a, "pg_catalog.bpchar") == 0) |
151 | 152 | alignment = 'c';
|
152 | 153 | else
|
153 | 154 | elog(ERROR, "DefineType: \"%s\" alignment not recognized",
|
|
0 commit comments