aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Tighten up SJIS byte sequence check. Now we reject invalid SJIS byteTatsuo Ishii2006-03-04
| | | | | sequence such as "0x95 0x27". Patches from Akio Ishida. Also update copyright notice.
* > gettimeofday.c:35: warning: integer constant is too large for "long"Bruce Momjian2006-03-04
| | | | | | | | | | > type Wouldn't it be better to use the UINT64CONST macro? I realize this file is Windows-only, but we do worry about more than one compiler on that platform. Kris Jurka
* Use DEVTTY as 'con' on Win32 as a replacement for /dev/tty.Bruce Momjian2006-03-04
|
* This patch fixes this warning.Bruce Momjian2006-03-03
| | | | | | | gettimeofday.c:35: warning: integer constant is too large for "long" type Kris Jurka
* Avoid trying to open /dev/tty on Win32. Some Win32 systems haveBruce Momjian2006-03-03
| | | | | | | | | | | /dev/tty, but it isn't a device file and doesn't work as expected. This fixes a known bug where psql does not prompt for a password on some Win32 systems. Backpatch to 8.1.X. Robert Kinberg
* Improve pg_dump and psql to use libpq's newer COPY support routines,Tom Lane2006-03-03
| | | | | instead of the old deprecated ones. Volkan Yazici, with some editorializing by moi.
* Fixes for Win32-client only compiles.Bruce Momjian2006-03-03
| | | | Hiroshi Saito
* Update ipcclean to use try 'id' first for root check.Bruce Momjian2006-03-03
|
* Add workaround so MSVC doesn't try to load strings.h, which it doesn'tBruce Momjian2006-03-03
| | | | | | have. This happens when MSVC uses pg_config.h generated by MinGW. Per report from Charles F. I. Savage
* Teach PQcmdTuples() that a COPY command tag might contain a row count,Tom Lane2006-03-03
| | | | | and tighten up its sanity checking of the tag as a safety measure. Volkan Yazici.
* Clarify macro layout for win32 IMPORT.Bruce Momjian2006-03-03
|
* Make the COPY command return a command tag that includes the number ofTom Lane2006-03-03
| | | | | rows copied. Backend side of Volkan Yazici's recent patch, with corrections and documentation.
* Dept. of second thoughts: rejigger the TRUNCATE ... CASCADE patch so thatTom Lane2006-03-03
| | | | | | | relations are still checked for permissions etc as soon as they are opened. The original form of the patch could hold exclusive lock for a long time on relations that the user doesn't even have permissions to access, let alone truncate.
* In ipcclean, check LOGNAME only if USER is not set.Bruce Momjian2006-03-03
| | | | Fixes problem with 'su' on some platforms.
* Fix a typo.Neil Conway2006-03-03
|
* Add CASCADE option to TRUNCATE. Joachim WielandTom Lane2006-03-03
|
* Add comment about localized month names for to_date and to_timestamp.Bruce Momjian2006-03-03
|
* Arrange to call AbsorbFsyncRequests every so often while performing aTom Lane2006-03-03
| | | | | | | checkpoint in the bgwriter. This forestalls overflow of the fsync request queue, which is not fatal but causes considerable performance degradation when it occurs (because backends then have to do their own fsyncs). Per patch from Itagaki Takahiro, modified a little bit by me.
* Remove unnecessary lo_lseek call in lo_open. Apparently there was onceTom Lane2006-03-02
| | | | | | | a need for it back in the neolithic era, but it's certainly dead code in any PG release we would recognize as such. Since it forces an additional network round trip to the backend, getting rid of it should provide some small performance improvement for large-object-using clients.
* Fix ancient error in large objects usage example: overwrite() subroutineTom Lane2006-03-02
| | | | | was opening with INV_READ flag and then writing. Prior to 8.1 the backend did not reject this, but now it does.
* Repair oidvectorrecv and int2vectorrecv, which I broke while changingTom Lane2006-03-02
| | | | them to use array_recv :-(. Per report from Tim Kordas.
* Fix possible crash at transaction end when a plpgsql function is used andTom Lane2006-03-02
| | | | | | | | | then modified within the same transaction. The code was using a linked list of active PLpgSQL_expr structs, which was OK when it was written because plpgsql never released any parse data structures for the life of the backend. But since Neil fixed plpgsql's memory management, elements of the linked list could be freed, leading to crash when the list is chased. Per report and test case from Kris Jurka.
* Fix up pg_dump to emit shell-type definitions at the proper time, toTom Lane2006-03-02
| | | | | | | | | | make use of the recently added ability to create a shell type explicitly. I also put in place some infrastructure to allow dump/no dump decisions to be made separately for each database object, rather than the former hardwired 'dump if in a dumpable schema' policy. This was needed anyway for shell types so now seemed a convenient time to do it. The flexibility isn't exposed to the user yet, but is ready for future extensions.
* Update the expected regression test results to account for the changes toNeil Conway2006-03-01
| | | | | error messages I made yesterday -- thanks to Andrew Dunstan for reporting this, and my apologies for missing it the first time.
* Attached is a patch that replaces a bunch of places where StringInfosNeil Conway2006-03-01
| | | | | | | | | | | | | are unnecessarily allocated on the heap rather than the stack. If the StringInfo doesn't outlive the stack frame in which it is created, there is no need to allocate it on the heap via makeStringInfo() -- stack allocation is faster. While it's not a big deal unless the code is in a critical path, I don't see a reason not to save a few cycles -- using stack allocation is not less readable. I also cleaned up a bit of code along the way: moved variable declarations into a more tightly-enclosing scope where possible, fixed some pointless copying of strings in dblink, etc.
* This patch makes the error message strings throughout the backendNeil Conway2006-03-01
| | | | | | | | more compliant with the error message style guide. In particular, errdetail should begin with a capital letter and end with a period, whereas errmsg should not. I also fixed a few related issues in passing, such as fixing the repeated misspelling of "lexeme" in contrib/tsearch2 (per Tom's suggestion).
* Fix typo in comment.Neil Conway2006-02-28
|
* Allow the syntax CREATE TYPE foo, with no parameters, to permit explicitTom Lane2006-02-28
| | | | | | | | | | creation of a shell type. This allows a less hacky way of dealing with the mutual dependency between a datatype and its I/O functions: make a shell type, then make the functions, then define the datatype fully. We should fix pg_dump to handle things this way, but this commit just deals with the backend. Martijn van Oosterhout, with some corrections by Tom Lane.
* Tweak the error message emitted when a void-returning PL/Python functionNeil Conway2006-02-28
| | | | does not return None, per suggestion from Tom.
* Allow PL/Python functions to return void, per gripe from James RobinsonNeil Conway2006-02-28
| | | | | | | (I didn't use his patch, however). A void-returning PL/Python function must return None (from Python), which is translated into a void datum (and *not* NULL) for Postgres. I also added some regression tests for this functionality.
* Add PG_VERSION_NUM for use by 3rd party applications wanting to test theBruce Momjian2006-02-28
| | | | backend version in C using > and < comparisons.
* Teach nodeSort and nodeMaterial to optimize out unnecessary overheadTom Lane2006-02-28
| | | | | when the passed-down eflags indicate they can. Simon Riggs and Tom Lane
* Extend the ExecInitNode API so that plan nodes receive a set of flagTom Lane2006-02-28
| | | | | | | | | | | | bits indicating which optional capabilities can actually be exercised at runtime. This will allow Sort and Material nodes, and perhaps later other nodes, to avoid unnecessary overhead in common cases. This commit just adds the infrastructure and arranges to pass the correct flag values down to plan nodes; none of the actual optimizations are here yet. I'm committing this separately in case anyone wants to measure the added overhead. (It should be negligible.) Simon Riggs and Tom Lane
* Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, inPeter Eisentraut2006-02-27
| | | | | particular get rid of single quotes around language names and old WITH () construct.
* Add mention that tid perhaps someday should be output as a record.Bruce Momjian2006-02-27
|
* Improve sorting speed by pre-extracting the first sort-key column ofTom Lane2006-02-26
| | | | | | each tuple, as per my proposal of several days ago. Also, clean up sort memory management by keeping all working data in a separate memory context, and refine the handling of low-memory conditions.
* Fix a few minor typos in comments in PL/Perl.Neil Conway2006-02-26
|
* Implement the <> operator for the tid type. Original patch from MarkNeil Conway2006-02-26
| | | | | Kirkwood, minor improvements by Neil Conway. The regression tests have been updated and the catversion has been bumped.
* Fix typo in comment.Neil Conway2006-02-26
|
* The Makefile was invoking perl scripts as ./script.pl. This fails whenPeter Eisentraut2006-02-24
| | | | | | | | the script is not executable as UCS_to_most.pl is in CVS. It also won't pick up any custom setting of the perl version/location to use. This patch calls perl scripts like $(PERL) $(srcdir)/script.pl. Kris Jurka
* Make restricted_exec feature for Windows more robust by using the environmentAndrew Dunstan2006-02-24
| | | | | to pass the flag instead of the command line - some implementations of getopt fail if getopt arguments are present after non-getopt arguments.
* make initdb -U username work as advertised; back out bogus patch at rev 1.42Andrew Dunstan2006-02-24
| | | | and supply real fix for problem it tried to address.
* Cleanup the usage of ScanDirection: use the symbolic names for theNeil Conway2006-02-21
| | | | | | | | | possible ScanDirection alternatives rather than magic numbers (-1, 0, 1). Also, use the ScanDirection macros in a few places rather than directly checking whether `dir == ForwardScanDirection' and the like. Per patch from James William Pye. His patch also changed ScanDirection to be a "char" rather than an enum, which I haven't applied.
* Fix old pg_dump oversight: default values for domains really need to be dumpedTom Lane2006-02-21
| | | | | | | | | | | | by decompiling the typdefaultbin expression, not just printing the typdefault text which may be out-of-date or assume the wrong schema search path. (It's the same hazard as for adbin vs adsrc in column defaults.) The catalogs.sgml spec for pg_type implies that the correct procedure is to look to typdefaultbin first and consider typdefault only if typdefaultbin is NULL. I made dumping of both domains and base types do that, even though in the current backend code typdefaultbin is always correct for domains and typdefault for base types --- might as well try to future-proof it a little. Per bug report from Alexander Galler.
* Adjust probe for getaddrinfo to cope with macro-ized definitions, suchTom Lane2006-02-21
| | | | as Tru64's. Per previous discussion.
* Fix three Python reference leaks in PLy_traceback(). This would resultNeil Conway2006-02-20
| | | | | | | | | | in leaking memory when invoking a PL/Python procedure that raises an exception. Unfortunately this still leaks memory, but at least the largest leak has been plugged. This patch also fixes a reference counting mistake in PLy_modify_tuple() for 8.0, 8.1 and HEAD: we don't actually own a reference to `platt', so we shouldn't Py_DECREF() it.
* Update obsolete comment.Tom Lane2006-02-19
|
* Modify logtape.c so that the initial LogicalTapeSetCreate call onlyTom Lane2006-02-19
| | | | | | | | | | | allocates the control data. The per-tape buffers are allocated only on first use. This saves memory in situations where tuplesort.c overestimates the number of tapes needed (ie, there are fewer runs than tapes). Also, this makes legitimate the coding in inittapes() that includes tape buffer space in the maximum-memory calculation: when inittapes runs, we've already expended the whole allowed memory on tuple storage, and so we'd better not allocate all the tape buffers until we've flushed some tuples out of memory.
* Improve tuplesort.c to support variable merge order. The original codingTom Lane2006-02-19
| | | | | | | | | | with fixed merge order (fixed number of "tapes") was based on obsolete assumptions, namely that tape drives are expensive. Since our "tapes" are really just a couple of buffers, we can have a lot of them given adequate workspace. This allows reduction of the number of merge passes with consequent savings of I/O during large sorts. Simon Riggs with some rework by Tom Lane
* Add TABLESPACE and ON COMMIT clauses to CREATE TABLE AS. ON COMMIT isNeil Conway2006-02-19
| | | | | required by the SQL standard, and TABLESPACE is useful functionality. Patch from Kris Jurka, minor editorialization by Neil Conway.