summaryrefslogtreecommitdiff
path: root/src/backend/commands
AgeCommit message (Collapse)Author
2003-07-04Some early work on error message editing. Operator-not-found andTom Lane
function-not-found messages now distinguish the cases no-match and ambiguous-match, and they follow the style guidelines too.
2003-07-01Aggregates can be polymorphic, using polymorphic implementation functions.Tom Lane
It also works to create a non-polymorphic aggregate from polymorphic functions, should you want to do that. Regression test added, docs still lacking. By Joe Conway, with some kibitzing from Tom Lane.
2003-07-01Change EXECUTE INTO to CREATE TABLE AS EXECUTE.Peter Eisentraut
2003-06-27Add is_superuser parameter reporting, soon to be used by psql.Tom Lane
2003-06-27Fix compile warnings.Tom Lane
2003-06-27First batch of object rename commands.Peter Eisentraut
2003-06-25Back out array mega-patch.Bruce Momjian
Joe Conway
2003-06-24In an attempt to simplify my life I'm submitting this patch thatBruce Momjian
restructures the deferred trigger queue. The fundamental change is to put all the static variables to hold the deferred triggers in a single structure. Alvaro Herrera
2003-06-24Array mega-patch.Bruce Momjian
Joe Conway
2003-06-12Brief note about sequence cache not being cleared in other backends.Bruce Momjian
Actually clear the cache in the backend making the alteration. This follows in the footsteps of setval(). Rod Taylor
2003-06-06Add defense in assign_session_authorization() against trying to doTom Lane
catalog lookups when not in a transaction. This prevents bizarre failures if someone tries to set a value for session_authorization in postgresql.conf. Per report from Fernando Nasser.
2003-06-06Implement outer-level aggregates to conform to the SQL spec, withTom Lane
extensions to support our historical behavior. An aggregate belongs to the closest query level of any of the variables in its argument, or the current query level if there are no variables (e.g., COUNT(*)). The implementation involves adding an agglevelsup field to Aggref, and treating outer aggregates like outer variables at planning time.
2003-05-28Knock down a couple more lappend() hotspots for large WHERE clauses.Tom Lane
2003-05-28Replace functional-index facility with expressional indexes. Any columnTom Lane
of an index can now be a computed expression instead of a simple variable. Restrictions on expressions are the same as for predicates (only immutable functions, no sub-selects). This fixes problems recently introduced with inlining SQL functions, because the inlining transformation is applied to both expression trees so the planner can still match them up. Along the way, improve efficiency of handling index predicates (both predicates and index expressions are now cached by the relcache) and fix 7.3 oversight that didn't record dependencies of predicate expressions.
2003-05-27Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
2003-05-22Add defense against possibility that tzname[] doesn't exist.Tom Lane
2003-05-18Add code to test for unknown timezone names (following some ideas fromTom Lane
Ross Reedstrom, a couple months back) and to detect timezones that are using leap-second timekeeping. The unknown-zone-name test is pretty heuristic and ugly, but it seems better than the old behavior of just switching to GMT given a bad name. Also make DecodePosixTimezone() a tad more robust.
2003-05-16Remove use of geteuid under Win32.Bruce Momjian
2003-05-15Add copydir() function because xcopy doesn't work in XP without aBruce Momjian
window.
2003-05-14Backend support for autocommit removed, per recent discussions. TheTom Lane
only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
2003-05-12Add binary I/O routines for a bunch more datatypes. Still a few to go,Tom Lane
but that was enough tedium for one day. Along the way, move the few support routines for types xid and cid into a more logical place.
2003-05-09Implement array_send/array_recv (binary I/O for arrays). This exposedTom Lane
the folly of not passing element type to typsend/typreceive, so fix that.
2003-05-09COPY BINARY uses the new binary I/O routines. Update a few more datatypesTom Lane
so that COPY BINARY regression test passes.
2003-05-09Implement new-protocol binary I/O support in DataRow, Bind, and FunctionCallTom Lane
messages. Binary I/O is now up and working, but only for a small set of datatypes (integers, text, bytea).
2003-05-08Reinstate pg_type's typsend and typreceive columns. They don't do muchTom Lane
yet, but they're there. Also some editorial work on CREATE TYPE reference page.
2003-05-08Update 3.0 protocol support to match recent agreements about how toTom Lane
handle multiple 'formats' for data I/O. Restructure CommandDest and DestReceiver stuff one more time (it's finally starting to look a bit clean though). Code now matches latest 3.0 protocol document as far as message formats go --- but there is no support for binary I/O yet.
2003-05-07Change alternate database location patch to test for symlink() ratherBruce Momjian
than WIN32.
2003-05-06Add display of eventual result RowDescription (if any) to the outputTom Lane
of Describe on a prepared statement. This was in the original 3.0 protocol proposal, but I took it out for reasons that seemed good at the time. Put it back per yesterday's pghackers discussion.
2003-05-06Restructure command destination handling so that we pass aroundTom Lane
DestReceiver pointers instead of just CommandDest values. The DestReceiver is made at the point where the destination is selected, rather than deep inside the executor. This cleans up the original kluge implementation of tstoreReceiver.c, and makes it easy to support retrieving results from utility statements inside portals. Thus, you can now do fun things like Bind and Execute a FETCH or EXPLAIN command, and it'll all work as expected (e.g., you can Describe the portal, or use Execute's count parameter to suspend the output partway through). Implementation involves stuffing the utility command's output into a Tuplestore, which would be kind of annoying for huge output sets, but should be quite acceptable for typical uses of utility commands.
2003-05-06Implement feature of new FE/BE protocol whereby RowDescription identifiesTom Lane
the column by table OID and column number, if it's a simple column reference. Along the way, get rid of reskey/reskeyop fields in Resdoms. Turns out that representation was not convenient for either the planner or the executor; we can make the planner deliver exactly what the executor wants with no more effort. initdb forced due to change in stored rule representation.
2003-05-05Extended query protocol: parse, bind, execute, describe FE/BE messages.Tom Lane
Only lightly tested as yet, since libpq doesn't know anything about 'em.
2003-05-04Disable alternate locations on Win32 because it doesn't support symlinks.Bruce Momjian
2003-05-02Portal and memory management infrastructure for extended query protocol.Tom Lane
Both plannable queries and utility commands are now always executed within Portals, which have been revamped so that they can handle the load (they used to be good only for single SELECT queries). Restructure code to push command-completion-tag selection logic out of postgres.c, so that it won't have to be duplicated between simple and extended queries. initdb forced due to addition of a field to Query nodes.
2003-04-29Infrastructure for deducing Param types from context, in the same wayTom Lane
that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so.
2003-04-29Code review for holdable-cursors patch. Fix error recovery, memoryTom Lane
context sloppiness, some other things. Includes Neil's mopup patch of 22-Apr.
2003-04-27Clean up some problems in SetClientEncoding: failed to honor doit flagTom Lane
in all cases, leaked TopMemoryContext memory in others. Make the interaction between SetClientEncoding and InitializeClientEncoding cleaner and better documented. I suspect these changes should be back-patched into 7.3, but will wait on Tatsuo's verification.
2003-04-25Make [VACUUM] ANALYZE safe on zero-column tables.Tom Lane
2003-04-25In the continuing saga of FE/BE protocol revisions, add reporting ofTom Lane
initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.)
2003-04-25COPY and pg_dump failed to cope with zero-column tables. Fix 'em.Tom Lane
2003-04-24Infrastructure for upgraded error reporting mechanism. elog.c isTom Lane
rewritten and the protocol is changed, but most elog calls are still elog calls. Also, we need to contemplate mechanisms for controlling all this functionality --- eg, how much stuff should appear in the postmaster log? And what API should libpq expose for it?
2003-04-22Another round of protocol changes. Backend-to-frontend messages now allTom Lane
have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery.
2003-04-21Prevent palloc(0) error when parent table has zero columns.Tom Lane
2003-04-20Avoid O(N^2) behavior with lots of deferred triggers by makingTom Lane
deferredTriggerInvokeEvents only scan events added since it last ran. Stephan Szabo, some corrections by Tom Lane.
2003-04-19Allow \r and \r\n termination for COPY files.Bruce Momjian
Output \r\n termination on Win32. Disallow literal carriage return as a data value, backslash-carriage-return and \r still allowed. Doc changes already committed.
2003-04-19Add pipe parameter to COPY function to allow proper line termination.Bruce Momjian
2003-04-19Second round of FE/BE protocol changes. Frontend->backend messages nowTom Lane
have length counts, and COPY IN data is packetized into messages.
2003-04-08Remove extraneous semicolons.Tom Lane
2003-04-04Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian
2003-04-04Handle cp, rm, and exec for Win32.Bruce Momjian
2003-04-03Prevent EXPLAIN (without ANALYZE) SELECT ... INTO from creating an INTOTom Lane
table. Needed due to recent change that makes us call ExecutorStart even when not planning to carry out the query.