summaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Prevent duplicate attribute names in XMLELEMENT.Peter Eisentraut2007-01-083-1/+6
|
* Some fine-tuning of xmlpi in corner cases:Peter Eisentraut2007-01-073-0/+24
| | | | | | - correct error codes - do syntax checks in correct order - strip leading spaces of argument
* Replace xmlroot with a properly functioning version that parses the value,Peter Eisentraut2007-01-063-3/+38
| | | | | | | | | sets the items, and serializes the value back (rather than adding an arbitrary number of XML preambles as before). The libxml memory management via palloc had to be disabled because it crashes when libxml tries to access memory that was helpfully freed earlier by PostgreSQL. This needs further thought.
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-056-12/+12
| | | | back-stamped for this.
* Call setrlimit if possible in pg_regress to allow core file generation, and ↵Andrew Dunstan2007-01-051-1/+34
| | | | provide a switch for similar behaviour in pg_ctl.
* Update expected result for new inet error message wording.Bruce Momjian2007-01-021-4/+4
|
* Add a regression test for ALTER SET TABLESPACE; this is a whole separateTom Lane2007-01-022-0/+26
| | | | code path in tablecmds.c that wasn't exercised at all before.
* Add n_live_tuples and n_dead_tuples to pg_stat_all_tables.Bruce Momjian2007-01-021-3/+3
| | | | | | | | | The purpose is to allow autovacuum-esq conditional vacuuming and clustering using SQL to discover the required stats. No documentation updates required. Catalog version updated. Glen Parker
* Fix float4/8 to handle Infinity and Nan consistently, e.g. Infinity is aBruce Momjian2007-01-027-38/+62
| | | | | | | | | | | | | | | | | valid result from a computation if one of the input values was infinity. The previous code assumed an operation that returned infinity was an overflow. Handle underflow/overflow consistently, and add checks for aggregate overflow. Consistently prevent Inf/Nan from being cast to integer data types. Fix INT_MIN % -1 to prevent overflow. Update regression results for new error text. Per report from Roman Kononov.
* Support type modifiers for user-defined types, and pull most knowledgeTom Lane2006-12-307-0/+129
| | | | | | about typmod representation for standard types out into type-specific typmod I/O functions. Teodor Sigaev, with some editorialization by Tom Lane.
* Handle content and document options in xmlparse() correctly.Peter Eisentraut2006-12-283-2/+38
|
* Code review for XML patch. Instill a bit of sanity in the location ofTom Lane2006-12-242-2/+2
| | | | | | | the XmlExpr code in various lists, use a representation that has some hope of reverse-listing correctly (though it's still a de-escaping function shy of correctness), generally try to make it look more like Postgres coding conventions.
* Restructure operator classes to allow improved handling of cross-data-typeTom Lane2006-12-236-654/+735
| | | | | | | | | | | | | | | | cases. Operator classes now exist within "operator families". While most families are equivalent to a single class, related classes can be grouped into one family to represent the fact that they are semantically compatible. Cross-type operators are now naturally adjunct parts of a family, without having to wedge them into a particular opclass as we had done originally. This commit restructures the catalogs and cleans up enough of the fallout so that everything still works at least as well as before, but most of the work needed to actually improve the planner's behavior will come later. Also, there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way to create a new family right now is to allow CREATE OPERATOR CLASS to make one by default. I owe some more documentation work, too. But that can all be done in smaller pieces once this infrastructure is in place.
* Fix expected file.Peter Eisentraut2006-12-211-0/+5
|
* Initial SQL/XML support: xml data type and initial set of functions.Peter Eisentraut2006-12-219-29/+332
|
* Set pg_am.amstrategies to zero for index AMs that don't have fixedTom Lane2006-12-182-8/+6
| | | | | | | operator strategy numbers, ie, GiST and GIN. This is almost cosmetic enough to not need a catversion bump, but since the opr_sanity regression test has to change in sync with the catalog entry, I figured I'd better do one.
* Add a txn_start column to pg_stat_activity. This makes it easier toNeil Conway2006-12-061-1/+1
| | | | | | | | identify long-running transactions. Since we already need to record the transaction-start time (e.g. for now()), we don't need any additional system calls to report this information. Catversion bumped, initdb required.
* Change pg_stat_all_tables and sister views to put the recently-addedTom Lane2006-11-241-3/+3
| | | | | | | | | vacuum/analyze timestamp columns at the end, rather than at a random spot in the middle as in the original patch. This was deemed more usable as well as less likely to break existing application code. initdb forced accordingly. In passing, remove former kluge for initializing pg_stat_file()'s pg_proc entry --- bootstrap mode was fixed recently so that this can be done without any hacks, but I overlooked this usage.
* Fix up some problems in handling of zic-style time zone names in datetimeTom Lane2006-10-175-46/+44
| | | | | | | | | | | | | | input routines. Remove the former "DecodePosixTimezone" function in favor of letting the zic code handle POSIX-style zone specs (see tzparse()). In particular this means that "PST+3" now means the same as "-03", whereas it used to mean "-11" --- the zone abbreviation is effectively just a noise word in this syntax. Make sure that all named and POSIX-style zone names will be parsed as a single token. Fix long-standing bogosities in printing and input of fractional-hour timezone offsets (since the tzparse() code will accept these, we'd better make 'em work). Also correct an error in the original coding of the zic-zone-name patch: in "timestamp without time zone" input, zone names are supposed to be allowed but ignored, but the coding was such that the zone changed the interpretation anyway.
* Code and docs review for ALTER TABLE INHERIT/NO INHERIT patch.Tom Lane2006-10-131-3/+3
|
* Repair incorrect check for coercion of unknown literal to ANYARRAY, a bugTom Lane2006-10-111-3/+3
| | | | | | | | | | | | I introduced in 7.4.1 :-(. It's correct to allow unknown to be coerced to ANY or ANYELEMENT, since it's a real-enough data type, but it most certainly isn't an array datatype. This can cause a backend crash but AFAICT is not exploitable as a security hole. Per report from Michael Fuhr. Note: as fixed in HEAD, this changes a constant in the pg_stats view, resulting in a change in the expected regression outputs. The back-branch patches have been hacked to avoid that, so that pre-existing installations won't start failing their regression tests.
* Message style improvementsPeter Eisentraut2006-10-063-3/+3
|
* pgindent run for 8.2.Bruce Momjian2006-10-041-144/+149
|
* Improve numeric overflow error message.Bruce Momjian2006-10-031-2/+2
| | | | David Fetter
* Allow assignment to array elements not contiguous with those alreadyTom Lane2006-09-292-0/+146
| | | | | | | | | | present; intervening positions are filled with nulls. This behavior is required by SQL99 but was not implementable before 8.2 due to lack of support for nulls in arrays. I have only made it work for the one-dimensional case, which is all that SQL99 requires. It seems quite complex to get it right in higher dimensions, and since we never allowed extension at all in higher dimensions, I think that must count as a future feature addition not a bug fix.
* Cause pg_regress to invoke the temporary postmaster as 'postgres' notTom Lane2006-09-241-8/+10
| | | | | | 'postmaster', so as not to depend on the existence of the postmaster symlink. Also, implement postmaster-still-alive and postmaster-kill operations for Windows, per Magnus.
* Fix shared library creation to work properly on AIX. Albe LaurenzTom Lane2006-09-191-4/+6
|
* Rename the recently-added pg_timezonenames view to pg_timezone_abbrevs,Tom Lane2006-09-161-2/+3
| | | | | | and create a new view pg_timezone_names that provides information about the zones known in the 'zic' database. Magnus Hagander, with some additional work by Tom Lane.
* Rename contains/contained-by operators to @> and <@, per discussion thatTom Lane2006-09-1016-99/+103
| | | | | | | | agreed these symbols are less easily confused. I made new pg_operator entries (with new OIDs) for the old names, so as to provide backward compatibility while making it pretty easy to remove the old names in some future release cycle. This commit only touches the core datatypes, contrib will be fixed separately.
* Add interval division/multiplication regression tests.Bruce Momjian2006-09-062-0/+101
| | | | Michael Glaesemann
* Get rid of the separate RULE privilege for tables: now only a table's ownerTom Lane2006-09-053-29/+15
| | | | | | | | | | | | | can create or modify rules for the table. Do setRuleCheckAsUser() while loading rules into the relcache, rather than when defining a rule. This ensures that permission checks for tables referenced in a rule are done with respect to the current owner of the rule's table, whereas formerly ALTER TABLE OWNER would fail to update the permission checking for associated rules. Removal of separate RULE privilege is needed to prevent various scenarios in which a grantee of RULE privilege could effectively have any privilege of the table owner. For backwards compatibility, GRANT/REVOKE RULE is still accepted, but it doesn't do anything. Per discussion here: http://archives.postgresql.org/pgsql-hackers/2006-04/msg01138.php
* 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.