2010-09-20 22:08:53 +02:00
|
|
|
# src/test/regress/serial_schedule
|
2000-10-01 23:19:09 +02:00
|
|
|
# This should probably be in an order similar to parallel_schedule.
|
2009-08-24 05:10:16 +02:00
|
|
|
test: tablespace
|
2000-09-29 19:17:41 +02:00
|
|
|
test: boolean
|
|
|
|
test: char
|
|
|
|
test: name
|
|
|
|
test: varchar
|
|
|
|
test: text
|
|
|
|
test: int2
|
|
|
|
test: int4
|
|
|
|
test: int8
|
|
|
|
test: oid
|
|
|
|
test: float4
|
|
|
|
test: float8
|
2000-11-22 14:37:44 +01:00
|
|
|
test: bit
|
2000-10-01 23:19:09 +02:00
|
|
|
test: numeric
|
2007-10-14 01:06:28 +02:00
|
|
|
test: txid
|
2007-01-28 17:16:54 +01:00
|
|
|
test: uuid
|
2007-04-02 05:49:42 +02:00
|
|
|
test: enum
|
2007-11-24 21:41:35 +01:00
|
|
|
test: money
|
2011-11-03 12:16:28 +01:00
|
|
|
test: rangetypes
|
2014-02-19 14:35:23 +01:00
|
|
|
test: pg_lsn
|
2014-04-08 16:27:56 +02:00
|
|
|
test: regproc
|
2000-10-01 23:19:09 +02:00
|
|
|
test: strings
|
2000-09-29 19:17:41 +02:00
|
|
|
test: numerology
|
|
|
|
test: point
|
|
|
|
test: lseg
|
2013-10-09 07:09:18 +02:00
|
|
|
test: line
|
2000-09-29 19:17:41 +02:00
|
|
|
test: box
|
|
|
|
test: path
|
|
|
|
test: polygon
|
|
|
|
test: circle
|
|
|
|
test: date
|
|
|
|
test: time
|
2001-09-28 10:00:11 +02:00
|
|
|
test: timetz
|
2000-09-29 19:17:41 +02:00
|
|
|
test: timestamp
|
2001-09-28 10:00:11 +02:00
|
|
|
test: timestamptz
|
2000-09-29 19:17:41 +02:00
|
|
|
test: interval
|
|
|
|
test: abstime
|
|
|
|
test: reltime
|
|
|
|
test: tinterval
|
|
|
|
test: inet
|
2008-10-03 17:37:18 +02:00
|
|
|
test: macaddr
|
2007-08-21 03:11:32 +02:00
|
|
|
test: tstypes
|
2000-09-29 19:17:41 +02:00
|
|
|
test: comments
|
2007-08-21 03:11:32 +02:00
|
|
|
test: geometry
|
|
|
|
test: horology
|
Fix regex back-references that are directly quantified with *.
The syntax "\n*", that is a backref with a * quantifier directly applied
to it, has never worked correctly in Spencer's library. This has been an
open bug in the Tcl bug tracker since 2005:
https://sourceforge.net/tracker/index.php?func=detail&aid=1115587&group_id=10894&atid=110894
The core of the problem is in parseqatom(), which first changes "\n*" to
"\n+|" and then applies repeat() to the NFA representing the backref atom.
repeat() thinks that any arc leading into its "rp" argument is part of the
sub-NFA to be repeated. Unfortunately, since parseqatom() already created
the arc that was intended to represent the empty bypass around "\n+", this
arc gets moved too, so that it now leads into the state loop created by
repeat(). Thus, what was supposed to be an "empty" bypass gets turned into
something that represents zero or more repetitions of the NFA representing
the backref atom. In the original example, in place of
^([bc])\1*$
we now have something that acts like
^([bc])(\1+|[bc]*)$
At runtime, the branch involving the actual backref fails, as it's supposed
to, but then the other branch succeeds anyway.
We could no doubt fix this by some rearrangement of the operations in
parseqatom(), but that code is plenty ugly already, and what's more the
whole business of converting "x*" to "x+|" probably needs to go away to fix
another problem I'll mention in a moment. Instead, this patch suppresses
the *-conversion when the target is a simple backref atom, leaving the case
of m == 0 to be handled at runtime. This makes the patch in regcomp.c a
one-liner, at the cost of having to tweak cbrdissect() a little. In the
event I went a bit further than that and rewrote cbrdissect() to check all
the string-length-related conditions before it starts comparing characters.
It seems a bit stupid to possibly iterate through many copies of an
n-character backreference, only to fail at the end because the target
string's length isn't a multiple of n --- we could have found that out
before starting. The existing coding could only be a win if integer
division is hugely expensive compared to character comparison, but I don't
know of any modern machine where that might be true.
This does not fix all the problems with quantified back-references. In
particular, the code is still broken for back-references that appear within
a larger expression that is quantified (so that direct insertion of the
quantification limits into the BACKREF node doesn't apply). I think fixing
that will take some major surgery on the NFA code, specifically introducing
an explicit iteration node type instead of trying to transform iteration
into concatenation of modified regexps.
Back-patch to all supported branches. In HEAD, also add a regression test
case for this. (It may seem a bit silly to create a regression test file
for just one test case; but I'm expecting that we will soon import a whole
bunch of regex regression tests from Tcl, so might as well create the
infrastructure now.)
2012-02-20 06:52:33 +01:00
|
|
|
test: regex
|
2000-09-29 19:17:41 +02:00
|
|
|
test: oidjoins
|
|
|
|
test: type_sanity
|
|
|
|
test: opr_sanity
|
2002-04-05 13:56:55 +02:00
|
|
|
test: insert
|
Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
The newly added ON CONFLICT clause allows to specify an alternative to
raising a unique or exclusion constraint violation error when inserting.
ON CONFLICT refers to constraints that can either be specified using a
inference clause (by specifying the columns of a unique constraint) or
by naming a unique or exclusion constraint. DO NOTHING avoids the
constraint violation, without touching the pre-existing row. DO UPDATE
SET ... [WHERE ...] updates the pre-existing tuple, and has access to
both the tuple proposed for insertion and the existing tuple; the
optional WHERE clause can be used to prevent an update from being
executed. The UPDATE SET and WHERE clauses have access to the tuple
proposed for insertion using the "magic" EXCLUDED alias, and to the
pre-existing tuple using the table name or its alias.
This feature is often referred to as upsert.
This is implemented using a new infrastructure called "speculative
insertion". It is an optimistic variant of regular insertion that first
does a pre-check for existing tuples and then attempts an insert. If a
violating tuple was inserted concurrently, the speculatively inserted
tuple is deleted and a new attempt is made. If the pre-check finds a
matching tuple the alternative DO NOTHING or DO UPDATE action is taken.
If the insertion succeeds without detecting a conflict, the tuple is
deemed inserted.
To handle the possible ambiguity between the excluded alias and a table
named excluded, and for convenience with long relation names, INSERT
INTO now can alias its target table.
Bumps catversion as stored rules change.
Author: Peter Geoghegan, with significant contributions from Heikki
Linnakangas and Andres Freund. Testing infrastructure by Jeff Janes.
Reviewed-By: Heikki Linnakangas, Andres Freund, Robert Haas, Simon Riggs,
Dean Rasheed, Stephen Frost and many others.
2015-05-08 05:31:36 +02:00
|
|
|
test: insert_conflict
|
2000-09-29 19:17:41 +02:00
|
|
|
test: create_function_1
|
|
|
|
test: create_type
|
|
|
|
test: create_table
|
|
|
|
test: create_function_2
|
2000-10-01 23:19:09 +02:00
|
|
|
test: copy
|
2006-08-31 01:34:22 +02:00
|
|
|
test: copyselect
|
2015-11-27 17:11:22 +01:00
|
|
|
test: copydml
|
2000-09-29 19:17:41 +02:00
|
|
|
test: create_misc
|
|
|
|
test: create_operator
|
|
|
|
test: create_index
|
2011-11-09 05:05:14 +01:00
|
|
|
test: create_view
|
|
|
|
test: create_aggregate
|
2012-10-15 18:18:52 +02:00
|
|
|
test: create_function_3
|
2011-11-09 05:05:14 +01:00
|
|
|
test: create_cast
|
|
|
|
test: constraints
|
|
|
|
test: triggers
|
2000-10-01 23:19:09 +02:00
|
|
|
test: inherit
|
2012-01-07 13:58:13 +01:00
|
|
|
test: create_table_like
|
2010-01-29 00:21:13 +01:00
|
|
|
test: typed_table
|
2002-07-20 06:57:13 +02:00
|
|
|
test: vacuum
|
2011-11-09 05:05:14 +01:00
|
|
|
test: drop_if_exists
|
2012-12-09 00:25:48 +01:00
|
|
|
test: updatable_views
|
Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.
This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".
The special role specifiers PUBLIC and NONE also have more consistent
handling now.
Also take the opportunity to add location tracking to user specifiers.
Authors: Kyotaro Horiguchi. Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 19:41:54 +01:00
|
|
|
test: rolenames
|
2015-08-21 14:22:22 +02:00
|
|
|
test: roleattributes
|
2000-09-29 19:17:41 +02:00
|
|
|
test: sanity_check
|
|
|
|
test: errors
|
|
|
|
test: select
|
|
|
|
test: select_into
|
|
|
|
test: select_distinct
|
|
|
|
test: select_distinct_on
|
|
|
|
test: select_implicit
|
|
|
|
test: select_having
|
|
|
|
test: subselect
|
|
|
|
test: union
|
|
|
|
test: case
|
|
|
|
test: join
|
|
|
|
test: aggregates
|
Support GROUPING SETS, CUBE and ROLLUP.
This SQL standard functionality allows to aggregate data by different
GROUP BY clauses at once. Each grouping set returns rows with columns
grouped by in other sets set to NULL.
This could previously be achieved by doing each grouping as a separate
query, conjoined by UNION ALLs. Besides being considerably more concise,
grouping sets will in many cases be faster, requiring only one scan over
the underlying data.
The current implementation of grouping sets only supports using sorting
for input. Individual sets that share a sort order are computed in one
pass. If there are sets that don't share a sort order, additional sort &
aggregation steps are performed. These additional passes are sourced by
the previous sort step; thus avoiding repeated scans of the source data.
The code is structured in a way that adding support for purely using
hash aggregation or a mix of hashing and sorting is possible. Sorting
was chosen to be supported first, as it is the most generic method of
implementation.
Instead of, as in an earlier versions of the patch, representing the
chain of sort and aggregation steps as full blown planner and executor
nodes, all but the first sort are performed inside the aggregation node
itself. This avoids the need to do some unusual gymnastics to handle
having to return aggregated and non-aggregated tuples from underlying
nodes, as well as having to shut down underlying nodes early to limit
memory usage. The optimizer still builds Sort/Agg node to describe each
phase, but they're not part of the plan tree, but instead additional
data for the aggregation node. They're a convenient and preexisting way
to describe aggregation and sorting. The first (and possibly only) sort
step is still performed as a separate execution step. That retains
similarity with existing group by plans, makes rescans fairly simple,
avoids very deep plans (leading to slow explains) and easily allows to
avoid the sorting step if the underlying data is sorted by other means.
A somewhat ugly side of this patch is having to deal with a grammar
ambiguity between the new CUBE keyword and the cube extension/functions
named cube (and rollup). To avoid breaking existing deployments of the
cube extension it has not been renamed, neither has cube been made a
reserved keyword. Instead precedence hacking is used to make GROUP BY
cube(..) refer to the CUBE grouping sets feature, and not the function
cube(). To actually group by a function cube(), unlikely as that might
be, the function name has to be quoted.
Needs a catversion bump because stored rules may change.
Author: Andrew Gierth and Atri Sharma, with contributions from Andres Freund
Reviewed-By: Andres Freund, Noah Misch, Tom Lane, Svenne Krap, Tomas
Vondra, Erik Rijkers, Marti Raudsepp, Pavel Stehule
Discussion: CAOeZVidmVRe2jU6aMk_5qkxnB7dfmPROzM7Ur8JPW5j8Y5X-Lw@mail.gmail.com
2015-05-16 03:40:59 +02:00
|
|
|
test: groupingsets
|
2000-09-29 19:17:41 +02:00
|
|
|
test: transactions
|
|
|
|
ignore: random
|
|
|
|
test: random
|
|
|
|
test: portals
|
|
|
|
test: arrays
|
|
|
|
test: btree_index
|
|
|
|
test: hash_index
|
2003-08-26 20:32:23 +02:00
|
|
|
test: update
|
2006-01-22 06:20:35 +01:00
|
|
|
test: delete
|
2004-01-11 05:58:17 +01:00
|
|
|
test: namespace
|
2005-06-18 00:32:51 +02:00
|
|
|
test: prepared_xacts
|
2014-11-19 18:24:58 +01:00
|
|
|
test: brin
|
|
|
|
test: gin
|
|
|
|
test: gist
|
|
|
|
test: spgist
|
2001-05-27 11:59:30 +02:00
|
|
|
test: privileges
|
2010-09-28 02:55:27 +02:00
|
|
|
test: security_label
|
2011-03-20 19:35:39 +01:00
|
|
|
test: collate
|
2013-03-04 01:23:31 +01:00
|
|
|
test: matview
|
2013-07-15 18:29:34 +02:00
|
|
|
test: lock
|
2013-11-08 18:30:43 +01:00
|
|
|
test: replica_identity
|
2014-12-31 23:04:27 +01:00
|
|
|
test: rowsecurity
|
2015-01-02 21:09:39 +01:00
|
|
|
test: object_address
|
Redesign tablesample method API, and do extensive code review.
The original implementation of TABLESAMPLE modeled the tablesample method
API on index access methods, which wasn't a good choice because, without
specialized DDL commands, there's no way to build an extension that can
implement a TSM. (Raw inserts into system catalogs are not an acceptable
thing to do, because we can't undo them during DROP EXTENSION, nor will
pg_upgrade behave sanely.) Instead adopt an API more like procedural
language handlers or foreign data wrappers, wherein the only SQL-level
support object needed is a single handler function identified by having
a special return type. This lets us get rid of the supporting catalog
altogether, so that no custom DDL support is needed for the feature.
Adjust the API so that it can support non-constant tablesample arguments
(the original coding assumed we could evaluate the argument expressions at
ExecInitSampleScan time, which is undesirable even if it weren't outright
unsafe), and discourage sampling methods from looking at invisible tuples.
Make sure that the BERNOULLI and SYSTEM methods are genuinely repeatable
within and across queries, as required by the SQL standard, and deal more
honestly with methods that can't support that requirement.
Make a full code-review pass over the tablesample additions, and fix
assorted bugs, omissions, infelicities, and cosmetic issues (such as
failure to put the added code stanzas in a consistent ordering).
Improve EXPLAIN's output of tablesample plans, too.
Back-patch to 9.5 so that we don't have to support the original API
in production.
2015-07-25 20:39:00 +02:00
|
|
|
test: tablesample
|
2012-10-15 18:18:52 +02:00
|
|
|
test: alter_generic
|
2015-07-14 17:17:55 +02:00
|
|
|
test: alter_operator
|
2013-02-02 23:06:38 +01:00
|
|
|
test: misc
|
|
|
|
test: psql
|
2013-07-03 17:06:45 +02:00
|
|
|
test: async
|
2015-11-06 17:03:02 +01:00
|
|
|
test: dbsize
|
2016-02-05 05:03:10 +01:00
|
|
|
test: misc_functions
|
2010-02-12 18:33:21 +01:00
|
|
|
test: rules
|
2000-09-29 19:17:41 +02:00
|
|
|
test: select_views
|
|
|
|
test: portals_p2
|
2000-10-01 23:19:09 +02:00
|
|
|
test: foreign_key
|
2002-08-11 04:06:32 +02:00
|
|
|
test: cluster
|
2006-08-04 02:00:14 +02:00
|
|
|
test: dependency
|
|
|
|
test: guc
|
2008-04-11 00:25:26 +02:00
|
|
|
test: bitmapops
|
2007-02-09 04:35:35 +01:00
|
|
|
test: combocid
|
2007-08-21 03:11:32 +02:00
|
|
|
test: tsearch
|
2008-12-30 18:11:26 +01:00
|
|
|
test: tsdicts
|
|
|
|
test: foreign_data
|
|
|
|
test: window
|
2009-07-02 09:03:18 +02:00
|
|
|
test: xmlmap
|
2010-08-07 04:44:09 +02:00
|
|
|
test: functional_deps
|
2011-02-18 06:04:34 +01:00
|
|
|
test: advisory_lock
|
2012-01-31 17:48:23 +01:00
|
|
|
test: json
|
Introduce jsonb, a structured format for storing json.
The new format accepts exactly the same data as the json type. However, it is
stored in a format that does not require reparsing the orgiginal text in order
to process it, making it much more suitable for indexing and other operations.
Insignificant whitespace is discarded, and the order of object keys is not
preserved. Neither are duplicate object keys kept - the later value for a given
key is the only one stored.
The new type has all the functions and operators that the json type has,
with the exception of the json generation functions (to_json, json_agg etc.)
and with identical semantics. In addition, there are operator classes for
hash and btree indexing, and two classes for GIN indexing, that have no
equivalent in the json type.
This feature grew out of previous work by Oleg Bartunov and Teodor Sigaev, which
was intended to provide similar facilities to a nested hstore type, but which
in the end proved to have some significant compatibility issues.
Authors: Oleg Bartunov, Teodor Sigaev, Peter Geoghegan and Andrew Dunstan.
Review: Andres Freund
2014-03-23 21:40:19 +01:00
|
|
|
test: jsonb
|
2015-10-07 23:41:45 +02:00
|
|
|
test: json_encoding
|
2013-07-02 19:35:14 +02:00
|
|
|
test: indirect_toast
|
Fix some more problems with nested append relations.
As of commit a87c72915 (which later got backpatched as far as 9.1),
we're explicitly supporting the notion that append relations can be
nested; this can occur when UNION ALL constructs are nested, or when
a UNION ALL contains a table with inheritance children.
Bug #11457 from Nelson Page, as well as an earlier report from Elvis
Pranskevichus, showed that there were still nasty bugs associated with such
cases: in particular the EquivalenceClass mechanism could try to generate
"join" clauses connecting an appendrel child to some grandparent appendrel,
which would result in assertion failures or bogus plans.
Upon investigation I concluded that all current callers of
find_childrel_appendrelinfo() need to be fixed to explicitly consider
multiple levels of parent appendrels. The most complex fix was in
processing of "broken" EquivalenceClasses, which are ECs for which we have
been unable to generate all the derived equality clauses we would like to
because of missing cross-type equality operators in the underlying btree
operator family. That code path is more or less entirely untested by
the regression tests to date, because no standard opfamilies have such
holes in them. So I wrote a new regression test script to try to exercise
it a bit, which turned out to be quite a worthwhile activity as it exposed
existing bugs in all supported branches.
The present patch is essentially the same as far back as 9.2, which is
where parameterized paths were introduced. In 9.0 and 9.1, we only need
to back-patch a small fragment of commit 5b7b5518d, which fixes failure to
propagate out the original WHERE clauses when a broken EC contains constant
members. (The regression test case results show that these older branches
are noticeably stupider than 9.2+ in terms of the quality of the plans
generated; but we don't really care about plan quality in such cases,
only that the plan not be outright wrong. A more invasive fix in the
older branches would not be a good idea anyway from a plan-stability
standpoint.)
2014-10-02 01:30:24 +02:00
|
|
|
test: equivclass
|
2007-03-13 01:33:44 +01:00
|
|
|
test: plancache
|
2000-09-29 19:17:41 +02:00
|
|
|
test: limit
|
|
|
|
test: plpgsql
|
2002-07-18 06:43:51 +02:00
|
|
|
test: copy2
|
2000-09-29 19:17:41 +02:00
|
|
|
test: temp
|
2002-03-19 03:18:25 +01:00
|
|
|
test: domain
|
2002-06-20 19:09:42 +02:00
|
|
|
test: rangefuncs
|
2002-08-27 06:55:12 +02:00
|
|
|
test: prepare
|
2002-07-20 07:16:59 +02:00
|
|
|
test: without_oid
|
2002-07-25 12:07:13 +02:00
|
|
|
test: conversion
|
2002-08-22 06:51:06 +02:00
|
|
|
test: truncate
|
2002-09-02 07:55:43 +02:00
|
|
|
test: alter_table
|
2003-03-20 08:02:11 +01:00
|
|
|
test: sequence
|
2003-07-01 21:10:53 +02:00
|
|
|
test: polymorphism
|
2004-06-06 23:20:46 +02:00
|
|
|
test: rowtypes
|
2006-08-12 04:52:06 +02:00
|
|
|
test: returning
|
2007-01-20 18:15:44 +01:00
|
|
|
test: largeobject
|
2008-10-04 23:56:55 +02:00
|
|
|
test: with
|
2006-12-21 17:05:16 +01:00
|
|
|
test: xml
|
2014-12-07 16:55:28 +01:00
|
|
|
test: event_trigger
|
2003-09-13 18:44:49 +02:00
|
|
|
test: stats
|