2ndquadrant_bdr.git
10 years agodeparse-test: add deparse_schedule to regression tests dev/deparse-test
Petr Jelinek [Wed, 11 Feb 2015 15:02:44 +0000 (16:02 +0100)]
deparse-test: add deparse_schedule to regression tests

10 years agodeparse: Fix likely typo in "deparse: Add support for typmod for CREATE DOMAIN."
Andres Freund [Sat, 17 Jan 2015 22:40:36 +0000 (23:40 +0100)]
deparse: Fix likely typo in "deparse: Add support for typmod for CREATE DOMAIN."

10 years agodeparse-tests: Change the C function to plpgsql.
Petr Jelinek [Sat, 20 Dec 2014 08:16:52 +0000 (09:16 +0100)]
deparse-tests: Change the C function to plpgsql.

This makes it simpler and also fixes many bugs that were result of
executing SPI functions inside loop which was reading results from SPI.

In passing rename the deparse test target to check for consistency with
the rest of the regression tests.

10 years agodeparse: Add support for stringifying more object types.
Petr Jelinek [Sat, 20 Dec 2014 08:11:28 +0000 (09:11 +0100)]
deparse: Add support for stringifying more object types.

10 years agodeparse: Add support for typmod for CREATE DOMAIN.
Petr Jelinek [Sat, 20 Dec 2014 08:08:48 +0000 (09:08 +0100)]
deparse: Add support for typmod for CREATE DOMAIN.

10 years agodeparse: Fix CREATE CONVERSION.
Petr Jelinek [Sat, 20 Dec 2014 08:08:09 +0000 (09:08 +0100)]
deparse: Fix CREATE CONVERSION.

10 years agodeparse: Fix order of WITH and ON COMMIT for CREATE TABLE statement.
Petr Jelinek [Sat, 20 Dec 2014 08:06:59 +0000 (09:06 +0100)]
deparse: Fix order of WITH and ON COMMIT for CREATE TABLE statement.

10 years agodeparse: Handle default security provider.
Petr Jelinek [Sat, 20 Dec 2014 07:56:54 +0000 (08:56 +0100)]
deparse: Handle default security provider.

10 years agoMore datatypes
Ian Barwick [Wed, 17 Dec 2014 07:05:16 +0000 (16:05 +0900)]
More datatypes

10 years agoAdd some tablespace checks
Ian Barwick [Wed, 17 Dec 2014 05:46:36 +0000 (14:46 +0900)]
Add some tablespace checks

10 years agoAdd makefile targets for tests
Ian Barwick [Wed, 17 Dec 2014 05:46:05 +0000 (14:46 +0900)]
Add makefile targets for tests

10 years agoTokenize CREATE TABLE test
Ian Barwick [Wed, 17 Dec 2014 05:40:31 +0000 (14:40 +0900)]
Tokenize CREATE TABLE test

10 years agoAdd a composite type
Ian Barwick [Wed, 17 Dec 2014 05:29:36 +0000 (14:29 +0900)]
Add a composite type

10 years agoAdd SECURITY LABEL test
Ian Barwick [Wed, 17 Dec 2014 00:57:36 +0000 (09:57 +0900)]
Add SECURITY LABEL test

10 years agoAdd CREATE CONVERSION tests
Ian Barwick [Wed, 17 Dec 2014 00:15:16 +0000 (09:15 +0900)]
Add CREATE CONVERSION tests

10 years agoBasic CREATE OPERATOR tests
Ian Barwick [Tue, 16 Dec 2014 23:54:43 +0000 (08:54 +0900)]
Basic CREATE OPERATOR tests

10 years agoRe-instate failing test item
Ian Barwick [Tue, 16 Dec 2014 22:43:25 +0000 (07:43 +0900)]
Re-instate failing test item

10 years agoSeparate ALTER {OBJECT} ... OWNER TO ... tests
Ian Barwick [Tue, 16 Dec 2014 11:24:12 +0000 (20:24 +0900)]
Separate ALTER {OBJECT} ... OWNER TO ... tests

Corresponding to T_AlterOwnerStmt

10 years agoAdd CREATE TYPE basic test
Ian Barwick [Tue, 16 Dec 2014 11:14:11 +0000 (20:14 +0900)]
Add CREATE TYPE basic test

10 years agoUpdate COMMENT ON tests
Ian Barwick [Tue, 16 Dec 2014 10:37:05 +0000 (19:37 +0900)]
Update COMMENT ON tests

10 years agoAdd CREATE TYPE ... AS RANGE test
Ian Barwick [Tue, 16 Dec 2014 07:44:35 +0000 (16:44 +0900)]
Add CREATE TYPE ... AS RANGE test

