mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type). Remap length() for character strings to CHAR_LENGTH() for SQL92 and to remove the ambiguity with geometric length() functions. Keep length() for character strings for backward compatibility. Shrink stored views by removing internal column name list from visible rte. Implement min(), max() for time and timetz data types. Implement conversion of TIME to INTERVAL. Implement abs(), mod(), fac() for the int8 data type. Rename some math functions to generic names: round(), sqrt(), cbrt(), pow(), etc. Rename NUMERIC power() function to pow(). Fix int2 factorial to calculate result in int4. Enhance the Oracle compatibility function translate() to work with string arguments (from Edwin Ramirez). Modify pg_proc system table to remove OID holes.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.101 2000/03/01 05:18:18 tgl Exp $
|
||||
* $Id: parsenodes.h,v 1.102 2000/03/14 23:06:47 thomas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -614,6 +614,7 @@ typedef struct ViewStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *viewname; /* name of the view */
|
||||
List *aliases; /* target column names */
|
||||
Query *query; /* the SQL statement */
|
||||
} ViewStmt;
|
||||
|
||||
@@ -1131,6 +1132,12 @@ typedef struct TargetEntry
|
||||
* Some of the following are only used in one of
|
||||
* the parsing, optimizing, execution stages.
|
||||
*
|
||||
* eref is the expanded table name and columns for the underlying
|
||||
* relation. Note that for outer join syntax, allowed reference names
|
||||
* could be modified as one evaluates the nested clauses (e.g.
|
||||
* "SELECT ... FROM t1 NATURAL JOIN t2 WHERE ..." forbids explicit mention
|
||||
* of a table name in any reference to the join column.
|
||||
*
|
||||
* inFromCl marks those range variables that are listed in the FROM clause.
|
||||
* In SQL, the query can only refer to range variables listed in the
|
||||
* FROM clause, but POSTQUEL allows you to refer to tables not listed,
|
||||
@@ -1157,9 +1164,8 @@ typedef struct RangeTblEntry
|
||||
{
|
||||
NodeTag type;
|
||||
char *relname; /* real name of the relation */
|
||||
#ifndef DISABLE_JOIN_SYNTAX
|
||||
Attr *ref; /* reference names (given in FROM clause) */
|
||||
#endif
|
||||
Attr *eref; /* expanded reference names */
|
||||
Oid relid; /* OID of the relation */
|
||||
bool inh; /* inheritance requested? */
|
||||
bool inFromCl; /* present in FROM clause */
|
||||
|
||||
Reference in New Issue
Block a user