summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2009-02-07ecpg requires libpq; add Makefile rules to require libpq to be builtBruce Momjian
first. Alvaro Herrera
2009-02-07Fix to_timestamp() to not require upper/lower case matching for meridianBruce Momjian
designations (AM/PM). Also separate out matching of a meridian with periods (e.g. A.M.) and with those without. Do the same for AD/BC. Brendan Jurd
2009-02-07Fix obsolete comment. Zdenek KotalaHeikki Linnakangas
2009-02-07Set column privileges to supportedPeter Eisentraut
2009-02-06Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge joinTom Lane
keys when considering a semi or anti join. This requires estimating the selectivity of the merge qual as though it were a regular inner join condition. To allow caching both that and the real outer-join-aware selectivity, split RestrictInfo.this_selec into two fields. This fixes one of the problems reported by Kevin Grittner.
2009-02-06Clean up some loose ends from the column privileges patch: addTom Lane
has_column_privilege and has_any_column_privilege SQL functions; fix the information_schema views that are supposed to pay attention to column privileges; adjust pg_stats to show stats for any column you have select privilege on; and fix COPY to allow copying a subset of columns if the user has suitable per-column privileges for all the columns. To improve efficiency of some of the information_schema views, extend the has_xxx_privilege functions to allow inquiring about the OR of a set of privileges in just one call. This is just exposing capability that already existed in the underlying aclcheck routines. In passing, make the information_schema views report the owner's own privileges as being grantable, since Postgres assumes this even when the grant option bit is not set in the ACL. This is a longstanding oversight. Also, make the new has_xxx_privilege functions for foreign data objects follow the same coding conventions used by the older ones. Stephen Frost and Tom Lane
2009-02-05Add PL/PgSQL FOUND and GET DIAGNOSTICS support for RETURN QUERYBruce Momjian
statement Pavel Stehule
2009-02-05Mixing long and int entries of a union only works on some architectures.Michael Meskes
2009-02-05Fix an old corner-case error in match_unsorted_outer(): don't considerTom Lane
the cheapest-total inner path as a new candidate while truncating the sort key list, if it already matched the full sort key list. This is too much of a corner case to be worth back-patching, since it's unusual for the cheapest total path to be sorted, and anyway no real harm is done (except in JOIN_SEMI/ANTI cases where cost_mergejoin is a bit broken at the moment). But it wasn't behaving as intended, so fix it. Noted while examining a test case from Kevin Grittner. This error doesn't explain his issue, but it does explain why "set enable_seqscan = off" seemed to reproduce it for me.
2009-02-04Added result checks for calls to gmtime().Michael Meskes
2009-02-03Argh, wrong line copied again.Michael Meskes
2009-02-03Fixed copy&paste mistake that made library use uninitialized variable.Michael Meskes
2009-02-03Add a failure check for syslogger's use of _beginthreadex(), and removeTom Lane
unnecessary thread address output parameter, to make this code look more like that in pg_restore.
2009-02-02Fix plpgsql to not treat INSERT INTO as an INTO-variables clause anywhereTom Lane
in the string, not just at the start. Per bug #4629 from Martin Blazek. Back-patch to 8.2; prior versions don't have the problem, at least not in the reported case, because they don't try to recognize INTO in non-SELECT statements. (IOW, this is really fallout from the RETURNING patch.)
2009-02-02Provide for parallel restoration from a custom format archive. Each data andAndrew Dunstan
post-data step is run in a separate worker child (a thread on Windows, a child process elsewhere) up to the concurrent number specified by the new pg_restore command-line --multi-thread | -m switch. Andrew Dunstan, with some editing by Tom Lane.
2009-02-02Allow reloption names to have qualifiers, initially supporting a TOASTAlvaro Herrera
qualifier, and add support for this in pg_dump. This allows TOAST tables to have user-defined fillfactor, and will also enable us to move the autovacuum parameters to reloptions without taking away the possibility of setting values for TOAST tables.
2009-02-02When changing a regression test file one should also change the expected ↵Michael Meskes
output file.
2009-02-02Set memory segment to '0', just to be sure.Michael Meskes
2009-02-02Fixed auto allocation for binary data types.Michael Meskes
2009-02-02Fixed bug in %s handling.Michael Meskes
2009-01-30Fix unnest() to handle a toasted input array safely. Per report fromTom Lane
Alvaro.
2009-01-30Check that connection limit is within valid range. IOW, not < -1.Heikki Linnakangas
It's missing in older versions too, but it doesn't seem worth back-porting. All negative are just harmlessly treated as "no limit", and tightening the check might even brake an application that relies on it.
2009-01-30Make messages consistent with existing onesPeter Eisentraut
2009-01-30Whitespace fix in messagePeter Eisentraut
2009-01-29Update time zone data files to tzdata release 2009a: introduces Asia/KathmanduTom Lane
as the preferred spelling of that zone name, corrects historical DST information for Switzerland and Cuba.
2009-01-29Replace argument-checking Asserts with regular test-and-elog checks in allTom Lane
encoding conversion functions. These are not can't-happen cases because it's possible to create a conversion with the wrong conversion function for the specified encoding pair. That would lead to an Assert crash in an Assert-enabled build, or incorrect conversion otherwise, neither of which is desirable. This would be a DOS issue if production databases were customarily built with asserts enabled, but fortunately that's not so. Per an observation by Heikki. Back-patch to all supported branches.
2009-01-29Fix incorrect dereferencing of char* to array's index.Teodor Sigaev
Per Tommy Gildseth <tommy.gildseth@usit.uio.no> report
2009-01-29Message fixPeter Eisentraut
2009-01-28Change warning-silencing code not to cast the pointer type, insteadMagnus Hagander
casting the value of the variable later. Per comments from Tom.
2009-01-28Go over all OpenSSL return values and make sure we compare themMagnus Hagander
to the documented API value. The previous code got it right as it's implemented, but accepted too much/too little compared to the API documentation. Per comment from Zdenek Kotala.
2009-01-28Support running as a service on Windows 7, by not specifyingMagnus Hagander
the JOB_OBJECT_UILIMIT_HANDLES flag. Dave Page & Magnus Hagander
2009-01-27Silence compiler warning on win32.Magnus Hagander
ITAGAKI Takahiro
2009-01-27Silence compiler warnings in new win32 locale codeMagnus Hagander
when building on mingw. ITAGAKI Takahiro
2009-01-27Revert updatable viewsPeter Eisentraut
2009-01-26Allow extracting and parsing of reloptions from a bare pg_class tuple, andAlvaro Herrera
refactor the relcache code that used to do that. This allows other callers (particularly autovacuum) to do the same without necessarily having to open and lock a table.
2009-01-26Message format tuningPeter Eisentraut
2009-01-23Tweak the existing special case for AIX in pg_getaddrinfo_all() to handleTom Lane
yet another failure case in AIX's getaddrinfo(). Per report and patch by Andrew Chernow.
2009-01-23Message style reviewPeter Eisentraut
2009-01-23Put back fast-path for the case that there's no backup blocks inHeikki Linnakangas
RestoreBkpBlocks. Went missing in my recent refactoring patch, as pointed out by Simon's hot standby patch.
2009-01-22Recreate ecpg_config.h with a stamp file created by config.status, samePeter Eisentraut
way pg_config.h is handled. This avoids reruns of config.status on every build, if configure has been rerun.
2009-01-22Support column-level privileges, as required by SQL standard.Tom Lane
Stephen Frost, with help from KaiGai Kohei and others
2009-01-22Only skip pages marked as clean in the visibility map, if the last 32Heikki Linnakangas
pages were marked as clean as well. The idea is to avoid defeating OS readahead by skipping a page here and there, and also makes it less likely that we miss an opportunity to advance relfrozenxid, for the sake of only a few skipped pages.
2009-01-22Update comments to reflect that tgenabled is not a boolean anymore.Heikki Linnakangas
Jonah Harris, with minor tinkering by me.
2009-01-22Automatic view update rulesPeter Eisentraut
Bernd Helmle
2009-01-22Explicitly bind gettext to the correct encoding on Windows.Magnus Hagander
Original patch from Hiroshi Inoue.
2009-01-21Remove stray ' character at end of line.Magnus Hagander
For some reason it broke OpenBSD compile even when it's inside a #ifdef WIN32 block.....
2009-01-21Forgot to handle the new SPI_OK_REWRITTEN result code in a couple places.Heikki Linnakangas
2009-01-21Add new SPI_OK_REWRITTEN return code to SPI_execute and friends, for theHeikki Linnakangas
case that the command is rewritten into another type of command. The old behavior to return the command tag of the last executed command was pretty surprising. In PL/pgSQL, for example, it meant that if a command was rewritten to a utility statement, FOUND wasn't set at all.
2009-01-21Make win32 builds always do SetEnvironmentVariable() when doing putenv().Magnus Hagander
Also, if linked against other versions than the default MSVCRT library (for example the MSVC build which links against MSVCRT80), also update the cache in the default MSVCRT at the same time. This should fix the issues with setting LC_MESSAGES on the MSVC build. Original patch from Hiroshi Inoue and Hiroshi Saito, much rewritten by me.
2009-01-21Make some strings translatable again that were accidentally removed inMagnus Hagander
earlier patch to fix "printf-arguments".