Needs fleshing out

10 years agoAdd CREATE RULE tests
Ian Barwick [Tue, 16 Dec 2014 07:11:41 +0000 (16:11 +0900)]
Add CREATE RULE tests

10 years agoAdd test for CREATE TRIGGER ... INSTEAD OF
Ian Barwick [Tue, 16 Dec 2014 05:22:35 +0000 (14:22 +0900)]
Add test for CREATE TRIGGER ... INSTEAD OF

10 years agoAdd CREATE TRIGGER tests
Ian Barwick [Tue, 16 Dec 2014 05:18:58 +0000 (14:18 +0900)]
Add CREATE TRIGGER tests

10 years agoUpdate expected pg_dump output
Ian Barwick [Tue, 16 Dec 2014 04:32:32 +0000 (13:32 +0900)]
Update expected pg_dump output

10 years agoAdd CREATE INDEX test
Ian Barwick [Tue, 16 Dec 2014 04:28:07 +0000 (13:28 +0900)]
Add CREATE INDEX test

10 years agoAdd placeholder ALTER EXTENSION
Ian Barwick [Tue, 16 Dec 2014 02:46:15 +0000 (11:46 +0900)]
Add placeholder ALTER EXTENSION

10 years agoAdd CREATE EXTENSION test
Ian Barwick [Tue, 16 Dec 2014 02:30:45 +0000 (11:30 +0900)]
Add CREATE EXTENSION test

10 years agoAdd domain to table definition
Ian Barwick [Mon, 15 Dec 2014 13:19:40 +0000 (22:19 +0900)]
Add domain to table definition

10 years agoAdd CREATE DOMAIN test
Ian Barwick [Mon, 15 Dec 2014 13:10:42 +0000 (22:10 +0900)]
Add CREATE DOMAIN test

10 years agoAdd ALTER TYPE ... ADD VALUE test
Ian Barwick [Mon, 15 Dec 2014 12:45:02 +0000 (21:45 +0900)]
Add ALTER TYPE ... ADD VALUE test

10 years agoAdd enum to table definition
Ian Barwick [Mon, 15 Dec 2014 12:38:49 +0000 (21:38 +0900)]
Add enum to table definition

10 years agoAdd CREATE TYPE ... AS ENUM
Ian Barwick [Mon, 15 Dec 2014 12:35:28 +0000 (21:35 +0900)]
Add CREATE TYPE ... AS ENUM

10 years agoAdd ALTER SEQUENCE tests
Ian Barwick [Mon, 15 Dec 2014 12:17:16 +0000 (21:17 +0900)]
Add ALTER SEQUENCE tests

10 years agoALTER FUNCTION tests
Ian Barwick [Mon, 15 Dec 2014 11:58:51 +0000 (20:58 +0900)]
ALTER FUNCTION tests

10 years agoAdd ALTER FUNCTION test
Ian Barwick [Mon, 15 Dec 2014 11:23:05 +0000 (20:23 +0900)]
Add ALTER FUNCTION test

10 years agoInitial COMMENT ON tests
Ian Barwick [Mon, 15 Dec 2014 08:43:55 +0000 (17:43 +0900)]
Initial COMMENT ON tests

10 years agoCREATE SCHEMA
Ian Barwick [Mon, 15 Dec 2014 08:11:17 +0000 (17:11 +0900)]
CREATE SCHEMA

10 years agoAdd CREATE VIEW tests
Ian Barwick [Mon, 15 Dec 2014 07:42:09 +0000 (16:42 +0900)]
Add CREATE VIEW tests

10 years agoMore function tests
Ian Barwick [Mon, 15 Dec 2014 06:46:56 +0000 (15:46 +0900)]
More function tests

10 years agoFix table SQL
Ian Barwick [Mon, 15 Dec 2014 06:17:15 +0000 (15:17 +0900)]
Fix table SQL

10 years agoAdd sequence tests
Ian Barwick [Mon, 15 Dec 2014 06:11:07 +0000 (15:11 +0900)]
Add sequence tests

10 years agoUse IF EXISTS
Ian Barwick [Mon, 15 Dec 2014 05:27:30 +0000 (14:27 +0900)]
Use IF EXISTS

We may be executing this script several times on the same database.

10 years agoAdd note about regex iffiness
Ian Barwick [Mon, 15 Dec 2014 05:26:03 +0000 (14:26 +0900)]
Add note about regex iffiness

10 years agoFix regex thinko
Ian Barwick [Mon, 15 Dec 2014 05:24:35 +0000 (14:24 +0900)]
Fix regex thinko

