summaryrefslogtreecommitdiff
path: root/src/test/regress
Commit message (Collapse)AuthorAgeFilesLines
* Fix interval input parser so that fractional weeks and months areTom Lane2006-09-042-0/+14
| | | | | | | cascaded first to days and only what is leftover into seconds. This seems to satisfy the principle of least surprise given the general conversion to three-part interval values --- it was an oversight that these cases weren't dealt with in 8.1. Michael Glaesemann
* Code review for UPDATE SET (columnlist) patch. Make it handle as muchTom Lane2006-09-032-30/+75
| | | | | | of the syntax as this fundamentally dead-end approach can, in particular combinations of single and multi column assignments. Improve rather inadequate documentation and provide some regression tests.
* Properly round months into days and into seconds for intervalBruce Momjian2006-09-031-1/+1
| | | | | | | multiplication/division queries like select '41 mon 10:00:00'::interval / 10 as "pos". Report from Michael Glaesemann
* Apply a simple solution to the problem of making INSERT/UPDATE/DELETETom Lane2006-09-022-2/+210
| | | | | | | | | | | | | | | RETURNING play nice with views/rules. To wit, have the rule rewriter rewrite any RETURNING clause found in a rule to produce what the rule's triggering query asked for in its RETURNING clause, in particular drop the RETURNING clause if no RETURNING in the triggering query. This leaves the responsibility for knowing how to produce the view's output columns on the rule author, without requiring any fundamental changes in rule semantics such as adding new rule event types would do. The initial implementation constrains things to ensure that there is exactly one, unconditionally invoked RETURNING clause among the rules for an event --- later we might be able to relax that, but for a post feature freeze fix it seems better to minimize how much invention we do. Per gripe from Jaime Casanova.
* Extend COPY to support COPY (SELECT ...) TO ...Tom Lane2006-08-304-3/+212
| | | | Bernd Helmle
* Add the ability to create indexes 'concurrently', that is, withoutTom Lane2006-08-252-0/+90
| | | | | blocking concurrent writes to the table. Greg Stark, with a little help from Tom Lane.
* Fix all known problems with pg_dump's handling of serial sequencesTom Lane2006-08-215-5/+20
| | | | | | | | | | | | | | | | | | | | | by abandoning the idea that it should say SERIAL in the dump. Instead, dump serial sequences and column defaults just like regular ones. Add a new backend command ALTER SEQUENCE OWNED BY to let pg_dump recreate the sequence-to-column dependency that was formerly created "behind the scenes" by SERIAL. This restores SERIAL to being truly "just a macro" consisting of component operations that can be stated explicitly in SQL. Furthermore, the new command allows sequence ownership to be reassigned, so that old mistakes can be cleaned up. Also, downgrade the OWNED-BY dependency from INTERNAL to AUTO, since there is no longer any very compelling argument why the sequence couldn't be dropped while keeping the column. (This forces initdb, to be sure the right kinds of dependencies are in there.) Along the way, add checks to prevent ALTER OWNER or SET SCHEMA on an owned sequence; you can now only do this indirectly by changing the owning table's owner or schema. This is an oversight in previous releases, but probably not worth back-patching.
* Add a 'waiting' column to pg_stat_activity to carry the same informationTom Lane2006-08-191-1/+1
| | | | | | | that ps_status provides by appending 'waiting' to the PS display. This completes the project of making it feasible to turn off process title updates and instead rely on pg_stat_activity. Per my suggestion a few weeks ago.
* Support INSERT/UPDATE/DELETE RETURNING in plpgsql, with rowcount checkingTom Lane2006-08-142-0/+256
| | | | | | as per yesterday's proposal. Also make things a tad more orthogonal by adding the recent STRICT addition to EXECUTE INTO. Jonah Harris and Tom Lane
* If test postmaster fails to start within 60 seconds, try to kill -9 itTom Lane2006-08-131-3/+19
| | | | | so that it won't interfere with later trials. Per recent buildfarm experience. Anyone know how to do this on Windows?
* Extend 'guc' regression test to check manipulations of datestyle asTom Lane2006-08-132-12/+347
| | | | | | | | well as vacuum_cost_delay. Since datestyle is a string variable, this exercises memory allocation issues that might not appear when modifying an integer GUC variable. Also, we can observe the side effects of changing datestyle to check that assign hooks are called at the right times.
* Original coding of 'returning' regression test inadvertently chose aTom Lane2006-08-132-10/+10
| | | | | | nonunique join value, leading to plan-choice-dependent results ... and it seems some platforms will choose a different plan. Tweak the test so that it has well-defined results. Per report from Olivier Prenant.
* Add INSERT/UPDATE/DELETE RETURNING, with basic docs and regression tests.Tom Lane2006-08-124-3/+286
| | | | | | | | plpgsql support to come later. Along the way, convert execMain's SELECT INTO support into a DestReceiver, in order to eliminate some ugly special cases. Jonah Harris and Tom Lane
* Tweak sanity_check regression test to display more tables (viz, thoseTom Lane2006-08-062-72/+142
| | | | | | | | without indexes) but not to display temp tables. It's a bit hard to credit that sanity_check could get through a database-wide VACUUM while the preceding create_index test is still trying to clean up its temp tables ... but I see no other explanation for the current failure report from buildfarm member sponge.
* Add some basic tests of GUC behavior.Tom Lane2006-08-044-4/+222
| | | | Joachim Wieland
* Remove use of a regex character class in resultmap (for freebsd versionTom Lane2006-08-031-1/+1
| | | | | | | | check). This isn't supported by pg_regress since the recent rewrite into C. While we could add char classes to pg_regress.c's code, it's not really needed at the moment: thanks to Andrew's patch to make pg_regress always accept the 'standard' comparison file, we can just drop the version check.
* A few regression tests for VALUES, from Gavin Sherry.Tom Lane2006-08-036-0/+136
|
* Remove extra argument to printf().Bruce Momjian2006-08-011-2/+2
|
* have pg_regress fall back on testing with the canonical results file if anAndrew Dunstan2006-08-011-1/+31
| | | | alternative test is specified but none succeeds.
* Fix WIN32 wait() return value macros to be accurate, particularlyBruce Momjian2006-07-301-22/+21
| | | | | | | | | because they are used for testing the return value from system(). (WIN32 doesn't overlay the return code with other failure conditions like Unix does, so they are just simple macros.) Fix regression checks to properly handle diff failures on Win32 using the new macros.
* SQL2003-standard statistical aggregates, by Sergey Koposov. I've added onlyTom Lane2006-07-284-13/+77
| | | | | | | the float8 versions of the aggregates, which is all that the standard requires. Sergey's original patch also provided versions using numeric arithmetic, but given the size and slowness of the code, I doubt we ought to include those in core.
* Aggregate functions now support multiple input arguments. I also tookTom Lane2006-07-278-73/+169
| | | | | | | | the opportunity to treat COUNT(*) as a zero-argument aggregate instead of the old hack that equated it to COUNT(1); this is materially cleaner (no more weird ANYOID cases) and ought to be at least a tiny bit faster. Original patch by Sergey Koposov; review, documentation, simple regression tests, pg_dump and psql support by moi.
* Original coding of pg_regress.c made the results and log directoriesTom Lane2006-07-271-2/+2
| | | | | with restrictive permissions, which was not the behavior of the shell script and doesn't seem very desirable. Use the umask setting instead.
* Allow units to be specified with configuration settings.Peter Eisentraut2006-07-271-1/+1
|
* Remove hard-wired lists of timezone abbreviations in favor of providingTom Lane2006-07-258-16/+6
| | | | | | | | | configuration files that can be altered by a DBA. The australian_timezones GUC setting disappears, replaced by a timezone_abbreviations setting (set this to 'Australia' to get the effect of australian_timezones). The list of zone names defined by default has undergone a bit of cleanup, too. Documentation still needs some work --- in particular, should we fix Table B-4, or just get rid of it? Joachim Wieland, with some editorializing by moi.
* Use correct ifdef test for cygwin, namely __CYGWIN__ (note underscores).Andrew Dunstan2006-07-251-3/+3
|
* Remove dubious and redundant (we think) setting of libdir in PATH for non ↵Andrew Dunstan2006-07-241-10/+1
| | | | temp-install case.
* Add libdir to PATH for Cygwin as well as WIN32 - should fix buildfarm eel.Andrew Dunstan2006-07-221-3/+3
|
* Ah, I finally realize why Magnus wanted to add a --bindir option toTom Lane2006-07-212-16/+38
| | | | | | | | | pg_regress: there's no other way to cope with testing a relocated installation. Seems better to call it --psqldir though, since the only thing we need to find in that case is psql. It'd be better if we could use find_other_exec, but that's not happening unless we are willing to install pg_regress alongside psql, which seems unlikely to happen.
* As a stopgap to get the Windows buildfarm members running again, hot-wireTom Lane2006-07-201-31/+40
| | | | | | the check on diff's exit status to check for literally 0 or 1. Someone should look into why WIFEXITED/WEXITSTATUS don't work for this, but I've spent more than enough time on it already.
* Print out diff status code when we think there's a hard failure.Tom Lane2006-07-201-4/+9
| | | | May help in debugging behavior on Windows.
* Suppress unused-variable compiler warning, per Andrew Dunstan.Tom Lane2006-07-201-1/+3
|
* Fix pg_regress.c to report tests in a parallel group when they finish,Tom Lane2006-07-201-27/+48
| | | | | | not when they're started. This mimics a subtle point of the behavior of the old shell script, and gives better feedback when watching the tests.
* Make pg_regress.c get paths from pg_config_paths.h, instead of -DTom Lane2006-07-202-12/+15
| | | | | switches passed from the Makefile. This looks like it will fix problem with virtual vs real paths under msys.
* Adjust spawn_process() to avoid unnecessary overhead processes: we canTom Lane2006-07-192-18/+24
| | | | | | just exec instead of creating a subprocess. This reduces process usage from four processes per parallel test to two. I have no idea whether a comparable optimization is possible or useful in the Windows port.
* Adjust pg_regress to print out the exact string given to system() whenTom Lane2006-07-191-7/+6
| | | | | 'make install' or 'initdb' fails. Also minor simplification of fgets() usage --- fgets guarantees a trailing null anyway.
* kill() is declared in <signal.h> per Single Unix Spec.Tom Lane2006-07-191-1/+2
|
* Tweak command quoting for Windows (I'd forgotten about SYSTEMQUOTE).Tom Lane2006-07-191-12/+12
|
* Remove unnecessary inclusion of libpq into pg_regress --- overlyTom Lane2006-07-191-2/+2
| | | | enthusiastic copy and paste ...
* Rewrite pg_regress as a C program instead of a shell script.Tom Lane2006-07-194-801/+1626
| | | | | | | This allows it to be used on Windows without installing mingw (though you do still need 'diff'), and opens the door to future improvements such as message localization. Magnus Hagander and Tom Lane.
* Make pg_regress a tad simpler and more general-purpose by removing itsTom Lane2006-07-183-13/+29
| | | | | | | | code to forcibly drop regressuser[1-4] and regressgroup[1-2]. Instead, let the privileges.sql test do that for itself (this is made easy by the recent addition of DROP ROLE IF EXISTS). Per a recent patch proposed by Joachim Wieland --- the rest of his patch is superseded by the rewrite into C, but this is a good idea we should adopt.
* Allow include files to compile own their own.Bruce Momjian2006-07-131-1/+2
| | | | | | | Strip unused include files out unused include files, and add needed includes to C files. The next step is to remove unused include files in C files.
* Add support to GIN for =(anyarray,anyarray) operationTeodor Sigaev2006-07-113-1/+16
|
* Please find attached two patches for documentation and regression testsBruce Momjian2006-07-069-57/+275
| | | | | | for the usage of full time zone names. Joachim Wieland
* Do a pass of code review for the ALTER TABLE ADD INHERITS patch. KeepNeil Conway2006-07-021-2/+4
| | | | | | | | | the read lock we hold on the table's parent relation until commit. Update equalfuncs.c for the new field in AlterTableCmd. Various improvements to comments, variable names, and error reporting. There is room for further improvement here, but this is at least a step in the right direction.
* ALTER TABLE ... ADD/DROPS INHERIT (actually INHERIT / NO INHERIT)Bruce Momjian2006-07-022-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Open items: There were a few tangentially related issues that have come up that I think are TODOs. I'm likely to tackle one or two of these next so I'm interested in hearing feedback on them as well. . Constraints currently do not know anything about inheritance. Tom suggested adding a coninhcount and conislocal like attributes have to track their inheritance status. . Foreign key constraints currently do not get copied to new children (and therefore my code doesn't verify them). I don't think it would be hard to add them and treat them like CHECK constraints. . No constraints at all are copied to tables defined with LIKE. That makes it hard to use LIKE to define new partitions. The standard defines LIKE and specifically says it does not copy constraints. But the standard already has an option called INCLUDING DEFAULTS; we could always define a non-standard extension LIKE table INCLUDING CONSTRAINTS that gives the user the option to request a copy including constraints. . Personally, I think the whole attislocal thing is bunk. The decision about whether to drop a column from children tables or not is something that should be up to the user and trying to DWIM based on whether there was ever a local definition or the column was acquired purely through inheritance is hardly ever going to match up with user expectations. . And of course there's the whole unique and primary key constraint issue. I think to get any traction at all on this you have a prerequisite of a real partitioned table implementation where the system knows what the partition key is so it can recognize when it's a leading part of an index key. Greg Stark
* Change TRUNCATE's method for searching for foreign-key references so thatTom Lane2006-06-293-23/+23
| | | | | | the order in which it visits tables is not dependent on the physical order of pg_constraint entries, and neither are the error messages it gives. This should correct recently-noticed instability in regression tests.
* Add INCLUDING CONSTRAINTS to CREATE TABLE LIKE.Bruce Momjian2006-06-273-3/+36
| | | | Greg Stark
* Change the row constructor syntax (ROW(...)) so that list elements foo.*Tom Lane2006-06-262-0/+98
| | | | | | | | | | will be expanded to a list of their member fields, rather than creating a nested rowtype field as formerly. (The old behavior is still available by omitting '.*'.) This syntax is not allowed by the SQL spec AFAICS, so changing its behavior doesn't violate the spec. The new behavior is substantially more useful since it allows, for example, triggers to check for data changes with 'if row(new.*) is distinct from row(old.*)'. Per my recent proposal.
* Increase timeout in statement_timeout test from 1 second to 2 seconds.Tom Lane2006-06-182-4/+4
| | | | | | | | | We have once or twice seen failures suggesting that control didn't get to the exception block before the timeout elapsed, which is unlikely but not impossible in a parallel regression test (with a dozen other backends competing for cycles). This change doesn't completely prevent the problem of course, but it should reduce the probability enough that we don't see it anymore. Per buildfarm results.