#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.69 for PostgreSQL 9.5.0 (Postgres-XL 9.5r1beta2).
-# Generated by GNU Autoconf 2.69 for PostgreSQL 9.5.2.
++# Generated by GNU Autoconf 2.69 for PostgreSQL 9.5.2 (Postgres-XL 9.5r1beta2).
#
-# Report bugs to <pgsql-bugs@postgresql.org>.
+# Report bugs to <bugs@postgres-xl.org>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='PostgreSQL'
PACKAGE_TARNAME='postgresql'
- PACKAGE_VERSION='9.5.0 (Postgres-XL 9.5r1beta2)'
-PACKAGE_VERSION='9.5.2'
-PACKAGE_STRING='PostgreSQL 9.5.2'
++PACKAGE_VERSION='9.5.2 (Postgres-XL 9.5r1beta2)'
+PACKAGE_XC_VERSION='9.5r1beta2'
- PACKAGE_STRING='PostgreSQL 9.5.0 (Postgres-XL 9.5r1beta2)'
++PACKAGE_STRING='PostgreSQL 9.5.2 (Postgres-XL 9.5r1beta2)'
PACKAGE_URL=''
ac_unique_file="src/backend/access/common/heaptuple.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
- \`configure' configures PostgreSQL 9.5.0 (Postgres-XL 9.5r1beta2) to adapt to many kinds of systems.
-\`configure' configures PostgreSQL 9.5.2 to adapt to many kinds of systems.
++\`configure' configures PostgreSQL 9.5.2 (Postgres-XL 9.5r1beta2) to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of PostgreSQL 9.5.0 (Postgres-XL 9.5r1beta2):";;
- short | recursive ) echo "Configuration of PostgreSQL 9.5.2:";;
++ short | recursive ) echo "Configuration of PostgreSQL 9.5.2 (Postgres-XL 9.5r1beta2):";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
- PostgreSQL configure 9.5.0 (Postgres-XL 9.5r1beta2)
-PostgreSQL configure 9.5.2
++PostgreSQL configure 9.5.2 (Postgres-XL 9.5r1beta2)
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
- It was created by PostgreSQL $as_me 9.5.0 (Postgres-XL 9.5r1beta2), which was
-It was created by PostgreSQL $as_me 9.5.2, which was
++It was created by PostgreSQL $as_me 9.5.2 (Postgres-XL 9.5r1beta2), which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
- This file was extended by PostgreSQL $as_me 9.5.0 (Postgres-XL 9.5r1beta2), which was
-This file was extended by PostgreSQL $as_me 9.5.2, which was
++This file was extended by PostgreSQL $as_me 9.5.2 (Postgres-XL 9.5r1beta2), which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
- PostgreSQL config.status 9.5.0 (Postgres-XL 9.5r1beta2)
-PostgreSQL config.status 9.5.2
++PostgreSQL config.status 9.5.2 (Postgres-XL 9.5r1beta2)
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
Operating System (example: Linux 2.4.18) :
- PostgreSQL version (example: PostgreSQL 9.5.0): Postgres-XL 9.5r1beta2
- PostgreSQL version (example: PostgreSQL 9.5.2): PostgreSQL 9.5.2
++ PostgreSQL version (example: PostgreSQL 9.5.2): Postgres-XL 9.5r1beta2
Compiler used (example: gcc 3.3.5) :
usually best to follow it.
</para>
+ <para>
+ As mentioned when discussing <type>UNIQUE</> constraint, the distribution column
+ must be included in <type>PRIMARY KEY</type>. Other restrictions
+ apply to the <type>PRIMARY KEY</> as well. When an expression is used on
+ a <type>PRIMARY KEY</> constraint, this expression must contain
+ the distribution column of its parent table. It cannot use other
+ columns as well.
+ </para>
+ <para>
+ Primary keys are useful both for
+ documentation purposes and for client applications. For example,
+ a GUI application that allows modifying row values probably needs
+ to know the primary key of a table to be able to identify rows
+ uniquely. There are also various ways in which the database system
+ makes use of a primary key if one has been declared; for example,
+ the primary key defines the default target column(s) for foreign keys
+ referencing its table.
+ </para>
</sect2>
<sect2 id="ddl-constraints-fk">
</para>
<para>
- The primary key constraint should name a set of columns that is
- different from other sets of columns named by any unique
- constraint defined for the same table.
+ <literal>PRIMARY KEY</literal> enforces the same data constraints as
+ a combination of <literal>UNIQUE</> and <literal>NOT NULL</>, but
+ identifying a set of columns as the primary key also provides metadata
+ about the design of the schema, since a primary key implies that other
+ tables can rely on this set of columns as a unique identifier for rows.
</para>
+
+ <para>
+ In <productname>Postgres-XL</>, if <command>DISTRIBUTE BY REPLICATION</> is not specified, the
+ distribution key must be included in the set of primary key
+ columns.
+ </para>
</listitem>
</varlistentry>
case RM_SPGIST_ID:
case RM_BRIN_ID:
case RM_COMMIT_TS_ID:
+#ifdef PGXC
+ case RM_BARRIER_ID:
+#endif
case RM_REPLORIGIN_ID:
+ /* just deal with xid, and done */
+ ReorderBufferProcessXid(ctx->reorder, XLogRecGetXid(record),
+ buf.origptr);
break;
case RM_NEXT_ID:
elog(ERROR, "unexpected RM_NEXT_ID rmgr_id: %u", (RmgrIds) XLogRecGetRmid(buf.record));
plansource->parserSetupArg = parserSetupArg;
plansource->cursor_options = cursor_options;
plansource->fixed_result = fixed_result;
+#ifdef PGXC
+ //plansource->stmt_name = NULL;
+#endif
plansource->resultDesc = PlanCacheComputeResultDesc(querytree_list);
+ plansource->planUserId = GetUserId();
+ plansource->row_security_env = row_security;
MemoryContextSwitchTo(oldcxt);
return NIL;
}
- /*
- * If this is a new cached plan, then set the user id it was planned by
- * and under what row security settings; these are needed to determine
- * plan invalidation when RLS is involved.
- */
- if (!OidIsValid(plansource->planUserId))
- {
- plansource->planUserId = GetUserId();
- plansource->row_security_env = row_security;
- }
-
+#ifdef XCP
+ /*
+ * In the raw_parse_tree is not available, there is no way the plan can be
+ * revalidated and there must not be any need to do so. Trust the existing
+ * plan
+ *
+ * XXX We should rather check this as an assertion, but currently
+ * RemoteSubplan gets invalidated because of search_path changes as temp
+ * namespace gets added in subsequent revalidation.
+ */
+ if (plansource->raw_parse_tree == NULL)
+ {
+ Assert(plansource->is_valid);
+ return NIL;
+ }
+#endif
+
/*
* If the query is currently valid, we should have a saved search_path ---
* check to see if that matches the current environment. If not, we want
static const CatalogId nilCatalogId = {0, 0};
+#ifdef PGXC
+static int include_nodes = 0;
+#endif
+
static void help(const char *progname);
- static void setup_connection(Archive *AH, DumpOptions *dopt,
+ static void setup_connection(Archive *AH,
const char *dumpencoding, const char *dumpsnapshot,
char *use_role);
static ArchiveFormat parseArchiveFormat(const char *format, ArchiveMode *mode);
DATA(insert OID = 6014 ( pg_show_replication_origin_status PGNSP PGUID 12 1 100 0 0 f f f f f t v 0 0 2249 "" "{26,25,3220,3220}" "{o,o,o,o}" "{local_id, external_id, remote_lsn, local_lsn}" _null_ _null_ pg_show_replication_origin_status _null_ _null_ _null_ ));
DESCR("get progress for all replication origins");
+#ifdef USE_MODULE_MSGIDS
+DATA(insert OID = 6015 ( pg_msgmodule_set PGNSP PGUID 12 1 1 0 0 f f f f t t i 4 0 16 "20 20 20 2275" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_set _null_ _null_ _null_ ));
+DESCR("set debugging level for module/file/msg");
+DATA(insert OID = 6016 ( pg_msgmodule_change PGNSP PGUID 12 1 1 0 0 f f f f t t i 4 0 16 "20 20 20 20" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_change _null_ _null_ _null_ ));
+DESCR("change debugging level for module/file/msg");
+DATA(insert OID = 6017 ( pg_msgmodule_enable PGNSP PGUID 12 1 1 0 0 f f f f t t i 1 0 16 "20" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_enable _null_ _null_ _null_ ));
+DESCR("pid to honour overriden log levels");
+DATA(insert OID = 6018 ( pg_msgmodule_disable PGNSP PGUID 12 1 1 0 0 f f f f t t i 1 0 16 "20" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_disable _null_ _null_ _null_ ));
+DESCR("pid to ignore overriden log levels");
+DATA(insert OID = 6019 ( pg_msgmodule_enable_all PGNSP PGUID 12 1 1 0 0 f f f f t t i 1 0 16 "16" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_enable_all _null_ _null_ _null_ ));
+DESCR("all current/future processes to honour overriden log levels");
+DATA(insert OID = 6020 ( pg_msgmodule_disable_all PGNSP PGUID 12 1 1 0 0 f f f f t t 0 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_msgmodule_disable_all _null_ _null_ _null_ ));
+DESCR("all processes to ignore overriden log levels");
+#endif
+ /* rls */
+ DATA(insert OID = 3298 ( row_security_active PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 16 "26" _null_ _null_ _null_ _null_ _null_ row_security_active _null_ _null_ _null_ ));
+ DESCR("row security for current context active on table by table oid");
+ DATA(insert OID = 3299 ( row_security_active PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 16 "25" _null_ _null_ _null_ _null_ _null_ row_security_active_name _null_ _null_ _null_ ));
+ DESCR("row security for current context active on table by table name");
/*
* Symbolic values for provolatile column: these indicate whether the result
#define MEMSET_LOOP_LIMIT 1024
/* Define to the address where bug reports for this package should be sent. */
/* Define to the full name of this package. */
-#define PACKAGE_NAME "PostgreSQL"
+#define PACKAGE_NAME "Postgres-XL"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 9.5.2"
+#define PACKAGE_STRING "Postgres-XL 9.5r1beta2"
/* Define to the version of this package. */
- #define PACKAGE_VERSION "9.5.0"
+ #define PACKAGE_VERSION "9.5.2"
/* Define to the name of a signed 128-bit integer type. */
#undef PG_INT128_TYPE
#define PG_INT64_TYPE long long int
/* PostgreSQL version as a string */
- #define PG_VERSION "9.5.0"
+ #define PG_VERSION "9.5.2"
/* PostgreSQL version as a number */
- #define PG_VERSION_NUM 90500
+ #define PG_VERSION_NUM 90502
/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "postgresql"
+#define PACKAGE_TARNAME "postgres-xl"
+
+/* Postgres-XC version as a string */
+#define PGXC_VERSION "1.1devel"
+
+/* Postgres-XC version as a number */
+#define PGXC_VERSION_NUM 10100
/* Define to the name of the default PostgreSQL service principal in Kerberos.
(--with-krb-srvnam=NAME) */
select ten, sum(distinct four) from onek a
group by grouping sets((ten,four),(ten))
having exists (select 1 from onek b where sum(distinct a.four) = b.four);
- ten | sum
------+-----
- 0 | 0
- 0 | 2
- 0 | 2
- 1 | 1
- 1 | 3
- 2 | 0
- 2 | 2
- 2 | 2
- 3 | 1
- 3 | 3
- 4 | 0
- 4 | 2
- 4 | 2
- 5 | 1
- 5 | 3
- 6 | 0
- 6 | 2
- 6 | 2
- 7 | 1
- 7 | 3
- 8 | 0
- 8 | 2
- 8 | 2
- 9 | 1
- 9 | 3
-(25 rows)
-
+ERROR: GROUPING SETS, ROLLUP or CUBE is not yet supported
+ -- Tests around pushdown of HAVING clauses, partially testing against previous bugs
+ select a,count(*) from gstest2 group by rollup(a) order by a;
- a | count
----+-------
- 1 | 8
- 2 | 1
- | 9
-(3 rows)
-
++ERROR: GROUPING SETS, ROLLUP or CUBE is not yet supported
+ select a,count(*) from gstest2 group by rollup(a) having a is distinct from 1 order by a;
- a | count
----+-------
- 2 | 1
- | 9
-(2 rows)
-
++ERROR: GROUPING SETS, ROLLUP or CUBE is not yet supported
+ explain (costs off)
+ select a,count(*) from gstest2 group by rollup(a) having a is distinct from 1 order by a;
- QUERY PLAN
-----------------------------------
- GroupAggregate
- Group Key: a
- Group Key: ()
- Filter: (a IS DISTINCT FROM 1)
- -> Sort
- Sort Key: a
- -> Seq Scan on gstest2
-(7 rows)
-
++ERROR: GROUPING SETS, ROLLUP or CUBE is not yet supported
+ select v.c, (select count(*) from gstest2 group by () having v.c)
+ from (values (false),(true)) v(c) order by v.c;
+ c | count
+ ---+-------
+ f |
+ t | 9
+ (2 rows)
+
+ explain (costs off)
+ select v.c, (select count(*) from gstest2 group by () having v.c)
+ from (values (false),(true)) v(c) order by v.c;
- QUERY PLAN
------------------------------------------------------------
++ QUERY PLAN
++-------------------------------------------------------------------------
+ Sort
+ Sort Key: "*VALUES*".column1
+ -> Values Scan on "*VALUES*"
+ SubPlan 1
+ -> Aggregate
+ Group Key: ()
+ Filter: "*VALUES*".column1
- -> Result
- One-Time Filter: "*VALUES*".column1
- -> Seq Scan on gstest2
-(10 rows)
++ -> Remote Subquery Scan on all (datanode_1,datanode_2)
++ -> Aggregate
++ -> Result
++ One-Time Filter: "*VALUES*".column1
++ -> Seq Scan on gstest2
++(12 rows)
+
-- HAVING with GROUPING queries
select ten, grouping(ten) from onek
group by grouping sets(ten) having grouping(ten) >= 0
reset enable_hashjoin;
reset enable_nestloop;
--
- QUERY PLAN
-------------------------------------------------------------
+ -- regression test for bug #13908 (hash join with skew tuples & nbatch increase)
+ --
+ set work_mem to '64kB';
+ set enable_mergejoin to off;
+ explain (costs off)
+ select count(*) from tenk1 a, tenk1 b
+ where a.hundred = b.thousand and (b.fivethous % 10) < 10;
- -> Hash Join
- Hash Cond: (a.hundred = b.thousand)
- -> Index Only Scan using tenk1_hundred on tenk1 a
- -> Hash
- -> Seq Scan on tenk1 b
- Filter: ((fivethous % 10) < 10)
-(7 rows)
++ QUERY PLAN
++-----------------------------------------------------------------------------------
+ Aggregate
++ -> Remote Subquery Scan on all (datanode_1,datanode_2)
++ -> Aggregate
++ -> Hash Join
++ Hash Cond: (a.hundred = b.thousand)
++ -> Remote Subquery Scan on all (datanode_1,datanode_2)
++ Distribute results by H: hundred
++ -> Seq Scan on tenk1 a
++ -> Hash
++ -> Remote Subquery Scan on all (datanode_1,datanode_2)
++ Distribute results by H: thousand
++ -> Seq Scan on tenk1 b
++ Filter: ((fivethous % 10) < 10)
++(13 rows)
+
+ select count(*) from tenk1 a, tenk1 b
+ where a.hundred = b.thousand and (b.fivethous % 10) < 10;
+ count
+ --------
+ 100000
+ (1 row)
+
+ reset work_mem;
+ reset enable_mergejoin;
+ --
-- regression test for 8.2 bug with improper re-ordering of left joins
--
create temp table tt3(f1 int, f2 text);
CREATE POLICY p1 ON t1 TO rls_regress_user1 USING ((a % 2) = 0);
CREATE POLICY p2 ON t1 TO rls_regress_user2 USING ((a % 4) = 0);
ALTER TABLE t1 ENABLE ROW LEVEL SECURITY;
+ -- Prepare as rls_regress_user1
SET ROLE rls_regress_user1;
PREPARE role_inval AS SELECT * FROM t1;
+ -- Check plan
EXPLAIN (COSTS OFF) EXECUTE role_inval;
- QUERY PLAN
--------------------------
- Seq Scan on t1
- Filter: ((a % 2) = 0)
-(2 rows)
+ QUERY PLAN
+----------------------------------
+ Remote Fast Query Execution
+ Node/s: datanode_1, datanode_2
+ -> Seq Scan on t1
+ Filter: ((a % 2) = 0)
+(4 rows)
+ -- Change to rls_regress_user2
SET ROLE rls_regress_user2;
+ -- Check plan- should be different
EXPLAIN (COSTS OFF) EXECUTE role_inval;
- QUERY PLAN
--------------------------
- Seq Scan on t1
- Filter: ((a % 4) = 0)
-(2 rows)
+ QUERY PLAN
+----------------------------------
+ Remote Fast Query Execution
+ Node/s: datanode_1, datanode_2
+ -> Seq Scan on t1
+ Filter: ((a % 4) = 0)
+(4 rows)
- QUERY PLAN
--------------------------
- Seq Scan on t1
- Filter: ((a % 2) = 0)
-(2 rows)
+ -- Change back to rls_regress_user1
+ SET ROLE rls_regress_user1;
+ -- Check plan- should be back to original
+ EXPLAIN (COSTS OFF) EXECUTE role_inval;
++ QUERY PLAN
++----------------------------------
++ Remote Fast Query Execution
++ Node/s: datanode_1, datanode_2
++ -> Seq Scan on t1
++ Filter: ((a % 2) = 0)
++(4 rows)
+
--
-- CTE and RLS
--
999 | 9999
(25 rows)
- QUERY PLAN
---------------------------------------------------------
- Index Only Scan using test_table_a_b_idx on test_table
- Index Cond: (ROW(a, b) > ROW('a'::text, 'a'::text))
-(2 rows)
+ -- Test case for bug #14010: indexed row comparisons fail with nulls
+ create temp table test_table (a text, b text);
+ insert into test_table values ('a', 'b');
+ insert into test_table select 'a', null from generate_series(1,1000);
+ insert into test_table values ('b', 'a');
+ create index on test_table (a,b);
+ set enable_sort = off;
+ explain (costs off)
+ select a,b from test_table where (a,b) > ('a','a') order by a,b;
++ QUERY PLAN
++--------------------------------------------------------------
++ Remote Subquery Scan on all (datanode_1,datanode_2)
++ -> Index Only Scan using test_table_a_b_idx on test_table
++ Index Cond: (ROW(a, b) > ROW('a'::text, 'a'::text))
++(3 rows)
+
+ select a,b from test_table where (a,b) > ('a','a') order by a,b;
+ a | b
+ ---+---
+ a | b
+ b | a
+ (2 rows)
+
+ reset enable_sort;
-- Check row comparisons with IN
select * from int8_tbl i8 where i8 in (row(123,456)); -- fail, type mismatch
ERROR: cannot compare dissimilar column types bigint and integer at record column 1
| 1998 998 98 8 1 3 3
| 1999 999 99 9 52 362 5
| 1999 999 99 9 52 363 6
+ | 2000 0 0 0 11 73 3
+ | 2000 0 0 0 11 73 3
+ | 2000 0 0 0 11 73 3
+ | 2000 0 0 0 11 73 3
+ | 2000 0 0 0 11 73 3
| 2000 0 0 0 52 364 7
| 2001 1 1 1 1 1 1
+ | 2001 1 1 1 38 265 6
+ | 2097 97 97 7 7 48 6
+ |
(66 rows)
+ -- Check OF with various zone offsets, particularly fractional hours
+ SET timezone = '00:00';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ +00
+ (1 row)
+
+ SET timezone = '+02:00';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ -02
+ (1 row)
+
+ SET timezone = '-13:00';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ +13
+ (1 row)
+
+ SET timezone = '-00:30';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ +00:30
+ (1 row)
+
+ SET timezone = '00:30';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ -00:30
+ (1 row)
+
+ SET timezone = '-04:30';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ +04:30
+ (1 row)
+
+ SET timezone = '04:30';
+ SELECT to_char(now(), 'OF');
+ to_char
+ ---------
+ -04:30
+ (1 row)
+
+ RESET timezone;
CREATE TABLE TIMESTAMPTZ_TST (a int , b timestamptz);
-- Test year field value with len > 4
INSERT INTO TIMESTAMPTZ_TST VALUES(1, 'Sat Mar 12 23:58:48 1000 IST');
DROP TABLE tx1;
DROP TABLE tx2;
DROP TABLE tx3;
-ERROR: new row violates check option for view "v1"
-DETAIL: Failing row contains (-1, ONE, 10).
+ --
+ -- Test handling of vars from correlated subqueries in quals from outer
+ -- security barrier views, per bug #13988
+ --
+ CREATE TABLE t1 (a int, b text, c int);
+ INSERT INTO t1 VALUES (1, 'one', 10);
+ CREATE TABLE t2 (cc int);
+ INSERT INTO t2 VALUES (10), (20);
+ CREATE VIEW v1 WITH (security_barrier = true) AS
+ SELECT * FROM t1 WHERE (a > 0)
+ WITH CHECK OPTION;
+ CREATE VIEW v2 WITH (security_barrier = true) AS
+ SELECT * FROM v1 WHERE EXISTS (SELECT 1 FROM t2 WHERE t2.cc = v1.c)
+ WITH CHECK OPTION;
+ INSERT INTO v2 VALUES (2, 'two', 20); -- ok
+ INSERT INTO v2 VALUES (-2, 'minus two', 20); -- not allowed
+ ERROR: new row violates check option for view "v1"
+ DETAIL: Failing row contains (-2, minus two, 20).
+ INSERT INTO v2 VALUES (3, 'three', 30); -- not allowed
+ ERROR: new row violates check option for view "v2"
+ DETAIL: Failing row contains (3, three, 30).
+ UPDATE v2 SET b = 'ONE' WHERE a = 1; -- ok
++ERROR: could not plan this distributed update
++DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL.
+ UPDATE v2 SET a = -1 WHERE a = 1; -- not allowed
-ERROR: new row violates check option for view "v2"
-DETAIL: Failing row contains (1, ONE, 30).
++ERROR: could not plan this distributed update
++DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL.
+ UPDATE v2 SET c = 30 WHERE a = 1; -- not allowed
- 1 | ONE | 10
-(1 row)
++ERROR: could not plan this distributed update
++DETAIL: correlated UPDATE or updating distribution column currently not supported in Postgres-XL.
+ DELETE FROM v2 WHERE a = 2; -- ok
++ERROR: could not plan this distributed delete
++DETAIL: correlated or complex DELETE is currently not supported in Postgres-XL.
+ SELECT * FROM v2;
+ a | b | c
+ ---+-----+----
++ 1 | one | 10
++ 2 | two | 20
++(2 rows)
+
+ DROP VIEW v2;
+ DROP VIEW v1;
+ DROP TABLE t2;
+ DROP TABLE t1;
SELECT '' AS "54", d1 as timestamptz,
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
- FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
+ FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01' ORDER BY d1;
-- TO_CHAR()
-SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
- FROM TIMESTAMPTZ_TBL;
-
+SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
- FROM TIMESTAMPTZ_TBL;
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
- FROM TIMESTAMPTZ_TBL;
-
-SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
- FROM TIMESTAMPTZ_TBL;
-
-SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
- FROM TIMESTAMPTZ_TBL;
-
-SELECT '' AS to_char_6, to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
- FROM TIMESTAMPTZ_TBL;
-
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
+SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
+SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
+SELECT '' AS to_char_6, to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
- FROM TIMESTAMPTZ_TBL;
-
-SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
- FROM TIMESTAMPTZ_TBL;
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
-SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
- FROM TIMESTAMPTZ_TBL;
+SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+
+SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
- FROM TIMESTAMPTZ_TBL;
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
- FROM TIMESTAMPTZ_TBL;
+ FROM TIMESTAMPTZ_TBL ORDER BY d1;
+ -- Check OF with various zone offsets, particularly fractional hours
+ SET timezone = '00:00';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '+02:00';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '-13:00';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '-00:30';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '00:30';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '-04:30';
+ SELECT to_char(now(), 'OF');
+ SET timezone = '04:30';
+ SELECT to_char(now(), 'OF');
+ RESET timezone;
+
CREATE TABLE TIMESTAMPTZ_TST (a int , b timestamptz);
-- Test year field value with len > 4