Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53cedca

Browse files
committed
Retire xlateSqlType/xlateSqlFunc; all type name translations are now
handled as special productions. This is needed to keep us honest aboutuser-schema type names that happen to coincide with system type names.Per pghackers discussion 24-Apr. To avoid bloating the keyword listtoo much, I removed the translations for datetime, timespan, and lztext,all of which were slated for destruction several versions back anyway.
1 parentc2def1b commit53cedca

File tree

12 files changed

+186
-186
lines changed

12 files changed

+186
-186
lines changed

‎src/backend/commands/typecmds.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
* DESCRIPTION
1414
* The "DefineFoo" routines take the parse tree and pick out the
@@ -133,21 +133,22 @@ DefineType(List *names, List *parameters)
133133

134134
/*
135135
* Note: if argument was an unquoted identifier, parser will
136-
* have appliedxlateSqlType() to it, so be prepared to
136+
* have appliedtranslations to it, so be prepared to
137137
* recognize translated type names as well as the nominal
138138
* form.
139139
*/
140-
if (strcasecmp(a,"double")==0)
140+
if (strcasecmp(a,"double")==0||
141+
strcasecmp(a,"float8")==0||
142+
strcasecmp(a,"pg_catalog.float8")==0)
141143
alignment='d';
142-
elseif (strcasecmp(a,"float8")==0)
143-
alignment='d';
144-
elseif (strcasecmp(a,"int4")==0)
144+
elseif (strcasecmp(a,"int4")==0||
145+
strcasecmp(a,"pg_catalog.int4")==0)
145146
alignment='i';
146-
elseif (strcasecmp(a,"int2")==0)
147+
elseif (strcasecmp(a,"int2")==0||
148+
strcasecmp(a,"pg_catalog.int2")==0)
147149
alignment='s';
148-
elseif (strcasecmp(a,"char")==0)
149-
alignment='c';
150-
elseif (strcasecmp(a,"bpchar")==0)
150+
elseif (strcasecmp(a,"char")==0||
151+
strcasecmp(a,"pg_catalog.bpchar")==0)
151152
alignment='c';
152153
else
153154
elog(ERROR,"DefineType: \"%s\" alignment not recognized",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp