summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2011-01-22Code cleanup for assign_transaction_read_only.Robert Haas
As in commit fb4c5d2798730f60b102d775f22fb53c26a6445d on 2011-01-21, this avoids spurious debug messages and allows idempotent changes at any time. Along the way, make assign_XactIsoLevel allow idempotent changes even when not within a subtransaction, to be consistent with the new coding of assign_transaction_read_only and because there's no compelling reason to do otherwise. Kevin Grittner, with some adjustments.
2011-01-22Quick hack to un-break plpython regression tests.Tom Lane
It's not clear to me what should happen to the other plpython_unicode variant expected files, but this patch gets things passing on my own machines and at least some of the buildfarm.
2011-01-22Allow the wal_buffers setting to be auto-tuned to a reasonable value.Tom Lane
If wal_buffers is initially set to -1 (which is now the default), it's replaced by 1/32nd of shared_buffers, with a minimum of 8 (the old default) and a maximum of the XLOG segment size. The allowed range for manual settings is still from 4 up to whatever will fit in shared memory. Greg Smith, with implementation correction by me.
2011-01-22Suppress "control reaches end of non-void function" warning from gcc 4.5.Tom Lane
Not sure why I'm seeing this on Fedora 14 and not earlier versions. Seems like a regression that gcc no longer knows that DIE() doesn't return. Still, adding a dummy return is harmless enough.
2011-01-22Suppress possibly-uninitialized-variable warnings from gcc 4.5.Tom Lane
It appears that gcc 4.5 can issue such warnings for whole structs, not just scalar variables as in the past. Refactor some pg_dump code slightly so that the OutputContext local variables are always initialized, even if they won't be used. It's cheap enough to not be worth worrying about.
2011-01-22Get rid of the global variable holding the error statePeter Eisentraut
Global error handling led to confusion and was hard to manage. With this change, errors from PostgreSQL are immediately reported to Python as exceptions. This requires setting a Python exception after reporting the caught PostgreSQL error as a warning, because PLy_elog destroys the Python exception state. Ideally, all places where PostgreSQL errors need to be reported back to Python should be wrapped in subtransactions, to make going back to Python from a longjmp safe. This will be handled in a separate patch. Jan Urbański
2011-01-22Link libpgport into pg_test_fsync on msvcMagnus Hagander
2011-01-21Avoid treating WAL senders as normal backends.Robert Haas
The previous coding treated anything that wasn't an autovacuum launcher as a normal backend, which is wrong now that we also have WAL senders. Fujii Masao, reviewed by Robert Haas, Alvaro Herrera, Tom Lane, and Bernd Helmle.
2011-01-21Code cleanup for assign_XactIsoLevel.Robert Haas
The new coding avoids a spurious debug message when a transaction that has changed the isolation level has been rolled back. It also allows the property to be freely changed to the current value within a subtransaction. Kevin Grittner, with one small change by me.
2011-01-21Correctly add exceptions to the plpy module for Python 3Peter Eisentraut
The way the exception types where added to the module was wrong for Python 3. Exception classes were not actually available from plpy. Fix that by factoring out code that is responsible for defining new Python exceptions and make it work with Python 3. New regression test makes sure the plpy module has the expected contents. Jan Urbanśki, slightly revised by me
2011-01-21Move test_fsync to /contrib.Bruce Momjian
2011-01-21Don't require usage privileges on the foreign data wrapper when creating aHeikki Linnakangas
foreign table. We check for usage privileges on the foreign server, that ought to be enough. Shigeru HANADA
2011-01-20Make ALTER TABLE revalidate uniqueness and exclusion constraints.Robert Haas
Failure to do so can lead to constraint violations. This was broken by commit 1ddc2703a936d03953657f43345460b9242bbed1 on 2010-02-07, so back-patch to 9.0. Noah Misch. Regression test by me.
2011-01-20Fix wrong commentPeter Eisentraut
Hitoshi Harada
2011-01-20Fix typoPeter Eisentraut
Hitoshi Harada
2011-01-20Factor out functions responsible for caching I/O routinesPeter Eisentraut
This makes PLy_procedure_create a bit more manageable. Jan Urbański
2011-01-20Add new psql command \dL to list languages.Robert Haas
Original patch by Fernando Ike, revived by Josh Kuperschmidt, reviewed by Andreas Karlsson, and in earlier versions by Tom Lane and Peter Eisentraut.
2011-01-19Add braces around an if block, for readabilityPeter Eisentraut
Jan Urbański, reviewed by Peter Eisentraut, Álvaro Herrera, Tom Lane :-)
2011-01-19Free plan values in the PLyPlanObject dealloc functionPeter Eisentraut
Jan Urbański
2011-01-19Improve message for errors in compiling anonymous PL/Python blocksPeter Eisentraut
The previous code would try to print out a null pointer. Jan Urbański
2011-01-18Use PyObject_New instead of PyObject_NEWPeter Eisentraut
The latter is undocumented and the speed gain is negligible. Jan Urbański
2011-01-18Skip dropped attributes when converting Python objects to tuplesPeter Eisentraut
Pay attention to the attisdropped field and skip over TupleDesc fields that have it set. Not a real problem until we get table returning functions, but it's the right thing to do anyway. Jan Urbański
2011-01-18Use palloc in TopMemoryContext instead of mallocPeter Eisentraut
As discussed, even if the PL needs a permanent memory location, it should use palloc, not malloc. It also makes error handling easier. Jan Urbański
2011-01-18Fix an error when a set-returning function fails halfway through the executionPeter Eisentraut
If the function using yield to return rows fails halfway, the iterator stays open and subsequent calls to the function will resume reading from it. The fix is to unref the iterator and set it to NULL if there has been an error. Jan Urbański