aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_target.c
Commit message (Collapse)AuthorAge
...
* pg_type has a typnamespace column; system now supports creating typesTom Lane2002-03-29
| | | | | | in different namespaces. Also, cleanup work on relation namespace support: drop, alter, rename commands work for tables in non-default namespaces.
* A little further progress on schemas: push down RangeVars intoTom Lane2002-03-22
| | | | | | | addRangeTableEntry calls. Remove relname field from RTEs, since it will no longer be a useful unique identifier of relations; we want to encourage people to rely on the relation OID instead. Further work on dumping qual expressions in EXPLAIN, too.
* First phase of SCHEMA changes, concentrating on fixing the grammar andTom Lane2002-03-21
| | | | | | | | the parsetree representation. As yet we don't *do* anything with schema names, just drop 'em on the floor; but you can enter schema-compatible command syntax, and there's even a primitive CREATE SCHEMA command. No doc updates yet, except to note that you can now extract a field from a function-returning-row's result with (foo(...)).fieldname.
* Restructure representation of join alias variables. An explicit JOINTom Lane2002-03-12
| | | | | | | | | | | | | | | now has an RTE of its own, and references to its outputs now are Vars referencing the JOIN RTE, rather than CASE-expressions. This allows reverse-listing in ruleutils.c to use the correct alias easily, rather than painfully reverse-engineering the alias namespace as it used to do. Also, nested FULL JOINs work correctly, because the result of the inner joins are simple Vars that the planner can cope with. This fixes a bug reported a couple times now, notably by Tatsuo on 18-Nov-01. The alias Vars are expanded into COALESCE expressions where needed at the very end of planning, rather than during parsing. Also, beginnings of support for showing plan qualifier expressions in EXPLAIN. There are probably still cases that need work. initdb forced due to change of stored-rule representation.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Another go-round with FigureColname, to produce less surprising resultsTom Lane2001-10-08
| | | | | | for nested typecasts. It now produces a column header of 'timestamptz' for 'SELECT CURRENT_TIMESTAMP', rather than 'text' as it was doing for awhile there.
* Measure the current transaction time to milliseconds.Thomas G. Lockhart2001-09-28
| | | | | | | | | | | | | | Define a new function, GetCurrentTransactionStartTimeUsec() to get the time to this precision. Allow now() and timestamp 'now' to use this higher precision result so we now have fractional seconds in this "constant". Add timestamp without time zone type. Move previous timestamp type to timestamp with time zone. Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss (note the "T" separating the day from hours information). Remove 'current' from date/time types; convert to 'now' in input. Separate time and timetz regression tests. Separate timestamp and timestamptz regression test.
* Simplify and clean up FigureColname; make it work without coredumpingTom Lane2001-09-17
| | | | for TypeCast case.
* Bug #1: attribute name when column is type cast:Bruce Momjian2001-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the following table: test=# \d f Table "f" Column | Type | Modifiers --------+---------+----------- i | integer | test | text | If I do the following: test=# insert into f values(1,'test'); INSERT 139549 1 test=# select i::int8,test from f; ?column? | test ----------+------ 1 | test (1 row) It doesn't make much sense that the first column should be called '?column?'. The patch results in the output appearing like this: test=# select i::int8,test from f; i | test ---+------ 1 | test (1 row) ---------- Gavin Sherry
* Use format_type sibling in backend error messages, so the user seesPeter Eisentraut2001-08-09
| | | | consistent type naming.
* Back out BYTEA binary compatibility changes.Bruce Momjian2001-06-24
|
* > Marko Kreen <marko@l-t.ee> writes:Bruce Momjian2001-06-23
| | | | | | | | | | | | | > > secure_ctx changes too. it will be PGC_BACKEND after '-p'. > > Oh, okay, I missed that part. Could we see the total state of the > patch --- ie, a diff against current CVS, not a bunch of deltas? > I've gotten confused about what's in and what's out. Ok, here it is. Cleared the ctx comment too - after -p it will be PGC_BACKEND in any case. Marko Kreen
* Print error on SELECT tab FROM tab:Bruce Momjian2001-05-21
| | | | You can't use relation names alone in the target list, try relation.*
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change scoping of table and join refnames to conform to SQL92: a JOINTom Lane2001-02-14
| | | | | | | | | clause with an alias is a <subquery> and therefore hides table references appearing within it, according to the spec. This is the same as the preliminary patch I posted to pgsql-patches yesterday, plus some really grotty code in ruleutils.c to reverse-list a query tree with the correct alias name depending on context. I'd rather not have done that, but unless we want to force another initdb for 7.1, there's no other way for now.
* 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
|