1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00

oidvectortypes: use SQL type names and separate by commas

psql \df: use format_type and oidvectortypes
map type REAL to float4, not float8
psql \dd :work around UNION bug
This commit is contained in:
Peter Eisentraut
2000-07-09 21:30:21 +00:00
parent f90771236d
commit b54faa1b15
5 changed files with 112 additions and 86 deletions

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.176 2000/07/07 19:24:35 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.177 2000/07/09 21:30:10 petere Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -3944,7 +3944,7 @@ Numeric: FLOAT opt_float
;
numeric: FLOAT { $$ = xlateSqlType("float"); }
| DOUBLE PRECISION { $$ = xlateSqlType("float"); }
| DOUBLE PRECISION { $$ = xlateSqlType("float8"); }
| DECIMAL { $$ = xlateSqlType("decimal"); }
| DEC { $$ = xlateSqlType("decimal"); }
| NUMERIC { $$ = xlateSqlType("numeric"); }
@ -5781,8 +5781,9 @@ xlateSqlType(char *name)
return "int2";
else if (strcmp(name, "bigint") == 0)
return "int8";
else if ((strcmp(name, "real") == 0)
|| (strcmp(name, "float") == 0))
else if (strcmp(name, "real") == 0)
return "float4";
else if (strcmp(name, "float") == 0)
return "float8";
else if (strcmp(name, "decimal") == 0)
return "numeric";