- 10 1月, 2003 1 次提交
-
-
由 Tom Lane 提交于
'NOT (x IN (subselect))', that is 'NOT (x = ANY (subselect))', rather than 'x <> ALL (subselect)' as we formerly did. This opens the door to optimizing NOT IN the same way as IN, whereas there's no hope of optimizing the expression using <>. Also, convert 'x <> ALL (subselect)' to the NOT(IN) style, so that the optimization will be available when processing rules dumped by older Postgres versions. initdb forced due to small change in SubLink node representation.
-
- 14 12月, 2002 2 次提交
-
-
由 Tom Lane 提交于
in the planned representation of a subplan at all any more, only SubPlan. This means subselect.c doesn't scribble on its input anymore, which seems like a good thing; and there are no longer three different possible interpretations of a SubLink. Simplify node naming and improve comments in primnodes.h. No change to stored rules, though.
-
由 Tom Lane 提交于
execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
-
- 13 12月, 2002 1 次提交
-
-
由 Tom Lane 提交于
make VALUE a non-reserved word again, use less invasive method of passing ConstraintTestValue into transformExpr, fix problems with nested constraint testing, do correct thing with NULL result from a constraint expression, remove memory leak. Domain checks still need much more work if we are going to allow ALTER DOMAIN, however.
-
- 12 12月, 2002 1 次提交
-
-
由 Tom Lane 提交于
so that all executable expression nodes inherit from a common supertype Expr. This is somewhat of an exercise in code purity rather than any real functional advance, but getting rid of the extra Oper or Func node formerly used in each operator or function call should provide at least a little space and speed improvement. initdb forced by changes in stored-rules representation.
-
- 05 12月, 2002 1 次提交
-
-
由 Tom Lane 提交于
to plan nodes, not vice-versa. All executor state nodes now inherit from struct PlanState. Copying of plan trees has been simplified by not storing a list of SubPlans in Plan nodes (eliminating duplicate links). The executor still needs such a list, but it can build it during ExecutorStart since it has to scan the plan tree anyway. No initdb forced since no stored-on-disk structures changed, but you will need a full recompile because of node-numbering changes.
-
- 30 11月, 2002 2 次提交
- 26 11月, 2002 2 次提交
-
-
由 Tom Lane 提交于
up code and documentation associated with Param nodes.
-
由 Tom Lane 提交于
just done for copyfuncs/equalfuncs. Read functions in particular get a lot shorter than before, and it's much easier to compare an out function with the corresponding read function to make sure they agree. initdb forced due to small changes in nodestring format (regularizing a few cases that were formerly idiosyncratic).
-
- 25 11月, 2002 1 次提交
-
-
由 Tom Lane 提交于
joinclauses is determined accurately for each join. Formerly, the code only considered joinclauses that used all of the rels from the outer side of the join; thus for example FROM (a CROSS JOIN b) JOIN c ON (c.f1 = a.x AND c.f2 = b.y) could not exploit a two-column index on c(f1,f2), since neither of the qual clauses would be in the joininfo list it looked in. The new code does this correctly, and also is able to eliminate redundant clauses, thus fixing the problem noted 24-Oct-02 by Hans-Jürgen Schönig.
-
- 15 11月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
Rod Taylor
-
- 12 11月, 2002 1 次提交
-
-
由 Tom Lane 提交于
before commit, not after :-( --- the original coding is not only unsafe if an error occurs while it's processing, but it generates an invalid sequence of WAL entries. Resurrect 7.2 logic for deleting items when no longer needed. Use an enum instead of random macros. Editorialize on names used for routines and constants. Teach backend/nodes routines about new field in CreateTable struct. Add a regression test.
-
- 07 11月, 2002 1 次提交
-
-
由 Tom Lane 提交于
hashed aggregation, but there's not yet planner support for it.
-
- 06 11月, 2002 1 次提交
-
-
由 Tom Lane 提交于
node now does its own grouping of the input rows, and has no need for a preceding GROUP node in the plan pipeline. This allows elimination of the misnamed tuplePerGroup option for GROUP, and actually saves more code in nodeGroup.c than it costs in nodeAgg.c, as well as being presumably faster. Restructure the API of query_planner so that we do not commit to using a sorted or unsorted plan in query_planner; instead grouping_planner makes the decision. (Right now it isn't any smarter than query_planner was, but that will change as soon as it has the option to select a hash- based aggregation step.) Despite all the hackery, no initdb needed since only in-memory node types changed.
-
- 15 10月, 2002 1 次提交
-
-
由 Tom Lane 提交于
as per recent pghackers discussions. initdb forced due to change in fields of stored Query nodes.
-
- 23 9月, 2002 1 次提交
-
-
由 Tom Lane 提交于
columns, to allow more correct behavior in multiple-inheritance cases. Patch by Alvaro Herrera, review by Tom Lane.
-
- 19 9月, 2002 1 次提交
-
-
由 Tom Lane 提交于
to be flexible about assignment casts without introducing ambiguity in operator/function resolution. Introduce a well-defined promotion hierarchy for numeric datatypes (int2->int4->int8->numeric->float4->float8). Change make_const to initially label numeric literals as int4, int8, or numeric (never float8 anymore). Explicitly mark Func and RelabelType nodes to indicate whether they came from a function call, explicit cast, or implicit cast; use this to do reverse-listing more accurately and without so many heuristics. Explicit casts to char, varchar, bit, varbit will truncate or pad without raising an error (the pre-7.2 behavior), while assigning to a column without any explicit cast will still raise an error for wrong-length data like 7.3. This more nearly follows the SQL spec than 7.2 behavior (we should be reporting a 'completion condition' in the explicit-cast cases, but we have no mechanism for that, so just do silent truncation). Fix some problems with enforcement of typmod for array elements; it didn't work at all in 'UPDATE ... SET array[n] = foo', for example. Provide a generalized array_length_coerce() function to replace the specialized per-array-type functions that used to be needed (and were missing for NUMERIC as well as all the datetime types). Add missing conversions int8<->float4, text<->numeric, oid<->int8. initdb forced.
-
- 05 9月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 01 9月, 2002 1 次提交
-
-
由 Tom Lane 提交于
type for runtime constraint checks, instead of misusing the parse-time Constraint node for the purpose. Fix some damage introduced into type coercion logic; in particular ensure that a coerced expression tree will read out the correct result type when inspected (patch had broken some RelabelType cases). Enforce domain NOT NULL constraints against columns that are omitted from an INSERT.
-
- 31 8月, 2002 1 次提交
-
-
由 Tom Lane 提交于
column additions, deletions, and renames that would let a child table get out of sync with its parent. Patch by Alvaro Herrera, with some kibitzing by Tom Lane.
-
- 29 8月, 2002 1 次提交
-
-
由 Tom Lane 提交于
types, SRFs. Not happy with memory management yet, but I'll commit these other changes.
-
- 27 8月, 2002 1 次提交
-
-
由 Tom Lane 提交于
array header, and to compute sizing and alignment of array elements the same way normal tuple access operations do --- viz, using the tupmacs.h macros att_addlength and att_align. This makes the world safe for arrays of cstrings or intervals, and should make it much easier to write array-type-polymorphic functions; as examples see the cleanups of array_out and contrib/array_iterator. By Joe Conway and Tom Lane.
-
- 19 8月, 2002 1 次提交
-
-
由 Tom Lane 提交于
latent wrong-struct-type bugs and makes the coding style more uniform, since the majority of places working with lists of column names were already using Strings not Idents. While at it, remove vestigial support for Stream node type, and otherwise-unreferenced nodes.h entries for T_TupleCount and T_BaseNode. NB: full recompile is recommended due to changes of Node type numbers. This shouldn't force an initdb though.
-
- 11 8月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
> l.mode, l.isgranted from pg_lock_info() as l(relation oid, database oid, > backendpid int4, mode text, isgranted bool); > ERROR: badly formatted planstring "COLUMNDEF "... > Reported by Neil Conway -- I never implemented readfuncs.c support for ColumnDef or TypeName, which is needed so that views can be created on functions returning type RECORD. Here's a patch. Joe Conway
-
- 05 8月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
types for Table Functions, as previously proposed on HACKERS. Here is a brief explanation: 1. Creates a new pg_type typtype: 'p' for pseudo type (currently either 'b' for base or 'c' for catalog, i.e. a class). 2. Creates new builtin type of typtype='p' named RECORD. This is the first of potentially several pseudo types. 3. Modify FROM clause grammer to accept: SELECT * FROM my_func() AS m(colname1 type1, colname2 type1, ...) where m is the table alias, colname1, etc are the column names, and type1, etc are the column types. 4. When typtype == 'p' and the function return type is RECORD, a list of column defs is required, and when typtype != 'p', it is disallowed. 5. A check was added to ensure that the tupdesc provide via the parser and the actual return tupdesc match in number and type of attributes. When creating a function you can do: CREATE FUNCTION foo(text) RETURNS setof RECORD ... When using it you can do: SELECT * from foo(sqlstmt) AS (f1 int, f2 text, f3 timestamp) or SELECT * from foo(sqlstmt) AS f(f1 int, f2 text, f3 timestamp) or SELECT * from foo(sqlstmt) f(f1 int, f2 text, f3 timestamp) Included in the patches are adjustments to the regression test sql and expected files, and documentation. p.s. This potentially solves (or at least improves) the issue of builtin Table Functions. They can be bootstrapped as returning RECORD, and we can wrap system views around them with properly specified column defs. For example: CREATE VIEW pg_settings AS SELECT s.name, s.setting FROM show_all_settings()AS s(name text, setting text); Then we can also add the UPDATE RULE that I previously posted to pg_settings, and have pg_settings act like a virtual table, allowing settings to be queried and set. Joe Conway
-
- 19 7月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 18 7月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
Implements between (symmetric / asymmetric) as a node. Executes the left or right expression once, makes a Const out of the resulting Datum and executes the >=, <= portions out of the Const sets. Of course, the parser does a fair amount of preparatory work for this to happen. Rod Taylor
-
- 17 7月, 2002 1 次提交
-
-
由 Tom Lane 提交于
functionality. Of note: dropping a table that has a SERIAL column defined now drops the associated sequence automatically.
-
- 13 7月, 2002 1 次提交
-
-
由 Tom Lane 提交于
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints all have real live entries in pg_constraint. pg_depend exists, and RESTRICT/CASCADE options work on most kinds of DROP; however, pg_depend is not yet very well populated with dependencies. (Most of the ones that are present at this point just replace formerly hardwired associations, such as the implicit drop of a relation's pg_type entry when the relation is dropped.) Need to add more logic to create dependency entries, improve pg_dump to dump constraints in place of indexes and triggers, and add some regression tests.
-
- 04 7月, 2002 1 次提交
-
-
由 Thomas G. Lockhart 提交于
Reused the Expr node to hold DISTINCT which strongly resembles the existing OP info. Define DISTINCT_EXPR which strongly resembles the existing OPER_EXPR opType, but with handling for NULLs required by SQL99. We have explicit support for single-element DISTINCT comparisons all the way through to the executor. But, multi-element DISTINCTs are handled by expanding into a comparison tree in gram.y as is done for other row comparisons. Per discussions, it might be desirable to move this into one or more purpose-built nodes to be handled in the backend. Define the optional ROW keyword and token per SQL99. This allows single-element row constructs, which were formerly disallowed due to shift/reduce conflicts with parenthesized a_expr clauses. Define the SQL99 TREAT() function. Currently, use as a synonym for CAST().
-
- 21 6月, 2002 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 13 5月, 2002 2 次提交
-
-
由 Tom Lane 提交于
returns-set boolean field in Func and Oper nodes. This allows cleaner, more reliable tests for expressions returning sets in the planner and parser. For example, a WHERE clause returning a set is now detected and complained of in the parser, not only at runtime.
-
由 Tom Lane 提交于
some kibitzing from Tom Lane. Not everything works yet, and there's no documentation or regression test, but let's commit this so Joe doesn't need to cope with tracking changes in so many files ...
-
- 29 4月, 2002 1 次提交
-
-
由 Tom Lane 提交于
lists to join RTEs, attach a list of Vars and COALESCE expressions that will replace the join's alias variables during planning. This simplifies flatten_join_alias_vars while still making it easy to fix up varno references when transforming the query tree. Add regression test cases for interactions of subqueries with outer joins.
-
- 18 4月, 2002 1 次提交
-
-
由 Tom Lane 提交于
an 'opclass owner' column in pg_opclass. Nothing is done with it at present, but since there are plans to invent a CREATE OPERATOR CLASS command soon, we'll probably want DROP OPERATOR CLASS too, which suggests that a notion of ownership would be a good idea.
-
- 17 4月, 2002 1 次提交
-
-
由 Tom Lane 提交于
qualified operator names directly, for example CREATE OPERATOR myschema.+ ( ... ). To qualify an operator name in an expression you need to write OPERATOR(myschema.+) (thanks to Peter for suggesting an escape hatch). I also took advantage of having to reformat pg_operator to fix something that'd been bugging me for a while: mergejoinable operators should have explicit links to the associated cross-data-type comparison operators, rather than hardwiring an assumption that they are named < and >.
-
- 12 4月, 2002 1 次提交
-
-
由 Tom Lane 提交于
entries, per pghackers discussion. This fixes aggregates to live in namespaces, and also simplifies/speeds up lookup in parse_func.c. Also, add a 'proimplicit' flag to pg_proc that controls whether a type coercion function may be invoked implicitly, or only explicitly. The current settings of these flags are more permissive than I would like, but we will need to debate and refine the behavior; for now, I avoided breaking regression tests as much as I could.
-
- 10 4月, 2002 1 次提交
-
-
由 Tom Lane 提交于
SELECT schema1.func2(...). Aggregate names can be qualified at the syntactic level, but the qualification is ignored for the moment.
-
- 30 3月, 2002 1 次提交
-
-
由 Tom Lane 提交于
in different namespaces. Also, cleanup work on relation namespace support: drop, alter, rename commands work for tables in non-default namespaces.
-