summaryrefslogtreecommitdiff
path: root/src/backend/commands
Commit message (Collapse)AuthorAgeFilesLines
* Update this branch to match CVS head, includes WIN32 improvements.Bruce Momjian2003-09-076-36/+33
|
* libpq failed to cope with COPY FROM STDIN if the command was issuedTom Lane2003-08-131-1/+11
| | | | | | | | | | via extended query protocol, because it sends Sync right after Execute without realizing that the command to be executed is COPY. There seems to be no reasonable way for it to realize that, either, so the best fix seems to be to make the backend ignore Sync during copy-in mode. Bit of a wart on the protocol, but little alternative. Also, libpq must send another Sync after terminating the COPY, if the command was issued via Execute.
* Code cleanup inspired by recent resname bug report (doesn't fix the bugTom Lane2003-08-112-24/+15
| | | | | | | | yet, though). Avoid using nth() to fetch tlist entries; provide a common routine get_tle_by_resno() to search a tlist for a particular resno. This replaces a couple uses of nth() and a dozen hand-coded search loops. Also, replace a few uses of nth(length-1, list) with llast().
* Another pgindent run with updated typedefs.Bruce Momjian2003-08-089-22/+22
|
* Rename fields of DestReceiver to avoid collisions with (ill-considered)Tom Lane2003-08-061-2/+2
| | | | macros in some platforms' sys/socket.h.
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-041-2/+2
| | | | so it won't miss 'em again.
* Update copyrights to 2003.Bruce Momjian2003-08-0426-52/+52
|
* pgindent run.Bruce Momjian2003-08-0428-998/+1044
|
* Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,Peter Eisentraut2003-08-011-3/+2
| | | | | rather than parsing the message. Add some documentation about embedded SQL.
* Adjust 'permission denied' messages to be more useful and consistent.Tom Lane2003-08-0120-152/+205
|
* Apply (a somewhat revised version of) Greg Mullane's patch to eliminateTom Lane2003-07-291-29/+45
| | | | | | | | | heuristic determination of day vs month in date/time input. Add the ability to specify that input is interpreted as yy-mm-dd order (which formerly worked, but only for yy greater than 31). DateStyle's input component now has the preferred spellings DMY, MDY, or YMD; the older keywords European and US are now aliases for the first two of these. Per recent discussions on pgsql-general.
* A visit from the message-style police ...Tom Lane2003-07-2810-39/+39
|
* Error message editing in backend/libpq, backend/postmaster, backend/tcop.Tom Lane2003-07-222-34/+5
| | | | | Along the way, fix some logic problems in pgstat_initstats, notably the bogus assumption that malloc returns zeroed memory.
* Error message editing in backend/executor.Tom Lane2003-07-211-2/+2
|
* Another round of error message editing, covering backend/commands/.Tom Lane2003-07-2026-1138/+1857
|
* First bits of work on error message editing.Tom Lane2003-07-186-340/+619
|
* For COMMENT ON DATABASE where database name is unknown or not the currentTom Lane2003-07-171-7/+25
| | | | | | database, emit a WARNING and do nothing, rather than raising ERROR. Per recent discussion in which we concluded this is the best way to deal with database dumps that are reloaded into a database of a new name.
* Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL conventionTom Lane2003-07-171-5/+8
| | | | | | for the sign of timezone offsets, ie, positive is east from UTC. These were previously out of step with other operations that accept or show timezones, such as I/O of timestamptz values.
* Now that I look, SHOW TRANSACTION_ISOLATION isn't quite consistentTom Lane2003-07-151-3/+3
| | | | with SET TRANSACTION_ISOLATION, either.
* Cause SHOW DATESTYLE to produce a string that will be accepted by SETTom Lane2003-07-151-35/+5
| | | | | | DATESTYLE, for instance 'SQL, European' instead of 'SQL with European conventions'. Per gripe a month or two back from Barry Lind.
* Some early work on error message editing. Operator-not-found andTom Lane2003-07-049-65/+50
| | | | | function-not-found messages now distinguish the cases no-match and ambiguous-match, and they follow the style guidelines too.
* Aggregates can be polymorphic, using polymorphic implementation functions.Tom Lane2003-07-011-2/+4
| | | | | | 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.
* Change EXECUTE INTO to CREATE TABLE AS EXECUTE.Peter Eisentraut2003-07-011-8/+8
|
* Add is_superuser parameter reporting, soon to be used by psql.Tom Lane2003-06-271-10/+17
|
* Fix compile warnings.Tom Lane2003-06-271-1/+2
|
* First batch of object rename commands.Peter Eisentraut2003-06-2714-71/+818
|
* Back out array mega-patch.Bruce Momjian2003-06-251-4/+2
| | | | Joe Conway
* In an attempt to simplify my life I'm submitting this patch thatBruce Momjian2003-06-241-69/+70
| | | | | | | | 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
* Array mega-patch.Bruce Momjian2003-06-241-2/+4
| | | | Joe Conway
* Brief note about sequence cache not being cleared in other backends.Bruce Momjian2003-06-121-1/+6
| | | | | | | Actually clear the cache in the backend making the alteration. This follows in the footsteps of setval(). Rod Taylor
* Add defense in assign_session_authorization() against trying to doTom Lane2003-06-061-1/+11
| | | | | | 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.
* Implement outer-level aggregates to conform to the SQL spec, withTom Lane2003-06-062-6/+6
| | | | | | | | 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.
* Knock down a couple more lappend() hotspots for large WHERE clauses.Tom Lane2003-05-281-4/+7
|
* Replace functional-index facility with expressional indexes. Any columnTom Lane2003-05-284-279/+221
| | | | | | | | | | | 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.
* Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian2003-05-274-26/+26
| | | | | docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
* Add defense against possibility that tzname[] doesn't exist.Tom Lane2003-05-221-1/+14
|
* Add code to test for unknown timezone names (following some ideas fromTom Lane2003-05-181-29/+231
| | | | | | | | 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.
* Remove use of geteuid under Win32.Bruce Momjian2003-05-161-1/+15
|
* Add copydir() function because xcopy doesn't work in XP without aBruce Momjian2003-05-151-4/+3
| | | | window.
* Backend support for autocommit removed, per recent discussions. TheTom Lane2003-05-144-30/+27
| | | | | | 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.
* Add binary I/O routines for a bunch more datatypes. Still a few to go,Tom Lane2003-05-121-4/+4
| | | | | 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.
* Implement array_send/array_recv (binary I/O for arrays). This exposedTom Lane2003-05-091-3/+17
| | | | the folly of not passing element type to typsend/typreceive, so fix that.
* COPY BINARY uses the new binary I/O routines. Update a few more datatypesTom Lane2003-05-091-194/+178
| | | | so that COPY BINARY regression test passes.
* Implement new-protocol binary I/O support in DataRow, Bind, and FunctionCallTom Lane2003-05-091-6/+4
| | | | | messages. Binary I/O is now up and working, but only for a small set of datatypes (integers, text, bytea).
* Reinstate pg_type's typsend and typreceive columns. They don't do muchTom Lane2003-05-081-97/+183
| | | | | yet, but they're there. Also some editorial work on CREATE TYPE reference page.
* Update 3.0 protocol support to match recent agreements about how toTom Lane2003-05-084-35/+28
| | | | | | | 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.
* Change alternate database location patch to test for symlink() ratherBruce Momjian2003-05-071-4/+4
| | | | than WIN32.
* Add display of eventual result RowDescription (if any) to the outputTom Lane2003-05-061-1/+29
| | | | | | 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.
* Restructure command destination handling so that we pass aroundTom Lane2003-05-064-62/+61
| | | | | | | | | | | | | | 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.
* Implement feature of new FE/BE protocol whereby RowDescription identifiesTom Lane2003-05-061-18/+17
| | | | | | | | | 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.