summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2009-02-27Add the long options to the psql --help display, where they were curiouslyPeter Eisentraut
missing. Since this touches most lines of the help output, also change the mix of puts and printf calls to printf everywhere, for easier code editing and reviewing.
2009-02-27Improve create_unique_path to not be fooled by unrelated clauses that happenTom Lane
to be syntactically part of a semijoin clause. For example given WHERE EXISTS(SELECT ... WHERE upper.var = lower.var AND some-condition) where some-condition is just a restriction on the lower relation, we can use unique-ification on lower.var after having applied some-condition within the scan on lower.
2009-02-26Remove outdated join_1.out regression test comparison file. This hasTom Lane
been broken for more than a month, so evidently it's not needed, at least not for any configuration in the buildfarm. We can correct it and replace it later if we find something that still needs it.
2009-02-26Final removal of -q options, which haven't done anything since 8.3 andPeter Eisentraut
were marked for removal in 8.4.
2009-02-26Add a -w/--no-password option that prevents all password prompts to allPeter Eisentraut
programs that have a -W/--password option. In passing, remove the ancient PSQL_ALWAYS_GET_PASSWORDS compile option.
2009-02-25Fix an old problem in decompilation of CASE constructs: the ruleutils.c codeTom Lane
looks for a CaseTestExpr to figure out what the parser did, but it failed to consider the possibility that an implicit coercion might be inserted above the CaseTestExpr. This could result in an Assert failure in some cases (but correct results if Asserts weren't enabled), or an "unexpected CASE WHEN clause" error in other cases. Per report from Alan Li. Back-patch to 8.1; problem doesn't exist before that because CASE was implemented differently.
2009-02-25Remove references to foreign data wrapper libraries, since they haveMagnus Hagander
been removed. This should unbreak the msvc build again.
2009-02-25Use the same style in the help synopsis that other programs are using.Peter Eisentraut
2009-02-25Remove feof(stdin) calls related to when to prompt for a password,Peter Eisentraut
leftovers from when the password was read from stdin.
2009-02-25Sort the output of --help mostly alphabetical, make it align better, makePeter Eisentraut
help of pg_dump and pg_dumpall more similar.
2009-02-25Put back a "continue" that went missing in the changes to start backgroundHeikki Linnakangas
writer in WAL recovery.
2009-02-25Get rid of the rather fuzzily defined FlattenedSubLink node type in favor ofTom Lane
making pull_up_sublinks() construct a full-blown JoinExpr tree representation of IN/EXISTS SubLinks that it is able to convert to semi or anti joins. This makes pull_up_sublinks() a shade more complex, but the gain in semantic clarity is worth it. I still have more to do in this area to address the previously-discussed problems, but this commit in itself fixes at least one bug in HEAD, as shown by added regression test case.
2009-02-24Don't append epoch to log_filename if no format specifier is given.Peter Eisentraut
Robert Haas
2009-02-24Add the possibility to specify an explicit validator function for foreign-dataPeter Eisentraut
wrappers (similar to procedural languages). This way we don't need to retain the nearly empty libraries, and we are more free in how to implement the wrapper API in the future.
2009-02-24Repair a longstanding bug in CLUSTER and the rewriting variants of ALTERTom Lane
TABLE: if the command is executed by someone other than the table owner (eg, a superuser) and the table has a toast table, the toast table's pg_type row ends up with the wrong typowner, ie, the command issuer not the table owner. This is quite harmless for most purposes, since no interesting permissions checks consult the pg_type row. However, it could lead to unexpected failures if one later tries to drop the role that issued the command (in 8.1 or 8.2), or strange warnings from pg_dump afterwards (in 8.3 and up, which will allow the DROP ROLE because we don't create a "redundant" owner dependency for table rowtypes). Problem identified by Cott Lang. Back-patch to 8.1. The problem is actually far older --- the CLUSTER variant can be demonstrated in 7.0 --- but it's mostly cosmetic before 8.1 because we didn't track ownership dependencies before 8.1. Also, fixing it before 8.1 would require changing the call signature of heap_create_with_catalog(), which seems to carry a nontrivial risk of breaking add-on modules.
2009-02-23Fix psql's \dD to show only one row per domain, even when the domain hasTom Lane
multiple check constraints.
2009-02-23Add quotes to messagePeter Eisentraut
2009-02-23Change the signaling of end-of-recovery. Startup process now indicates endHeikki Linnakangas
of recovery by exiting with exit code 0, like in previous releases. Per Tom's suggestion.
2009-02-20another small message tweakPeter Eisentraut
2009-02-20Reconnect to the right database when using parallel restore with -C. Fixes ↵Andrew Dunstan
bug reported by Olivier Prenant
2009-02-20Simplify overcomplicated (and overly restrictive) test to see whether anTom Lane
IS NULL condition is rendered redundant by detection of an antijoin. If we know that a join is an antijoin, then *any* Var coming out of its righthand side must be NULL, not only the joining column(s). Also, it's still gonna be null after being passed up through higher joins, whether they're outer joins or not. I was misled by a faulty analogy to reduce_outer_joins() in the original coding. But consider select * from a left join b on a.x = b.y where b.y is null and b.z is null; The first IS NULL condition justifies deciding that the join is an antijoin (if the = is strict) and then the second one is just plain redundant.
2009-02-19Improve comments about semijoin implementation strategy, per a questionTom Lane
from Robert Haas.
2009-02-19Fix bogus comment, from the patch to start bgwriter during archiveHeikki Linnakangas
recovery.
2009-02-19Wordsmithing for PL/Perl messagesPeter Eisentraut
2009-02-19Add an implicit rule %.c -> %.i for running the C preprocessor.Peter Eisentraut
I occasionally use this for debugging, and it seems wasteful to have to reinvent this all the time.
2009-02-19Remove croak and Perl_croak from gettext triggers. While we couldPeter Eisentraut
selectively mark up their arguments for translation, the Perl xsubpp tool generates a bunch of additional Perl_croak calls that we cannot control, so we'd be creating a confusing mix of translated and untranslated messages of a similar kind. This is something that might deserve a more comprehensive solution later. Also remove _ from gettext triggers, because it wasn't used. Use SPI.c instead of SPI.xs as source file for xgettext, because the .xs format isn't really supported in xgettext.
2009-02-19Increase NUM_AUXILIARY_PROCS, now that the startup process can co-existHeikki Linnakangas
with other auxiliary processes for a short period. As witnessed by buildfarm member dungbeetle.
2009-02-18Remove the special cases to prevent minus-zero results in float4 and float8Tom Lane
unary minus operators. We weren't attempting to prevent minus zero anywhere else; in view of our gradual trend to make the float datatypes more IEEE standard compliant, we should allow minus zero here rather than disallow it elsewhere. We don't, however, expect that all platforms will produce minus zero, so we need to adjust the one affected regression test to allow both results. Per discussion of bug #4660. (In passing, clean up a couple other minor infelicities in float.c.)
2009-02-18Start background writer during archive recovery. Background writer now performsHeikki Linnakangas
its usual buffer cleaning duties during archive recovery, and it's responsible for performing restartpoints. This requires some changes in postmaster. When the startup process has done all the initialization and is ready to start WAL redo, it signals the postmaster to launch the background writer. The postmaster is signaled again when the point in recovery is reached where we know that the database is in consistent state. Postmaster isn't interested in that at the moment, but that's the point where we could let other backends in to perform read-only queries. The postmaster is signaled third time when the recovery has ended, so that postmaster knows that it's safe to start accepting connections. The startup process now traps SIGTERM, and performs a "clean" shutdown. If you do a fast shutdown during recovery, a shutdown restartpoint is performed, like a shutdown checkpoint, and postmaster kills the processes cleanly. You still have to continue the recovery at next startup, though. Currently, the background writer is only launched during archive recovery. We could launch it during crash recovery as well, but it seems better to keep that codepath as simple as possible, for the sake of robustness. And it couldn't do any restartpoints during crash recovery anyway, so it wouldn't be that useful. log_restartpoints is gone. Use log_checkpoints instead. This is yet to be documented. This whole operation is a pre-requisite for Hot Standby, but has some value of its own whether the hot standby patch makes 8.4 or not. Simon Riggs, with lots of modifications by me.
2009-02-18Add --freeze option to vacuumdb.Bruce Momjian
2009-02-18Have pg_dump/pg_dumpall --binary-upgrade restore frozenids for relationsBruce Momjian
and databases.
2009-02-18Message wordsmithingPeter Eisentraut
2009-02-17Add missing newline.Bruce Momjian
2009-02-17Add pg_dump --binary-upgrade flag to be used by binary upgradeBruce Momjian
utilities. The new code allows transfer of dropped column information to the upgraded server.
2009-02-17Add _() calls for the argument of plpgsql_yyerror() so it actually getsPeter Eisentraut
translated somehow.
2009-02-17Add plpgsql_yyerror to gettext triggersPeter Eisentraut
2009-02-17Mark 3rd argument of validate_tupdesc_compat() for translation, instead ofPeter Eisentraut
marking up each instance separately.
2009-02-17Redefine _() to dgettext() instead of gettext() so that it uses the plpgsqlPeter Eisentraut
text domain, instead of the postgres one (or whatever the default may be).
2009-02-17Remove gettext trigger write_stderr(), which isn't used by PLs.Peter Eisentraut
2009-02-16Wrap some long queries.Bruce Momjian
2009-02-16Uppercase keywords in pg_dump.cBruce Momjian
2009-02-15Teach the planner to treat a partial unique index as proving a variable isTom Lane
unique for a particular query, if the index predicate is satisfied. This requires a bit of reordering of operations so that we check the predicates before doing any selectivity estimates, but shouldn't really cause any noticeable slowdown. Per a comment from Michal Politowski.
2009-02-15Loop calling CallNamedPipe() several times in case it fails,Magnus Hagander
since it can be transient failures, causing kill() to not properly send signals. Original patch from Steve Marshall, modified by me.
2009-02-14A couple of marginal performance hacks for the information_schema views:Tom Lane
replace the old recursive-SQL-function implementation of _pg_keysequal() with use of the built-in array containment operators, and change table_constraints' UNION to UNION ALL. Per discussion with Octavio Alvarez. initdb not forced since this doesn't affect results, but you'd need to initdb or reload the information_schema to see the new definitions.
2009-02-13Fix UNLISTEN to fall out quickly if the current backend has never executedTom Lane
any LISTEN command. This is more important than it used to be because DISCARD ALL invokes UNLISTEN. Connection-pooled applications making heavy use of DISCARD ALL were seeing significant contention for pg_listener, as reported by Matteo Beccati. It seems unlikely that clients using LISTEN would use pooled connections, so this simple tweak seems sufficient, especially since the pg_listener implementation is slated to go away soon anyway. Back-patch to 8.3, where DISCARD ALL was introduced.
2009-02-12The Czech (cs_CZ) and Slovak (sk_SK) locales sort numbers after letters,Peter Eisentraut
instead of vice versa. Update the regression test expectations to support that. In the plpgsql test, adjust the test data so that this isn't an issue. In the char and varchar tests, add new expected files.
2009-02-12Unset language-related locale settings in any case, otherwise psql willPeter Eisentraut
speak in tongues and mess up the regression test diffs.
2009-02-12Don't call SetEnvironmentVariable() when removing an environment variable,Magnus Hagander
as this seems to crash on at least some versions of MingW. Our current usage of this function does not require it, so it should be ok to ignore.
2009-02-11Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physicallyTom Lane
get rid of the OID column. This eliminates the problem discovered by Heikki back in November that 8.4's suppression of "unnecessary" junk filtering in INSERT/SELECT could lead to an Assert failure, or storing of oids into a table that shouldn't have them if Asserts are off. While that particular problem could have been solved in other ways, it seems likely to be just a forerunner of things to come if we continue to allow tables to contain rows that disagree with the pg_class.relhasoids setting. It's better to make this operation slow than to sacrifice performance or risk bugs in more common code paths. Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids. This was a bit more controversial, but in view of the very small amount of extra code needed given the current ALTER TABLE infrastructure, it seems best to eliminate the asymmetry in features.
2009-02-11Tweak configure to attempt to add -qnoansialias to CFLAGS whenever runningTom Lane
on AIX with a non-gcc compiler. The previous coding would do this only if CC was exactly "xlc"; which is a bad idea, as demonstrated by trouble report from Mihai Criveti.