- Jan 05, 2001
-
-
Tom Lane authored
and revert documentation to describe the existing INHERITS clause instead, per recent discussion in pghackers. Also fix implementation of SQL_inheritance SET variable: it is not cool to look at this var during the initial parsing phase, only during parse_analyze(). See recent bug report concerning misinterpretation of date constants just after a SET TIMEZONE command. gram.y really has to be an invariant transformation of the query string to a raw parsetree; anything that can vary with time must be done during parse analysis.
-
- Dec 07, 2000
-
-
Tom Lane authored
work where we can (given that the executor only handles it at top level) and generate an error where we can't. Note that while the parser has been allowing views to say SELECT FOR UPDATE for a few weeks now, that hasn't actually worked until just now.
-
- Nov 17, 2000
-
-
Peter Eisentraut authored
function calls to work.
-
- Nov 16, 2000
-
-
Tom Lane authored
maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
-
- Nov 08, 2000
-
-
Tom Lane authored
(WAL logging for this is not done yet, however.) Clean up a number of really crufty things that are no longer needed now that DROP behaves nicely. Make temp table mapper do the right things when drop or rename affecting a temp table is rolled back. Also, remove "relation modified while in use" error check, in favor of locking tables at first reference and holding that lock throughout the statement.
-
- Oct 07, 2000
-
-
Tom Lane authored
took some rejiggering of typename and ACL parsing, as well as moving parse_analyze call out of parser(). Restructure postgres.c processing so that parse analysis and rewrite are skipped when in abort-transaction state. Only COMMIT and ABORT statements will be processed beyond the raw parser() phase. This addresses problem of parser failing with database access errors while in aborted state (see pghackers discussions around 7/28/00). Also fix some bugs with COMMIT/ABORT statements appearing in the middle of a single query input string. Function, operator, and aggregate arguments/results can now use full TypeName production, in particular foo[] for array types. DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators. Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
-
- Oct 05, 2000
-
-
Tom Lane authored
SQL92 semantics, including support for ALL option. All three can be used in subqueries and views. DISTINCT and ORDER BY work now in views, too. This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT where the SELECT yields different datatypes than the INSERT needs. I did that by making UNION subqueries and SELECT in INSERT be treated like subselects-in-FROM, thereby allowing an extra level of targetlist where the datatype conversions can be inserted safely. INITDB NEEDED!
-
- Sep 29, 2000
-
-
Tom Lane authored
(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!
-
- Sep 25, 2000
-
-
Tom Lane authored
complaints about ungrouped variables. This is for consistency with behavior elsewhere, notably the fact that the relname is reported as an alias in these same complaints. Also, it'll work with subselect- in-FROM where old code didn't.
-
- Sep 12, 2000
-
-
Tom Lane authored
ends to clean up (see my message of same date to pghackers), but mostly it works. INITDB REQUIRED!
-
- Aug 29, 2000
-
-
Tom Lane authored
-
- Aug 21, 2000
-
-
Tom Lane authored
Update functions to new-style fmgr, make BIT and VARBIT be binary- equivalent, add entries to allow these types to be btree indexed, correct a few bugs. BIT/VARBIT are now toastable, too. NOTE: initdb forced due to catalog updates.
-
- Aug 20, 2000
-
-
Tom Lane authored
CREATE INDEX fooi ON foo (lower(f1)) where f1 is varchar rather than text.
-
- Aug 08, 2000
-
-
Tom Lane authored
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.
-
- Jun 15, 2000
-
-
Bruce Momjian authored
-
- Jun 12, 2000
-
-
Bruce Momjian authored
compatiblity with old rules.
-
- Jun 09, 2000
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- Jun 03, 2000
-
-
Bruce Momjian authored
-
- May 12, 2000
-
-
Tom Lane authored
Make it behave correctly when there are more than two tables being joined, also. Update regression test expected outputs.
-
- Apr 12, 2000
-
-
Bruce Momjian authored
-
- Mar 20, 2000
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- Mar 17, 2000
-
-
Tom Lane authored
a config.h #define, and the runtime value can be controlled via SET.
-
- Mar 16, 2000
-
-
Tom Lane authored
actually a type-coercion problem. If you have a function defined on class A, and class B inherits from A, then the function ought to work on class B as well --- but coerce_type didn't know that. Now it does.
-
- Mar 15, 2000
-
-
Thomas G. Lockhart authored
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.
-
- Feb 26, 2000
-
-
Tom Lane authored
such as bpchar(char_expression, N), and pull out the attrtypmod that the function is coercing to. This allows correct deduction of the column type in examples such as CREATE VIEW v AS SELECT f1::char(8) FROM tbl; Formerly we labeled v's column as char-of-unknown-length not char(8). Also, this change causes the parser not to insert a redundant length coercion function if the user has explicitly casted an INSERT or UPDATE expression to the right length.
-
- Feb 16, 2000
-
-
Thomas G. Lockhart authored
Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
-
- Feb 15, 2000
-
-
Thomas G. Lockhart authored
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.
-
- Jan 27, 2000
-
-
Tom Lane authored
SELECT DISTINCT ON (expr [, expr ...]) targetlist ... and there is a check to make sure that the user didn't specify an ORDER BY that's incompatible with the DISTINCT operation. Reimplement nodeUnique and nodeGroup to use the proper datatype-specific equality function for each column being compared --- they used to do bitwise comparisons or convert the data to text strings and strcmp(). (To add insult to injury, they'd look up the conversion functions once for each tuple...) Parse/plan representation of DISTINCT is now a list of SortClause nodes. initdb forced by querytree change...
-
- Jan 26, 2000
-
-
Bruce Momjian authored
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
-
- Jan 20, 2000
-
-
Tom Lane authored
declarations.
-
- Jan 17, 2000
-
-
Tom Lane authored
coerce_type, so that the right things happen when coercing a previously- unknown constant to a destination data type.
-
Tom Lane authored
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.
-
- Jan 10, 2000
-
-
Bruce Momjian authored
-
- Dec 12, 1999
-
-
Tom Lane authored
-
- Dec 10, 1999
-
-
Tom Lane authored
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'.
-
- Nov 01, 1999
-
-
Tom Lane authored
make_const --- don't repeat cache searches that aren't needed.
-
- Oct 07, 1999
-
-
Tom Lane authored
mentioned in FROM but not elsewhere in the query: such tables should be joined over anyway. Aside from being more standards-compliant, this allows removal of some very ugly hacks for COUNT(*) processing. Also, allow HAVING clause without aggregate functions, since SQL does. Clean up CREATE RULE statement-list syntax the same way Bruce just fixed the main stmtmulti production. CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules; you will have to initdb if you have any rules.
-
- Aug 24, 1999
-
-
Tom Lane authored
match then it tried for a self-commutative operator with the reversed input data types. This is pretty silly; there could never be such an operator, except maybe in binary-compatible-type scenarios, and we have oper_inexact for that. Besides which, the oprsanity regress test would complain about such an operator. Remove nonfunctional code and simplify routine calling convention accordingly.
-