- 20 Jun, 2007 1 commit
-
-
Tom Lane authored
create table foo (bar int default null default 3); due to not thinking about the special-case handling of DEFAULT NULL. Problem noticed while investigating bug #3396.
-
- 19 Jun, 2007 1 commit
-
-
Neil Conway authored
-
- 11 Jun, 2007 1 commit
-
-
Tom Lane authored
Along the way, allow FOR UPDATE in non-WITH-HOLD cursors; there may once have been a reason to disallow that, but it seems to work now, and it's really rather necessary if you want to select a row via a cursor and then update it in a concurrent-safe fashion. Original patch by Arul Shaji, rather heavily editorialized by Tom Lane.
-
- 27 Apr, 2007 1 commit
-
-
Tom Lane authored
types of unspecified parameters when submitted via extended query protocol. This worked in 8.2 but I had broken it during plancache changes. DECLARE CURSOR is now treated almost exactly like a plain SELECT through parse analysis, rewrite, and planning; only just before sending to the executor do we divert it away to ProcessUtility. This requires a special-case check in a number of places, but practically all of them were already special-casing SELECT INTO, so it's not too ugly. (Maybe it would be a good idea to merge the two by treating IntoClause as a form of utility statement? Not going to worry about that now, though.) That approach doesn't work for EXPLAIN, however, so for that I punted and used a klugy solution of running parse analysis an extra time if under extended query protocol.
-
- 13 Mar, 2007 1 commit
-
-
Tom Lane authored
module and teach PREPARE and protocol-level prepared statements to use it. In service of this, rearrange utility-statement processing so that parse analysis does not assume table schemas can't change before execution for utility statements (necessary because we don't attempt to re-acquire locks for utility statements when reusing a stored plan). This requires some refactoring of the ProcessUtility API, but it ends up cleaner anyway, for instance we can get rid of the QueryContext global. Still to do: fix up SPI and related code to use the plan cache; I'm tempted to try to make SQL functions use it too. Also, there are at least some aspects of system state that we want to ensure remain the same during a replan as in the original processing; search_path certainly ought to behave that way for instance, and perhaps there are others.
-
- 20 Feb, 2007 1 commit
-
-
Tom Lane authored
storing mostly-redundant Query trees in prepared statements, portals, etc. To replace Query, a new node type called PlannedStmt is inserted by the planner at the top of a completed plan tree; this carries just the fields of Query that are still needed at runtime. The statement lists kept in portals etc. now consist of intermixed PlannedStmt and bare utility-statement nodes --- no Query. This incidentally allows us to remove some fields from Query and Plan nodes that shouldn't have been there in the first place. Still to do: simplify the execution-time range table; at the moment the range table passed to the executor still contains Query trees for subqueries. initdb forced due to change of stored rules.
-
- 01 Feb, 2007 1 commit
-
-
Bruce Momjian authored
Standard English uses "may", "can", and "might" in different ways: may - permission, "You may borrow my rake." can - ability, "I can lift that log." might - possibility, "It might rain today." Unfortunately, in conversational English, their use is often mixed, as in, "You may use this variable to do X", when in fact, "can" is a better choice. Similarly, "It may crash" is better stated, "It might crash".
-
- 12 Jan, 2007 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 11 Jan, 2007 2 commits
-
-
Bruce Momjian authored
expressions/functions.
-
Bruce Momjian authored
ORDER BY.
-
- 09 Jan, 2007 1 commit
-
-
Tom Lane authored
per-column options for btree indexes. The planner's support for this is still pretty rudimentary; it does not yet know how to plan mergejoins with nondefault ordering options. The documentation is pretty rudimentary, too. I'll work on improving that stuff later. Note incompatible change from prior behavior: ORDER BY ... USING will now be rejected if the operator is not a less-than or greater-than member of some btree opclass. This prevents less-than-sane behavior if an operator that doesn't actually define a proper sort ordering is selected.
-
- 05 Jan, 2007 1 commit
-
-
Bruce Momjian authored
back-stamped for this.
-
- 11 Oct, 2006 1 commit
-
-
Tom Lane authored
don't cheat on the raw-vs-cooked status of a constraint.
-
- 04 Oct, 2006 1 commit
-
-
Bruce Momjian authored
-
- 18 Sep, 2006 2 commits
-
-
Tom Lane authored
the input query's target list too soon, causing it to affect processing of ORDER BY in the input query.
-
Tom Lane authored
oversight in original implementation of VALUES. Also fix an oversight in recent addition of options to CREATE TABLE AS: they weren't getting propagated if the query was a set-operation such as UNION.
-
- 30 Aug, 2006 1 commit
-
-
Tom Lane authored
Bernd Helmle
-
- 25 Aug, 2006 1 commit
-
-
Tom Lane authored
blocking concurrent writes to the table. Greg Stark, with a little help from Tom Lane.
-
- 21 Aug, 2006 1 commit
-
-
Tom Lane authored
by abandoning the idea that it should say SERIAL in the dump. Instead, dump serial sequences and column defaults just like regular ones. Add a new backend command ALTER SEQUENCE OWNED BY to let pg_dump recreate the sequence-to-column dependency that was formerly created "behind the scenes" by SERIAL. This restores SERIAL to being truly "just a macro" consisting of component operations that can be stated explicitly in SQL. Furthermore, the new command allows sequence ownership to be reassigned, so that old mistakes can be cleaned up. Also, downgrade the OWNED-BY dependency from INTERNAL to AUTO, since there is no longer any very compelling argument why the sequence couldn't be dropped while keeping the column. (This forces initdb, to be sure the right kinds of dependencies are in there.) Along the way, add checks to prevent ALTER OWNER or SET SCHEMA on an owned sequence; you can now only do this indirectly by changing the owning table's owner or schema. This is an oversight in previous releases, but probably not worth back-patching.
-
- 12 Aug, 2006 2 commits
-
-
Tom Lane authored
merely a matter of fixing the error check, since the underlying Portal infrastructure already handles it. This in turn allows these statements to be used in some existing plpgsql and plperl contexts, such as a plpgsql FOR loop. Also, do some marginal code cleanup in places that were being sloppy about distinguishing SELECT from SELECT INTO.
-
Tom Lane authored
plpgsql support to come later. Along the way, convert execMain's SELECT INTO support into a DestReceiver, in order to eliminate some ugly special cases. Jonah Harris and Tom Lane
-
- 10 Aug, 2006 1 commit
-
-
Tom Lane authored
same data type and same typmod, we show that typmod as the output typmod, rather than generic -1. This responds to several complaints over the past few years about UNIONs unexpectedly dropping length or precision info.
-
- 02 Aug, 2006 3 commits
-
-
Tom Lane authored
transformInsertStmt: the target table is already in p_rtable at that point.
-
Tom Lane authored
test to avoid expensive contain_vars_of_level() scan in the normal case where we're not inside a rule.
-
Joe Conway authored
(e.g. "INSERT ... VALUES (...), (...), ...") and elsewhere as allowed by the spec. (e.g. similar to a FROM clause subselect). initdb required. Joe Conway and Tom Lane.
-
- 14 Jul, 2006 1 commit
-
-
Bruce Momjian authored
-
- 11 Jul, 2006 1 commit
-
-
Bruce Momjian authored
-
- 03 Jul, 2006 1 commit
-
-
Tom Lane authored
discussion (including making def_arg allow reserved words), add missed opt_definition for UNIQUE case. Put the reloptions support code in a less random place (I chose to make a new file access/common/reloptions.c). Eliminate header inclusion creep. Make the index options functions safely user-callable (seems like client apps might like to be able to test validity of options before trying to make an index). Reduce overhead for normal case with no options by allowing rd_options to be NULL. Fix some unmaintainably klugy code, including getting rid of Natts_pg_class_fixed at long last. Some stylistic cleanup too, and pay attention to keeping comments in sync with code. Documentation still needs work, though I did fix the omissions in catalogs.sgml and indexam.sgml.
-
- 02 Jul, 2006 1 commit
-
-
Bruce Momjian authored
ITAGAKI Takahiro
-
- 27 Jun, 2006 1 commit
-
-
Bruce Momjian authored
Greg Stark
-
- 21 Jun, 2006 1 commit
-
-
Tom Lane authored
This is disallowed by the SQL spec because it doesn't have any very sensible interpretation. Historically Postgres has allowed it but behaved strangely. As of PG 8.1 a server crash is possible if the MIN/MAX index optimization gets applied; rather than try to "fix" that, it seems best to just enforce the spec restriction. Per report from Josh Drake and Alvaro Herrera.
-
- 30 Apr, 2006 1 commit
-
-
Tom Lane authored
support both FOR UPDATE and FOR SHARE in one command, as well as both NOWAIT and normal WAIT behavior. The more general code is actually simpler and cleaner.
-
- 22 Apr, 2006 1 commit
-
-
Tom Lane authored
not named ones, and replace linear searches of the list with array indexing. The named-parameter support has been dead code for many years anyway, and recent profiling suggests that the searching was costing a noticeable amount of performance for complex queries.
-
- 23 Mar, 2006 1 commit
-
-
Tom Lane authored
for various mistakes involving INSERT and UPDATE target columns.
-
- 14 Mar, 2006 1 commit
-
-
Tom Lane authored
during parse analysis, not only errors detected in the flex/bison stages. This is per my earlier proposal. This commit includes all the basic infrastructure, but locations are only tracked and reported for errors involving column references, function calls, and operators. More could be done later but this seems like a good set to start with. I've also moved the ReportSyntaxErrorPosition logic out of psql and into libpq, which should make it available to more people --- even within psql this is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
-
- 05 Mar, 2006 1 commit
-
-
Bruce Momjian authored
-
- 19 Feb, 2006 1 commit
-
-
Neil Conway authored
required by the SQL standard, and TABLESPACE is useful functionality. Patch from Kris Jurka, minor editorialization by Neil Conway.
-
- 15 Jan, 2006 1 commit
-
-
Neil Conway authored
data type is unspecified or is declared to be "unknown", the type will be inferred from the context in which the parameter is used. This was already possible for protocol-level prepared statements.
-
- 22 Nov, 2005 1 commit
-
-
Bruce Momjian authored
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
-