aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_target.c
Commit message (Collapse)AuthorAge
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.Tom Lane2000-09-29
| | | | | | | | | (Don't forget that an alias is required.) Views reimplemented as expanding to subselect-in-FROM. Grouping, aggregates, DISTINCT in views actually work now (he says optimistically). No UNION support in subselects/views yet, but I have some ideas about that. Rule-related permissions checking moved out of rewriter and into executor. INITDB REQUIRED!
* First cut at full support for OUTER JOINs. There are still a few looseTom Lane2000-09-12
| | | | | ends to clean up (see my message of same date to pghackers), but mostly it works. INITDB REQUIRED!
* Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'Tom Lane2000-08-08
| | | | | | | | from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules.
* Clean up #include's.Bruce Momjian2000-06-15
|
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Implement column aliases on views "CREATE VIEW name (collist)".Thomas G. Lockhart2000-03-14
| | | | | | | | | | | | | | | | | | 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.
* Trial implementation of ALTER DROP COLUMN.Hiroshi Inoue2000-03-09
| | | | | | They are #ifdef'd. Add -D_DROP_COLUMN_HACK__ compile option to evaluate it.
* Carry column aliases from the parser frontend. Enables queries likeThomas G. Lockhart2000-02-15
| | | | | | | SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Pass atttypmod to CoerceTargetExpr, so that it can pass it on toTom Lane2000-01-17
| | | | | coerce_type, so that the right things happen when coercing a previously- unknown constant to a destination data type.
* Create a new parsetree node type, TypeCast, so that transformation ofTom Lane2000-01-17
| | | | | | SQL cast constructs can be performed during expression transformation instead of during parsing. This allows constructs like x::numeric(9,2) and x::int2::float8 to behave as one would expect.
* Make number of args to a function configurable.Bruce Momjian2000-01-10
|
* Teach grammar and parser about aggregate(DISTINCT ...). No implementationTom Lane1999-12-10
| | | | | | | yet, but at least we can give a better error message: regression=> select count(distinct f1) from int4_tbl; ERROR: aggregate(DISTINCT ...) is not implemented yet instead of 'parser: parse error at or near distinct'.
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* Eliminate local inefficiencies in updateTargetListEntry, make_var, andTom Lane1999-11-01
| | | | make_const --- don't repeat cache searches that aren't needed.
* Rewrite parser's handling of INSERT ... SELECT so that processingTom Lane1999-07-19
| | | | | | | | | of the SELECT part of the statement is just like a plain SELECT. All INSERT-specific processing happens after the SELECT parsing is done. This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using the wrong column labels. Ensure that DEFAULT clauses are coerced to the target column type, whether or not stored clause produces the right type. Substantial cleanup of parser's array support.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Defend against function calls with more than 8 arguments (codeTom Lane1999-06-17
| | | | | used to overrun its fixed-size arrays before detecting error; not cool). Also, replace uses of magic constant '8' with 'MAXFARGS'.
* Avoid redundant SysCache searches in coerce_type, for anotherTom Lane1999-05-29
| | | | few percent speedup in INSERT...
* pgindent run over code.Bruce Momjian1999-05-25
|
* Do not assign output columns to junk attributes created fromTom Lane1999-05-23
| | | | GROUP BY or ORDER BY expressions in INSERT ... SELECT.
* Fix for DEFAULT ''.Bruce Momjian1999-05-22
|
* Change resjunk to a boolean.Bruce Momjian1999-05-17
|
* SELECT * error message fix.Bruce Momjian1999-05-17
|
* Defend against 'update oid'. Someday we might want to supportTom Lane1999-04-29
| | | | | that, but it'd be a New Feature, wouldn't it ... in the meantime, avoiding a backend crash seems worthwhile.
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* Rename Aggreg to Aggref.Bruce Momjian1999-01-24
|
* Improve CASE statement support.Thomas G. Lockhart1998-12-13
| | | | Try to label CASE columns for a SELECT if not specified with an AS clause.
* Implement CASE expression.Thomas G. Lockhart1998-12-04
|
* Make functions static or ifdef NOT_USED. Prevent pg_version creation.Bruce Momjian1998-10-08
|
* Clean up code in analyze.c for SERIAL data type.Thomas G. Lockhart1998-09-25
| | | | Remove _all_ PARSEDEBUG print statements.
* Fix for indexing problems.Bruce Momjian1998-09-02
|
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* Fix for select bug.Bruce Momjian1998-08-26
|
* Cleanup of target file.Bruce Momjian1998-08-25
|
* Make sure resdomno for update/insert match attribute number forBruce Momjian1998-08-25
| | | | | rewrite system. Restructure parse_target to make it easier to understand.
* cleanupBruce Momjian1998-08-23
|
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-19
| | | | | | | | | | | | | no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
* From: David Hartwig <daybee@bellatlantic.net>Marc G. Fournier1998-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have attached a patch to allow GROUP BY and/or ORDER BY function or expressions. Note worthy items: 1. The expression or function need not be in the target list. Example: SELECT name FROM foo GROUP BY lower(name); 2. Simplified the grammar to use expressions only. 3. Cleaned up earlier patch in this area to make use of existing utility functions. 3. Reduced some of the members in the SortGroupBy parse node. The original data members were redundant with the new expression node. (MUST do a "make clean" now) 4. Added a new parse node "JoinUsing". The JOIN USING clause was overloading this SortGroupBy structure. With the afore mentioned reduction of members, the two clauses lost all their commonality. 5. A bug still exist where, if a function or expression is GROUPed BY, and an aggregate function does not include a attribute from the expression or function, the backend crashes. (or something like that) The bug pre-dates this patch. Example: SELECT lower(a) AS lowcase, count(b) FROM foo GROUP BY lowcase; *** BOOM *** --Also when not in target list SELECT count(b) FROM foo GROUP BY lower(a); *** BOOM AGAIN ***
* Cleanup makeTargetEntry and remove internal.c.Bruce Momjian1998-07-20
|
* Change atttypmod from int16 to int32, for Thomas.Bruce Momjian1998-07-12
|
* Allow floating point constants for "def_arg" numeric arguments.Thomas G. Lockhart1998-07-08
| | | | | | Used in the generic "CREATE xxx" parsing. Do some automatic type conversion for inserts from other columns. Previous trouble with "resjunk" regression test remains for now.
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* I made several adjustments to my earlier patch to handle theBruce Momjian1998-06-05
| | | | condition where the target label is ambiguous.