10 years agoExplicitly delete event trigger
Ian Barwick [Mon, 15 Dec 2014 05:22:51 +0000 (14:22 +0900)]
Explicitly delete event trigger

As event triggers don't have a schema per-se.

10 years agoUse `deparse` schema for deparse event trigger code
Ian Barwick [Mon, 15 Dec 2014 04:24:43 +0000 (13:24 +0900)]
Use `deparse` schema for deparse event trigger code

The definitions for the deparse event trigger code won't of
course be deparsed themselves, so we don't want to dump them.
By using a separate schema, it's easier to exclude them from
the dump output.

10 years agoExport deparsed commands as plain text output
Ian Barwick [Mon, 15 Dec 2014 03:54:44 +0000 (12:54 +0900)]
Export deparsed commands as plain text output

Using \copy here introduces problems with escaping

10 years agoExpected output is dump from the original regress database
Ian Barwick [Mon, 15 Dec 2014 03:54:08 +0000 (12:54 +0900)]
Expected output is dump from the original regress database

10 years agoAdd test function
Ian Barwick [Mon, 15 Dec 2014 02:01:23 +0000 (11:01 +0900)]
Add test function

10 years agoReplace hard-coded paths with pg_regress tokens
Ian Barwick [Mon, 15 Dec 2014 01:39:55 +0000 (10:39 +0900)]
Replace hard-coded paths with pg_regress tokens

10 years agoSanity checks for dump script
Ian Barwick [Mon, 15 Dec 2014 00:14:12 +0000 (09:14 +0900)]
Sanity checks for dump script

10 years agoInterim commit
Ian Barwick [Sun, 14 Dec 2014 22:21:06 +0000 (07:21 +0900)]
Interim commit

10 years agoPlace DDL deparse tests in subdirecotry
Ian Barwick [Fri, 12 Dec 2014 07:08:39 +0000 (16:08 +0900)]
Place DDL deparse tests in subdirecotry

We can merge with the main tests later, if needed

10 years agoFilter pg_dump output with Perl rather than grep
Ian Barwick [Mon, 8 Dec 2014 02:39:16 +0000 (11:39 +0900)]
Filter pg_dump output with Perl rather than grep

As we can assume Perl will be available in a Windows build
environment. Not sure if this will work-as is in Windows but
a step in that direction.

10 years agodeparse: add command line option --dbname-deparse
Ian Barwick [Wed, 3 Dec 2014 01:50:00 +0000 (10:50 +0900)]
deparse: add command line option --dbname-deparse

This enables explicit provision of the deparse regression database
for use with --use-existing.

10 years agodeparse: Remove pg_dump comments containing hard-coded database version
Ian Barwick [Wed, 3 Dec 2014 01:49:20 +0000 (10:49 +0900)]
deparse: Remove pg_dump comments containing hard-coded database version

Otherwise we'll need to keep the version in sync, which is a pain.

10 years agodeparse: drop deparse test db unless use_existing specified
Ian Barwick [Fri, 28 Nov 2014 03:45:50 +0000 (12:45 +0900)]
deparse: drop deparse test db unless use_existing specified

10 years agodeparse: better handling of deparse test database name
Ian Barwick [Fri, 28 Nov 2014 02:46:33 +0000 (11:46 +0900)]
deparse: better handling of deparse test database name

Use sensible (overrideable) defaultand make this a token which
can be passed to .source scripts.

10 years agodeparse: store DDL deparse query output file in sql/ subdirectory
Ian Barwick [Thu, 27 Nov 2014 10:08:36 +0000 (19:08 +0900)]
deparse: store DDL deparse query output file in sql/ subdirectory

It's useful to keep this file around for debugging; though
it's not a test per-se, the sql/ subdirectory seems a logical
place to store it, rather than attempting to find the system
tmpdir or create another directory in regress/.

10 years agodeparse: add erroneously ignored test
Ian Barwick [Thu, 27 Nov 2014 09:54:02 +0000 (18:54 +0900)]
deparse: add erroneously ignored test

10 years agodeparse: initial testing framework (PoC, WIP)
Ian Barwick [Thu, 27 Nov 2014 07:05:13 +0000 (16:05 +0900)]
deparse: initial testing framework (PoC, WIP)

Test with:

./pg_regress \
  --dbname=reg1,reg2 \
  --temp-install=./tmp_check \
  --top-builddir=../../.. \
  --dlpath=. \
  --schedule=./schedule_ddl_deparse_demo

10 years agodeparse: Fix string handling in expand_jsonval_strlit()
Ian Barwick [Thu, 27 Nov 2014 05:04:57 +0000 (14:04 +0900)]
deparse: Fix string handling in expand_jsonval_strlit()

