summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2003-05-23Improve implementation of btrim/ltrim/rtrim: provide a special case forTom Lane
single-byte encodings, and a direct C implementation of the single-argument forms (where spaces are always what gets trimmed). This is in preparation for using rtrim1() as the bpchar-to-text cast operator, but is a useful performance improvement even if we decide not to do that.
2003-05-20Fix coredump in pg_get_triggerdef, ensure function name is schema-Tom Lane
qualified when necessary, simplify argument-printing code.
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-15Allow Win32 to compile under MinGW. Major changes are:Bruce Momjian
Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
2003-05-15Indexing support for pattern matching operations via separate operatorPeter Eisentraut
class when lc_collate is not C.
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-13More binary I/O routines.Tom Lane
2003-05-13Change pg_amop's index on (amopclaid,amopopr) to index (amopopr,amopclaid).Tom Lane
This makes no difference for existing uses, but allows SelectSortFunction() and pred_test_simple_clause() to use indexscans instead of seqscans to locate entries for a particular operator in pg_amop. Better yet, they can use the SearchSysCacheList() API to cache the search results.
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-09Remove another old rint() replacement.Bruce Momjian
2003-05-09Binary send/receive routines for a few basic datatypes --- enough forTom Lane
testing purposes.
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-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-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-04Allow 60 in seconds fields of timestamp, time, interval input values.Tom Lane
Per recent discussion on pgsql-general, this is appropriate for spec compliance, and has the nice side-effect of easing porting from old pg_dump files that exhibit the 59.999=>60.000 roundoff problem.
2003-05-02SECOND ATTEMPTBruce Momjian
Dump/read non-default GUC values for use by exec'ed backend, for Win32.
2003-05-02Back out second part of patch.Bruce Momjian
2003-05-02Back out last commit --- wrong patch.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-30Update to describe new set of globally-known contexts planned for supportTom Lane
of extended query features in new FE/BE protocol. TransactionCommandContext is gone (PortalContext replaces it for some purposes), and QueryContext has taken on a new meaning (MessageContext plays its old role).
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-27Prevent coredump in current_schemas() if someone has just deleted aTom Lane
schema that was in our search path.
2003-04-27Department of second thoughts: probably still need an IsTransactionStateTom Lane
test in there...
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-26Repair permissions problem in RI triggers: query parsing has to be doneTom Lane
as the correct user, not only query execution. Per report from Sean Chittenden.
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-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-21stddev() and variance() should return NULL when there is just one inputTom Lane
value, per recent discussion on pgsql-general.
2003-04-19Add more documentation about shared memory costs.Tom Lane
2003-04-16Fix stupid oversight ...Tom Lane
2003-04-15eqjoinsel's logic for case where MCV lists are not present shouldTom Lane
account for NULLs; in hindsight this is obvious since the code for the MCV-lists case would reduce to this when there are zero entries in both lists. Per example from Alec Mitchell.
2003-04-12Fix encoding conversion function bug.Tatsuo Ishii
See following posting for more details. Subject: Re: [HACKERS] [BUGS] Bug #943: Server-Encoding from EUC_TW to UTF-8 doesn't From: Tatsuo Ishii <t-ishii@sra.co.jp> To: michael.enke@wincor-nixdorf.com, pgsql-bugs@postgresql.org Cc: pgsql-hackers@postgresql.org Date: Sat, 12 Apr 2003 10:51:45 +0900 (JST)
2003-04-08First phase of work on array improvements. ARRAY[x,y,z] constructorTom Lane
expressions, ARRAY(sub-SELECT) expressions, some array functions. Polymorphic functions using ANYARRAY/ANYELEMENT argument and return types. Some regression tests in place, documentation is lacking. Joe Conway, with some kibitzing from Tom Lane.
2003-04-08Mark TimeScales constants as double to avoid integer overflow in some compilers.Tom Lane
2003-04-07Avoid primary key lookup (and lock) if foreign key does not changeJan Wieck
on UPDATE. This get's rid of the long standing annoyance that updating a row that has foreign keys locks all the referenced rows even if the foreign key values do not change. The trick is to actually do a check identical to NO ACTION after an eventually done UPDATE in the SET DEFAULT case. Since a SET DEFAULT operation should have moved referencing rows to a new "home", a following NO ACTION check can only fail if the column defaults of the referencing table resulted in the key we actually deleted. Thanks to Stephan. Jan
2003-04-07Remove unnecessary dt2local() call.Tom Lane
2003-04-05Fix compile problem with Win32 macro used inside another macro.Bruce Momjian
2003-04-04Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian
2003-04-04Avoid repeated computation of the constants date2j(1970, 1, 1) andTom Lane
date2j(2000, 1, 1). Should make for some marginal speed improvement in date/time operations.
2003-04-04Code review for pg_stat_get_backend_activity_start patch --- fixTom Lane
return type, make protection condition agree with recent change to pg_stat_get_backend_activity, clean up documentation.
2003-04-03Remove zero_damaged_pages from postgresql.conf.sample; the only way toTom Lane
find out about it is to read the documentation that tells you how dangerous it is. Add default_transaction_read_only to documentation; seems to have been overlooked in patch that added read-only transactions. Clean up check_guc comparison script, which has been suffering bit rot.
2003-04-02Fix buffer overrun in to_ascii(), per report from Guido Notari.Tom Lane
2003-04-02Fix platform-dependent failure introduced by recent to_char changesTom Lane
(ye good olde uninitialized-local-variable).
2003-04-02This is a derived file and should never have been added to CVS.Tom Lane
2003-03-30Properly document default value of log_min_error_statement in postgresql.conf.Bruce Momjian
2003-03-28Add code to apply some simple sanity checks to the header fields of aTom Lane
page when it's read in, per pghackers discussion around 17-Feb. Add a GUC variable zero_damaged_pages that causes the response to be a WARNING followed by zeroing the page, rather than the normal ERROR; this is per Hiroshi's suggestion that there needs to be a way to get at the data in the rest of the table.