summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-02-01Add validator to PL/PythonPeter Eisentraut
Jan Urbański, reviewed by Hitoshi Harada
2011-02-01Set up PLPerl trigger data using C code instead of Perl code.Andrew Dunstan
This is an efficiency change, and means we now no longer have to run "out $_TD; local $_TD = shift;", which was especially pointless in the case of non-trigger functions where the passed value was always undef anyway. A tiny open issue is whether we should get rid of the $prolog argument of mkfunc, and the corresponding pushed value, which is now just a constant "false". Tim Bunce, reviewed by Alex Hunsaker.
2011-02-01Undefine setlocale() macro on Win32Magnus Hagander
New versions of libintl redefine setlocale() to a macro which causes problems when the backend and libintl are linked against different versions of the runtime, which is often the case in msvc builds. Hiroshi Inoue, slightly updated comment by me
2011-02-01Re-classify ERRCODE_DATABASE_DROPPED to 57P04Simon Riggs
2011-02-01Fix wrong error reports in 'number of array dimensions exceeds theItagaki Takahiro
maximum allowed' messages, that have reported one-less dimensions. Alexey Klyukin
2011-02-01Create new errcode for recovery conflict caused by db drop on master.Simon Riggs
Previously reported as ERRCODE_ADMIN_SHUTDOWN, this case is now reported as ERRCODE_T_R_DATABASE_DROPPED. No message text change. Unlikely to happen on most servers, so low impact change to allow session poolers to correctly handle this situation. Tatsuo Ishii, edits by me, review by Robert Haas
2011-01-31Fix error code for canceling statement due to conflict with recovery.Simon Riggs
All retryable conflict errors now have an error code that indicates that a retry is possible, correcting my incomplete fix of 2010/05/12 Tatsuo Ishii and Simon Riggs, input from Robert Haas and Florian Pflug
2011-01-31Fix typoHeikki Linnakangas
2011-01-31Support multiple concurrent pg_basebackup backups.Heikki Linnakangas
With this patch, pg_basebackup doesn't write a backup_label file in the data directory, so it doesn't interfere with a pg_start/stop_backup() based backup anymore. backup_label is still included in the backup, but it is injected directly into the tar stream. Heikki Linnakangas, reviewed by Fujii Masao and Magnus Hagander.
2011-01-30Fix typoAndrew Dunstan
2011-01-30Enable building with the Mingw64 compiler.Andrew Dunstan
This can be used to build 64 bit Windows binaries, not only on 64 bit Windows but on supported cross-compiling hosts including 32 bit Windows, Cygwin, Darwin and Linux.
2011-01-30Make reduce_outer_joins() smarter about semijoins.Tom Lane
reduce_outer_joins() mistakenly treated a semijoin like a left join for purposes of deciding whether not-null constraints created by the join's quals could be passed down into the join's left-hand side (possibly resulting in outer-join simplification there). Actually, semijoin works like inner join for this purpose, ie, we do not need to see any rows that can't possibly satisfy the quals. Hence, two-line fix to treat semi and inner joins alike. Per observation by Andres Freund about a performance gripe from Yazan Suleiman. Back-patch to 8.4, since this oversight has been there since the current handling of semijoins was implemented.
2011-01-30Add option to include WAL in base backupMagnus Hagander
When included, this makes the base backup a complete working "clone" of the initial database, ready to have a postmaster started against it without the need to set up any log archiving or similar. Magnus Hagander, reviewed by Fujii Masao and Heikki Linnakangas
2011-01-29Use GSSAPI library for SSPI auth, when native SSPI is not availableMagnus Hagander
This allows non-Windows clients to connect to a Windows server with SSPI authentication. Christian Ullrich, largely modified by me
2011-01-29Try to avoid running with a full fsync request queue.Robert Haas
When we need to insert a new entry and the queue is full, compact the entire queue in the hopes of making room for the new entry. Doing this on every insertion might worsen contention on BgWriterCommLock, but when the queue it's full, it's far better than allowing the backend to perform its own fsync, per testing by Greg Smith as reported in http://archives.postgresql.org/pgsql-hackers/2011-01/msg02665.php Original idea from Greg Smith. Patch by me. Review by Chris Browne and Greg Smith
2011-01-27Don't include <asm/ia64regs.h> unnecessarily.Tom Lane
We only need that header when compiling with icc, since the gcc variant of ia64_get_bsp() uses in-line assembly code. Per report from Frank Brendel, the header doesn't exist on all IA64 platforms; so don't include it unless we need it.
2011-01-27Update psql's \copyright to match the text we have in the COPYRIGHT file.Heikki Linnakangas
2011-01-27Restore ALTER TABLE .. ADD COLUMN w/DEFAULT restriction.Robert Haas
This reverts commit a06e41deebdf74b8b5109329dc75b2e9d9057962 of 2011-01-26. Per discussion, this behavior is not wanted, as it would need to change if we ever made composite types support DEFAULT.
2011-01-26Change inv_truncate() to not repeat its systable_getnext_ordered() scan.Tom Lane
In the case where the initial call of systable_getnext_ordered() returned NULL, this function would nonetheless call it again. That's undefined behavior that only by chance failed to not give visibly incorrect results. Put an if-test around the final loop to prevent that, and in passing improve some comments. No back-patch since there's no actual failure. Per report from YAMAMOTO Takashi.
2011-01-27autoreconfPeter Eisentraut
Synchronize pg_config.h.in with configure.in (someone must have forgotten to run autoheader or autoreconf), and clean up some spurious change in configure introduced by the last commit there.
2011-01-27Do not prefix error messages with the string "PL/Python: "Peter Eisentraut
It is redundant, given the error context. Jan Urbański
2011-01-27Improve exception usage in PL/PythonPeter Eisentraut
Use the built-in TypeError, not SPIError, for errors having to do with argument counts or types. Use SPIError, not simply plpy.Error, for errors in PLy_spi_execute_plan. Finally, do not set a Python exception if PyArg_ParseTuple failed, as it already sets the correct exception. Jan Urbański
2011-01-27Also save the error detail in SPIErrorPeter Eisentraut
The temporarily broken plpython_unicode test shows a case where this is used. Do remaining fix-ups on the expected files at the same time.
2011-01-27Fix compiler warningsPeter Eisentraut
Older versions of GCC appear to report these with the current standard option set, newer versions need -Wformat-security.
2011-01-26Add a comment explaining why we force physical removal of OIDs.Robert Haas
Noah Misch, slightly revised.
2011-01-26Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.Robert Haas
The previous coding prevented ALTER TABLE .. ADD COLUMN from being used with a non-NULL default in situations where the table's rowtype was being used elsewhere. But this is a completely arbitrary restriction since you could do the same operation in multiple steps (add the column, add the default, update the table). Inspired by a patch from Noah Misch, though I didn't use his code.
2011-01-25Replace pg_class.relhasexclusion with pg_index.indisexclusion.Tom Lane
There isn't any need to track this state on a table-wide basis, and trying to do so introduces undesirable semantic fuzziness. Move the flag to pg_index, where it clearly describes just a single index and can be immutable after index creation.
2011-01-25Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX.Tom Lane
This feature allows a unique or pkey constraint to be created using an already-existing unique index. While the constraint isn't very functionally different from the bare index, it's nice to be able to do that for documentation purposes. The main advantage over just issuing a plain ALTER TABLE ADD UNIQUE/PRIMARY KEY is that the index can be created with CREATE INDEX CONCURRENTLY, so that there is not a long interval where the table is locked against updates. On the way, refactor some of the code in DefineIndex() and index_create() so that we don't have to pass through those functions in order to create the index constraint's catalog entries. Also, in parse_utilcmd.c, pass around the ParseState pointer in struct CreateStmtContext to save on notation, and add error location pointers to some error reports that didn't have one before. Gurjeet Singh, reviewed by Steve Singer and Tom Lane
2011-01-25Typo fix for MemSet size.Magnus Hagander
Fujii Masao
2011-01-25Document the "S" option for psql's \dn command in the psql helpPeter Eisentraut
This option was recently introduced, but the documentation in help.c was not updated.
2011-01-25Call PLy_spi_execute_fetch_result inside the try/catch blockPeter Eisentraut
This way errors from fetching tuples are correctly reported as errors in the SPI call. While at it, avoid palloc(0). Jan Urbański
2011-01-24Refactor PLy_spi_prepare to save two levels of indentationPeter Eisentraut
Instead of checking whether the arglist is NULL and then if its length is 0, do it in one step, and outside of the try/catch block. Jan Urbański
2011-01-24Fix typo in the psql \d query handling, so that we use the correct queryHeikki Linnakangas
against 9.0 servers.
2011-01-24Exclude sepgsql from MSVC regression testing as wellMagnus Hagander
In passing, change exclusion in the build to follow the same pattern as other always-excluded modules.
2011-01-24Silence compiler warning about uninitialized variable, noted byHeikki Linnakangas
Itagaki Takahiro
2011-01-23Blind attempt to exclude sepgsql from MSVC build system.Robert Haas
2011-01-23sepgsql, an SE-Linux integration for PostgreSQLRobert Haas
This is still pretty rough - among other things, the documentation needs work, and the messages need a visit from the style police - but this gets the basic framework in place. KaiGai Kohei
2011-01-23Make walsender options order-independentMagnus Hagander
While doing this, also move base backup options into a struct instead of increasing the number of parameters to multiple functions for each new option.
2011-01-23Reorder includes to unbreak MSVCMagnus Hagander
2011-01-23Add 'directory' format to pg_dump. The new directory format is compatibleHeikki Linnakangas
with the 'tar' format, in that untarring a tar format archive produces a valid directory format archive. Joachim Wieland and Heikki Linnakangas
2011-01-23Fix another portability issue in pg_basebackup.Tom Lane
The target of sscanf with a %o format had better be of integer width, but "mode_t" conceivably isn't that. Another compiler warning seen only on some platforms; this one I think is potentially a real bug and not just a warning.
2011-01-23Improve getObjectDescription's display of pg_amop and pg_amproc entries.Tom Lane
Include the lefttype/righttype columns explicitly (instead of assuming the reader can deduce them from the operator or function description), and move the operator or function description to the end of the string, to make it clearer that it's a referenced object and not the amop or amproc item itself. Per extensive discussion of Andreas Karlsson's original patch. Andreas Karlsson, Tom Lane
2011-01-23Revert "Factor out functions responsible for caching I/O routines".Tom Lane
This reverts commit 740e54ca84c437fd67524f97a3ea9ddea752e208, which seems to have tickled an optimization bug in gcc 4.5.x, as reported upstream at https://bugzilla.redhat.com/show_bug.cgi?id=671899 Since this patch had no purpose beyond code beautification, it's not worth expending a lot of effort to look for another workaround.
2011-01-23Add .gitignore file to silence complaints about pg_basebackup.Tom Lane
2011-01-23Suppress uninitialized-variable warning.Tom Lane
2011-01-23Silence flex warnings about DOS file paths in MSVC buildsAndrew Dunstan
2011-01-23Use pg_strcasecmp instead of strcasecmp for portabilityMagnus Hagander
Per buildfarm.
2011-01-23Only show pg_stat_replication details to superusersMagnus Hagander
2011-01-23filemode is parsed on win32 even if never usedMagnus Hagander
Per buildfarm failure.
2011-01-23Add pg_basebackup tool for streaming base backupsMagnus Hagander
This tool makes it possible to do the pg_start_backup/ copy files/pg_stop_backup step in a single command. There are still some steps to be done before this is a complete backup solution, such as the ability to stream the required WAL logs, but it's still usable, and could do with some buildfarm coverage. In passing, make the checkpoint request optionally fast instead of hardcoding it. Magnus Hagander, reviewed by Fujii Masao and Dimitri Fontaine