Per comment in jsonb.h: "Not necessarily null-terminated"

10 years agodeparse: Always initialize objsubid for RenameStmt.
Petr Jelinek [Tue, 25 Nov 2014 15:08:11 +0000 (16:08 +0100)]
deparse: Always initialize objsubid for RenameStmt.

10 years agodeparse: Fix compile error
Abhijit Menon-Sen [Tue, 25 Nov 2014 06:04:11 +0000 (11:34 +0530)]
deparse: Fix compile error

10 years agodeparse: Fix operator quoting
Petr Jelinek [Mon, 24 Nov 2014 17:09:25 +0000 (18:09 +0100)]
deparse: Fix operator quoting

Operators should follow same quoting rules as function when used as
parameters.

10 years agodeparse: fix CREATE OR REPLACE VIEW
Petr Jelinek [Tue, 16 Sep 2014 13:29:59 +0000 (15:29 +0200)]
deparse: fix CREATE OR REPLACE VIEW

10 years agosupport ALTER TYPE / RENAME ATTRIBUTE
Alvaro Herrera [Thu, 25 Sep 2014 19:34:50 +0000 (16:34 -0300)]
support ALTER TYPE / RENAME ATTRIBUTE

10 years agodeparse: fix SECURITY LABEL ... IS NULL
Andres Freund [Sun, 2 Nov 2014 13:52:13 +0000 (14:52 +0100)]
deparse: fix SECURITY LABEL ... IS NULL

10 years agodeparse: Add support for SECURITY LABEL
Andres Freund [Sun, 19 Oct 2014 23:49:29 +0000 (01:49 +0200)]
deparse: Add support for SECURITY LABEL

10 years agodeparse: support COMMENT ON
Alvaro Herrera [Thu, 25 Sep 2014 18:45:04 +0000 (15:45 -0300)]
deparse: support COMMENT ON

10 years agodeparse: Support ALTER FUNCTION
Petr Jelinek [Fri, 8 Aug 2014 12:55:47 +0000 (14:55 +0200)]
deparse: Support ALTER FUNCTION

10 years agodeparse: Support GRANT/REVOKE
Alvaro Herrera [Thu, 12 Jun 2014 22:34:53 +0000 (18:34 -0400)]
deparse: Support GRANT/REVOKE

10 years agodeparse: Support ALTER EXTENSION / UPDATE TO
Abhijit Menon-Sen [Thu, 8 May 2014 10:05:58 +0000 (15:35 +0530)]
deparse: Support ALTER EXTENSION / UPDATE TO

10 years agodeparse: support ALTER THING OWNER TO
Alvaro Herrera [Tue, 6 May 2014 21:22:13 +0000 (17:22 -0400)]
deparse: support ALTER THING OWNER TO

10 years agodeparse: Support DefineStmt commands
Abhijit Menon-Sen [Mon, 5 May 2014 06:50:58 +0000 (12:20 +0530)]
deparse: Support DefineStmt commands

CREATE AGGREGATE
CREATE COLLATION
CREATE OPERATOR
CREATE TEXT SEARCH CONFIGURATION
CREATE TEXT SEARCH PARSER
CREATE TEXT SEARCH DICTIONARY
CREATE TEXT SEARCH TEMPLATE
CREATE TYPE

10 years agodeparse: Support CREATE CONVERSION
Abhijit Menon-Sen [Wed, 30 Apr 2014 12:00:07 +0000 (17:30 +0530)]
deparse: Support CREATE CONVERSION

10 years agodeparse: Support CREATE OPERATOR FAMILY
Alvaro Herrera [Thu, 25 Sep 2014 17:34:29 +0000 (14:34 -0300)]
deparse: Support CREATE OPERATOR FAMILY

10 years agodeparse: Support CREATE VIEW
Alvaro Herrera [Thu, 25 Sep 2014 17:34:00 +0000 (14:34 -0300)]
deparse: Support CREATE VIEW

10 years agodeparse: Support ALTER TABLE
Alvaro Herrera [Fri, 25 Apr 2014 19:32:20 +0000 (16:32 -0300)]
deparse: Support ALTER TABLE

10 years agodeparse/core: have ALTER TABLE return OIDs and col# of affected objs
Alvaro Herrera [Fri, 25 Apr 2014 20:15:49 +0000 (17:15 -0300)]
deparse/core: have ALTER TABLE return OIDs and col# of affected objs

10 years agodeparse: Support CREATE FUNCTION
Alvaro Herrera [Tue, 15 Apr 2014 19:45:03 +0000 (16:45 -0300)]
deparse: Support CREATE FUNCTION

10 years agodeparse: Support CREATE DOMAIN
Alvaro Herrera [Fri, 25 Apr 2014 20:54:19 +0000 (17:54 -0300)]
deparse: Support CREATE DOMAIN

10 years agodeparse: Support for ALTER <OBJECT> RENAME
Alvaro Herrera [Fri, 25 Apr 2014 19:43:53 +0000 (16:43 -0300)]
deparse: Support for ALTER <OBJECT> RENAME

It supports everything but functions, aggregates, operator classes and
operator families.

10 years agodeparse: Support ALTER TYPE / ADD VALUE (enums)
Alvaro Herrera [Fri, 21 Mar 2014 19:33:14 +0000 (16:33 -0300)]
deparse: Support ALTER TYPE / ADD VALUE (enums)

10 years agodeparse: Support CREATE RULE
Alvaro Herrera [Wed, 26 Feb 2014 20:26:55 +0000 (17:26 -0300)]
deparse: Support CREATE RULE

10 years agodeparse: Support CREATE EXTENSION
Alvaro Herrera [Fri, 21 Feb 2014 21:11:35 +0000 (18:11 -0300)]
deparse: Support CREATE EXTENSION

10 years agodeparse: Support CREATE TYPE AS RANGE
Alvaro Herrera [Fri, 14 Feb 2014 22:04:08 +0000 (19:04 -0300)]
deparse: Support CREATE TYPE AS RANGE

10 years agodeparse: Support CREATE SCHEMA/TABLE/SEQUENCE/INDEX/TRIGGER
Alvaro Herrera [Thu, 25 Sep 2014 18:57:48 +0000 (15:57 -0300)]
deparse: Support CREATE SCHEMA/TABLE/SEQUENCE/INDEX/TRIGGER

10 years agodeparse: Support CREATE TYPE AS ENUM
Alvaro Herrera [Thu, 25 Sep 2014 18:55:43 +0000 (15:55 -0300)]
deparse: Support CREATE TYPE AS ENUM

10 years agodeparse: Support CREATE TYPE AS
Alvaro Herrera [Thu, 25 Sep 2014 18:54:00 +0000 (15:54 -0300)]
deparse: Support CREATE TYPE AS

10 years agodeparse: sprinkle EventTriggerStashCommand() calls
Alvaro Herrera [Thu, 25 Sep 2014 18:50:37 +0000 (15:50 -0300)]
deparse: sprinkle EventTriggerStashCommand() calls

10 years agodeparse: infrastructure needed for command deparsing
Alvaro Herrera [Wed, 24 Sep 2014 18:53:04 +0000 (15:53 -0300)]
deparse: infrastructure needed for command deparsing

10 years agodeparse/core: event triggers support COMMENT
Alvaro Herrera [Thu, 25 Sep 2014 18:44:44 +0000 (15:44 -0300)]
deparse/core: event triggers support COMMENT

10 years agodeparse/core: event triggers support GRANT/REVOKE
Alvaro Herrera [Fri, 9 May 2014 22:32:23 +0000 (18:32 -0400)]
deparse/core: event triggers support GRANT/REVOKE

10 years agodeparse/core: have RENAME return attribute number
Alvaro Herrera [Thu, 25 Sep 2014 19:34:50 +0000 (16:34 -0300)]
deparse/core: have RENAME return attribute number

10 years agodeparse/core: qualify "=" operator in SPI queries
Alvaro Herrera [Fri, 2 May 2014 20:51:31 +0000 (16:51 -0400)]
deparse/core: qualify "=" operator in SPI queries

Deparsing of CREATE VIEW was failing without this, because we remove
pg_catalog from the search path.

10 years agopg_recvlogical: Improve --help output
Peter Eisentraut [Sun, 12 Oct 2014 05:45:25 +0000 (01:45 -0400)]
pg_recvlogical: Improve --help output

List the actions first, as they are the most important options.  Group
the other options more sensibly, consistent with the man page.  Correct
a few typographical errors, clarify some things.

Also update the pg_receivexlog --help output to make it a bit more
consistent with that of pg_recvlogical.

10 years agoMessage improvements
Peter Eisentraut [Sun, 12 Oct 2014 05:02:56 +0000 (01:02 -0400)]
Message improvements

10 years agopg_upgrade: prefix Unix shell script name output with "./"
Bruce Momjian [Sat, 11 Oct 2014 22:38:41 +0000 (18:38 -0400)]
pg_upgrade:  prefix Unix shell script name output with "./"

This more clearly suggests the current directory.  While this also works
on Windows, it might be confusing.

Report by Christoph Berg