This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new e8c44c55af9 Fix some answer for pax storage
e8c44c55af9 is described below
commit e8c44c55af9723dd0d210c42a7e61e5163ce520e
Author: Jinbao Chen <[email protected]>
AuthorDate: Mon Mar 16 22:37:20 2026 -0400
Fix some answer for pax storage
---
.../src/test/regress/expected/aggregates.out | 50 +++---
.../src/test/regress/expected/alter_table.out | 74 ++++----
.../src/test/regress/expected/cluster.out | 1 -
.../src/test/regress/expected/indexing.out | 3 +-
.../pax_storage/src/test/regress/expected/join.out | 57 +++---
.../src/test/regress/expected/json_encoding.out | 24 +--
.../src/test/regress/expected/jsonpath.out | 198 ++++++++++++---------
.../test/regress/expected/jsonpath_encoding.out | 12 +-
.../src/test/regress/expected/privileges.out | 25 +--
.../src/test/regress/expected/rangefuncs.out | 15 +-
.../pax_storage/src/test/regress/expected/xml.out | 19 +-
11 files changed, 256 insertions(+), 222 deletions(-)
diff --git a/contrib/pax_storage/src/test/regress/expected/aggregates.out
b/contrib/pax_storage/src/test/regress/expected/aggregates.out
index e8b85e4137a..547ae399057 100644
--- a/contrib/pax_storage/src/test/regress/expected/aggregates.out
+++ b/contrib/pax_storage/src/test/regress/expected/aggregates.out
@@ -1895,14 +1895,14 @@ from generate_series(1,5) x,
(values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p)
group by p order by p;
ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP
-LINE 1: select p, sum() within group (order by x::float8)
+LINE 1: select p, sum() within group (order by x::float8) -- error
^
select p, percentile_cont(p,p) -- error
from generate_series(1,5) x,
(values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p)
group by p order by p;
ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont
-LINE 1: select p, percentile_cont(p,p)
+LINE 1: select p, percentile_cont(p,p) -- error
^
select percentile_cont(0.5) within group (order by b) from aggtest;
percentile_cont
@@ -2094,15 +2094,15 @@ select ten,
from tenk1
group by ten order by ten;
select pg_get_viewdef('aggordview1');
- pg_get_viewdef
--------------------------------------------------------------------------------------------------------------------------------
- SELECT tenk1.ten,
+
- percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY
tenk1.thousand) AS p50, +
- percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY
tenk1.thousand) FILTER (WHERE (tenk1.hundred = 1)) AS px,+
- rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY tenk1.hundred,
tenk1.string4 DESC, tenk1.hundred) AS rank +
- FROM tenk1
+
- GROUP BY tenk1.ten
+
- ORDER BY tenk1.ten;
+ pg_get_viewdef
+-------------------------------------------------------------------------------------------------------------------
+ SELECT ten,
+
+ percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY thousand)
AS p50, +
+ percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY thousand)
FILTER (WHERE (hundred = 1)) AS px,+
+ rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY hundred, string4 DESC,
hundred) AS rank +
+ FROM tenk1
+
+ GROUP BY ten
+
+ ORDER BY ten;
(1 row)
select * from aggordview1 order by ten;
@@ -2332,14 +2332,14 @@ from generate_series(1,5) x,
(values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p)
group by p order by p;
ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP
-LINE 1: select p, sum() within group (order by x::float8)
+LINE 1: select p, sum() within group (order by x::float8) -- error
^
select p, percentile_cont(p,p) -- error
from generate_series(1,5) x,
(values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p)
group by p order by p;
ERROR: WITHIN GROUP is required for ordered-set aggregate percentile_cont
-LINE 1: select p, percentile_cont(p,p)
+LINE 1: select p, percentile_cont(p,p) -- error
^
select percentile_cont(0.5) within group (order by b) from aggtest;
percentile_cont
@@ -2531,17 +2531,19 @@ select ten,
from tenk1
group by ten order by ten;
select pg_get_viewdef('aggordview1');
- pg_get_viewdef
--------------------------------------------------------------------------------------------------------------------------------
- SELECT tenk1.ten,
+
- percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY
tenk1.thousand) AS p50, +
- percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY
tenk1.thousand) FILTER (WHERE (tenk1.hundred = 1)) AS px,+
- rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY tenk1.hundred,
tenk1.string4 DESC, tenk1.hundred) AS rank +
- FROM tenk1
+
- GROUP BY tenk1.ten
+
- ORDER BY tenk1.ten;
-(1 row)
-
+ pg_get_viewdef
+-------------------------------------------------------------------------------------------------------------------
+ SELECT ten,
+
+ percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY thousand)
AS p50, +
+ percentile_disc((0.5)::double precision) WITHIN GROUP (ORDER BY thousand)
FILTER (WHERE (hundred = 1)) AS px,+
+ rank(5, 'AZZZZ'::name, 50) WITHIN GROUP (ORDER BY hundred, string4 DESC,
hundred) AS rank +
+ FROM tenk1
+
+ GROUP BY ten
+
+ ORDER BY ten;
+(1 row)
+
+-- start_ignore
+-- end_ignore
select * from aggordview1 order by ten;
ten | p50 | px | rank
-----+-----+-----+------
diff --git a/contrib/pax_storage/src/test/regress/expected/alter_table.out
b/contrib/pax_storage/src/test/regress/expected/alter_table.out
index d4c49099a4a..020ca2ab7f1 100644
--- a/contrib/pax_storage/src/test/regress/expected/alter_table.out
+++ b/contrib/pax_storage/src/test/regress/expected/alter_table.out
@@ -1171,9 +1171,11 @@ ERROR: column "bar" of relation "atacc1" does not exist
-- try creating a view and altering that, should fail
create view myview as select * from atacc1;
alter table myview alter column test drop not null;
-ERROR: "myview" is not a table or foreign table
+ERROR: ALTER action ALTER COLUMN ... DROP NOT NULL cannot be performed on
relation "myview"
+DETAIL: This operation is not supported for views.
alter table myview alter column test set not null;
-ERROR: "myview" is not a table or foreign table
+ERROR: ALTER action ALTER COLUMN ... SET NOT NULL cannot be performed on
relation "myview"
+DETAIL: This operation is not supported for views.
drop view myview;
drop table atacc1;
-- set not null verified by constraints
@@ -1473,7 +1475,8 @@ select * from myview;
(0 rows)
alter table myview drop d;
-ERROR: "myview" is not a table, composite type, or foreign table
+ERROR: ALTER action DROP COLUMN cannot be performed on relation "myview"
+DETAIL: This operation is not supported for views.
drop view myview;
-- test some commands to make sure they fail on the dropped column
analyze atacc1(a);
@@ -2567,8 +2570,8 @@ create view at_view_2 as select *, to_json(v1) as j from
at_view_1 v1;
id | integer | | | | plain |
stuff | text | | | | extended |
View definition:
- SELECT bt.id,
- bt.stuff
+ SELECT id,
+ stuff
FROM at_base_table bt;
\d+ at_view_2
@@ -2579,8 +2582,8 @@ View definition:
stuff | text | | | | extended |
j | json | | | | extended |
View definition:
- SELECT v1.id,
- v1.stuff,
+ SELECT id,
+ stuff,
to_json(v1.*) AS j
FROM at_view_1 v1;
@@ -2610,8 +2613,8 @@ create or replace view at_view_1 as select *, 2+2 as more
from at_base_table bt;
stuff | text | | | | extended |
more | integer | | | | plain |
View definition:
- SELECT bt.id,
- bt.stuff,
+ SELECT id,
+ stuff,
2 + 2 AS more
FROM at_base_table bt;
@@ -2623,26 +2626,27 @@ View definition:
stuff | text | | | | extended |
j | json | | | | extended |
View definition:
- SELECT v1.id,
- v1.stuff,
+ SELECT id,
+ stuff,
to_json(v1.*) AS j
FROM at_view_1 v1;
explain (verbose, costs off) select * from at_view_2;
- QUERY PLAN
-----------------------------------------------------------------------
+ QUERY PLAN
+-------------------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3)
- Output: bt.id, bt.stuff, (to_json(ROW(bt.id, bt.stuff, NULL)))
+ Output: bt.id, bt.stuff, (to_json(ROW(bt.id, bt.stuff, 4)))
-> Seq Scan on public.at_base_table bt
- Output: bt.id, bt.stuff, to_json(ROW(bt.id, bt.stuff, NULL))
+ Output: bt.id, bt.stuff, to_json(ROW(bt.id, bt.stuff, 4))
+ Settings: constraint_exclusion = 'partition'
Optimizer: Postgres query optimizer
Settings: constraint_exclusion=partition
(6 rows)
select * from at_view_2;
- id | stuff | j
-----+--------+----------------------------------------
- 23 | skidoo | {"id":23,"stuff":"skidoo","more":null}
+ id | stuff | j
+----+--------+-------------------------------------
+ 23 | skidoo | {"id":23,"stuff":"skidoo","more":4}
(1 row)
drop view at_view_2;
@@ -3502,6 +3506,7 @@ ALTER TABLE old_system_table DROP COLUMN othercol;
DROP TABLE old_system_table;
-- set logged
CREATE UNLOGGED TABLE unlogged1(f1 SERIAL PRIMARY KEY, f2 TEXT);
+ERROR: unlogged sequences are not supported
-- check relpersistence of an unlogged table
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~
'^unlogged1'
UNION ALL
@@ -3509,19 +3514,20 @@ SELECT 'toast table', t.relkind, t.relpersistence FROM
pg_class r JOIN pg_class
UNION ALL
SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join
pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid
JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1'
ORDER BY relname;
- relname | relkind | relpersistence
-------------------+---------+----------------
- unlogged1 | r | u
- unlogged1_f1_seq | S | p
- unlogged1_pkey | i | u
-(3 rows)
+ relname | relkind | relpersistence
+---------+---------+----------------
+(0 rows)
CREATE UNLOGGED TABLE unlogged2(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES
unlogged1); -- foreign key
+ERROR: unlogged sequences are not supported
CREATE UNLOGGED TABLE unlogged3(f1 SERIAL PRIMARY KEY, f2 INTEGER REFERENCES
unlogged3); -- self-referencing foreign key
+ERROR: unlogged sequences are not supported
ALTER TABLE unlogged3 SET LOGGED; -- skip self-referencing foreign key
+ERROR: relation "unlogged3" does not exist
ALTER TABLE unlogged2 SET LOGGED; -- fails because a foreign key to an
unlogged table exists
-ERROR: could not change table "unlogged2" to logged because it references
unlogged table "unlogged1"
+ERROR: relation "unlogged2" does not exist
ALTER TABLE unlogged1 SET LOGGED;
+ERROR: relation "unlogged1" does not exist
-- check relpersistence of an unlogged table after changing to permanent
SELECT relname, relkind, relpersistence FROM pg_class WHERE relname ~
'^unlogged1'
UNION ALL
@@ -3529,17 +3535,18 @@ SELECT 'toast table', t.relkind, t.relpersistence FROM
pg_class r JOIN pg_class
UNION ALL
SELECT 'toast index', ri.relkind, ri.relpersistence FROM pg_class r join
pg_class t ON t.oid = r.reltoastrelid JOIN pg_index i ON i.indrelid = t.oid
JOIN pg_class ri ON ri.oid = i.indexrelid WHERE r.relname ~ '^unlogged1'
ORDER BY relname;
- relname | relkind | relpersistence
-------------------+---------+----------------
- unlogged1 | r | p
- unlogged1_f1_seq | S | p
- unlogged1_pkey | i | p
-(3 rows)
+ relname | relkind | relpersistence
+---------+---------+----------------
+(0 rows)
ALTER TABLE unlogged1 SET LOGGED; -- silently do nothing
+ERROR: relation "unlogged1" does not exist
DROP TABLE unlogged3;
+ERROR: table "unlogged3" does not exist
DROP TABLE unlogged2;
+ERROR: table "unlogged2" does not exist
DROP TABLE unlogged1;
+ERROR: table "unlogged1" does not exist
-- set unlogged
CREATE TABLE logged1(f1 SERIAL PRIMARY KEY, f2 TEXT);
-- check relpersistence of a permanent table
@@ -3573,7 +3580,7 @@ ORDER BY relname;
relname | relkind | relpersistence
----------------+---------+----------------
logged1 | r | u
- logged1_f1_seq | S | p
+ logged1_f1_seq | S | u
logged1_pkey | i | u
(3 rows)
@@ -4240,7 +4247,8 @@ DROP TABLE fail_part;
-- fails with incorrect object type
CREATE VIEW at_v1 AS SELECT 1 as a;
ALTER TABLE at_v1 ATTACH PARTITION dummy default;
-ERROR: "at_v1" is not a table or partitioned index
+ERROR: ALTER action ATTACH PARTITION cannot be performed on relation "at_v1"
+DETAIL: This operation is not supported for views.
DROP VIEW at_v1;
--
-- DETACH PARTITION
diff --git a/contrib/pax_storage/src/test/regress/expected/cluster.out
b/contrib/pax_storage/src/test/regress/expected/cluster.out
index 9527a7fc593..e7d1bae014c 100644
--- a/contrib/pax_storage/src/test/regress/expected/cluster.out
+++ b/contrib/pax_storage/src/test/regress/expected/cluster.out
@@ -451,7 +451,6 @@ CREATE INDEX clstrpart_idx ON clstrpart (a);
ALTER TABLE clstrpart CLUSTER ON clstrpart_idx;
ERROR: cannot mark index clustered in partitioned table
CLUSTER clstrpart USING clstrpart_idx;
-ERROR: cannot cluster a partitioned table
DROP TABLE clstrpart;
-- Test CLUSTER with external tuplesorting
-- The tests assume that the rows come out in the physical order, as
diff --git a/contrib/pax_storage/src/test/regress/expected/indexing.out
b/contrib/pax_storage/src/test/regress/expected/indexing.out
index ea1633bd447..be8142137e0 100644
--- a/contrib/pax_storage/src/test/regress/expected/indexing.out
+++ b/contrib/pax_storage/src/test/regress/expected/indexing.out
@@ -143,7 +143,8 @@ select relname, relpartbound from pg_class
(2 rows)
alter table idxpart_c detach partition idxpart1_c;
-ERROR: "idxpart_c" is not a table
+ERROR: ALTER action DETACH PARTITION cannot be performed on relation
"idxpart_c"
+DETAIL: This operation is not supported for partitioned indexes.
drop table idxpart;
-- If a partition already has an index, don't create a duplicative one
create table idxpart (a int, b int) partition by range (a, b);
diff --git a/contrib/pax_storage/src/test/regress/expected/join.out
b/contrib/pax_storage/src/test/regress/expected/join.out
index 75d60ae6fa0..a9b49d95d78 100644
--- a/contrib/pax_storage/src/test/regress/expected/join.out
+++ b/contrib/pax_storage/src/test/regress/expected/join.out
@@ -1638,7 +1638,7 @@ SELECT * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE
J1_TBL.t = 'one'; -- er
ERROR: invalid reference to FROM-clause entry for table "j1_tbl"
LINE 1: ... * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t =...
^
-HINT: There is an entry for table "j1_tbl", but it cannot be referenced from
this part of the query.
+DETAIL: There is an entry for table "j1_tbl", but it cannot be referenced
from this part of the query.
SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.i = 1; -- ok
i | j | t | k
---+---+-----+----
@@ -4787,36 +4787,31 @@ explain (costs off)
QUERY PLAN
-------------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3)
- -> Hash Right Join
- Hash Cond: (b.unique2 = a.f1)
- -> Redistribute Motion 3:3 (slice2; segments: 3)
- Hash Key: 0
- -> Index Scan using tenk1_unique2 on tenk1 b
- Index Cond: (unique2 = 0)
- -> Hash
- -> Seq Scan on int4_tbl a
- Filter: (f1 = 0)
+ -> Nested Loop Left Join
+ -> Seq Scan on int4_tbl a
+ Filter: (f1 = 0)
+ -> Materialize
+ -> Redistribute Motion 3:3 (slice2; segments: 3)
+ Hash Key: 0
+ -> Index Scan using tenk1_unique2 on tenk1 b
+ Index Cond: (unique2 = 0)
Optimizer: Postgres query optimizer
(11 rows)
explain (costs off)
select * from tenk1 a full join tenk1 b using(unique2) where unique2 = 42;
- QUERY PLAN
--------------------------------------------------------------------
- Gather Motion 3:1 (slice1; segments: 3)
- -> Hash Full Join
- Hash Cond: (a.unique2 = b.unique2)
- -> Redistribute Motion 3:3 (slice2; segments: 3)
- Hash Key: a.unique2
- -> Index Scan using tenk1_unique2 on tenk1 a
+ QUERY PLAN
+-------------------------------------------------------------
+ Merge Full Join
+ -> Gather Motion 3:1 (slice1; segments: 3)
+ -> Index Scan using tenk1_unique2 on tenk1 a
+ Index Cond: (unique2 = 42)
+ -> Materialize
+ -> Gather Motion 3:1 (slice2; segments: 3)
+ -> Index Scan using tenk1_unique2 on tenk1 b
Index Cond: (unique2 = 42)
- -> Hash
- -> Redistribute Motion 3:3 (slice3; segments: 3)
- Hash Key: b.unique2
- -> Index Scan using tenk1_unique2 on tenk1 b
- Index Cond: (unique2 = 42)
Optimizer: Postgres query optimizer
-(13 rows)
+(9 rows)
--
-- test that quals attached to an outer join have correct semantics,
@@ -5322,7 +5317,7 @@ select * from
ERROR: invalid reference to FROM-clause entry for table "y"
LINE 2: ...bl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1;
^
-HINT: There is an entry for table "y", but it cannot be referenced from this
part of the query.
+DETAIL: There is an entry for table "y", but it cannot be referenced from
this part of the query.
select * from
int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1; -- ok
q1 | q2 | f1 | ff
@@ -6609,8 +6604,8 @@ select * from fkest f1
join fkest f2 on (f1.x = f2.x and f1.x10 = f2.x10b and f1.x100 = f2.x100)
join fkest f3 on f1.x = f3.x
where f1.x100 = 2;
- QUERY PLAN
------------------------------------------------------
+ QUERY PLAN
+-----------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3)
-> Hash Join
Hash Cond: ((f1.x = f2.x) AND (f1.x10 = f2.x10b))
@@ -6676,7 +6671,7 @@ where f.c = 1;
-> Index Only Scan using fkest1_pkey on fkest1 f3
Index Cond: ((a = f.a) AND (b = f.b))
Optimizer: Postgres query optimizer
-(13 rows)
+(19 rows)
rollback;
--
@@ -7185,13 +7180,13 @@ from onek t1, tenk1 t2
where exists (select 1 from j3
where j3.unique1 = t1.unique1 and j3.tenthous = t2.hundred)
and t1.unique1 < 1;
- QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------
+ QUERY PLAN
+---------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3)
Output: t1.unique1, t2.hundred
-> Nested Loop
Output: t1.unique1, t2.hundred
- Join Filter: (j3.unique1 = t1.unique1)
+ Join Filter: (t1.unique1 = j3.unique1)
-> Broadcast Motion 3:3 (slice2; segments: 3)
Output: t1.unique1
-> Index Only Scan using onek_unique1 on public.onek t1
diff --git a/contrib/pax_storage/src/test/regress/expected/json_encoding.out
b/contrib/pax_storage/src/test/regress/expected/json_encoding.out
index f343f74fe18..fa41b401030 100644
--- a/contrib/pax_storage/src/test/regress/expected/json_encoding.out
+++ b/contrib/pax_storage/src/test/regress/expected/json_encoding.out
@@ -56,19 +56,19 @@ select json '{ "a": "\ud83d\ude04\ud83d\udc36" }' -> 'a'
as correct_in_utf8;
select json '{ "a": "\ud83d\ud83d" }' -> 'a'; -- 2 high surrogates in a row
ERROR: invalid input syntax for type json
DETAIL: Unicode high surrogate must not follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ud83d\ud83d...
select json '{ "a": "\ude04\ud83d" }' -> 'a'; -- surrogates in wrong order
ERROR: invalid input syntax for type json
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ude04...
select json '{ "a": "\ud83dX" }' -> 'a'; -- orphan high surrogate
ERROR: invalid input syntax for type json
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ud83dX...
select json '{ "a": "\ude04X" }' -> 'a'; -- orphan low surrogate
ERROR: invalid input syntax for type json
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ude04...
--handling of simple unicode escapes
select json '{ "a": "the Copyright \u00a9 sign" }' as correct_in_utf8;
correct_in_utf8
@@ -121,7 +121,7 @@ select json '{ "a": "dollar \\u0024 character" }' ->> 'a'
as not_an_escape;
select json '{ "a": "null \u0000 escape" }' ->> 'a' as fails;
ERROR: unsupported Unicode escape sequence
DETAIL: \u0000 cannot be converted to text.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "null \u0000...
select json '{ "a": "null \\u0000 escape" }' ->> 'a' as not_an_escape;
not_an_escape
--------------------
@@ -159,7 +159,7 @@ ERROR: unsupported Unicode escape sequence
LINE 1: SELECT '"\u0000"'::jsonb;
^
DETAIL: \u0000 cannot be converted to text.
-CONTEXT: JSON data, line 1: ...
+CONTEXT: JSON data, line 1: "\u0000...
-- use octet_length here so we don't get an odd unicode char in the
-- output
SELECT octet_length('"\uaBcD"'::jsonb::text); -- OK, uppercase and lower case
both OK
@@ -180,25 +180,25 @@ ERROR: invalid input syntax for type json
LINE 1: SELECT jsonb '{ "a": "\ud83d\ud83d" }' -> 'a';
^
DETAIL: Unicode high surrogate must not follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ud83d\ud83d...
SELECT jsonb '{ "a": "\ude04\ud83d" }' -> 'a'; -- surrogates in wrong order
ERROR: invalid input syntax for type json
LINE 1: SELECT jsonb '{ "a": "\ude04\ud83d" }' -> 'a';
^
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ude04...
SELECT jsonb '{ "a": "\ud83dX" }' -> 'a'; -- orphan high surrogate
ERROR: invalid input syntax for type json
LINE 1: SELECT jsonb '{ "a": "\ud83dX" }' -> 'a';
^
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ud83dX...
SELECT jsonb '{ "a": "\ude04X" }' -> 'a'; -- orphan low surrogate
ERROR: invalid input syntax for type json
LINE 1: SELECT jsonb '{ "a": "\ude04X" }' -> 'a';
^
DETAIL: Unicode low surrogate must follow a high surrogate.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "\ude04...
-- handling of simple unicode escapes
SELECT jsonb '{ "a": "the Copyright \u00a9 sign" }' as correct_in_utf8;
correct_in_utf8
@@ -223,7 +223,7 @@ ERROR: unsupported Unicode escape sequence
LINE 1: SELECT jsonb '{ "a": "null \u0000 escape" }' as fails;
^
DETAIL: \u0000 cannot be converted to text.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "null \u0000...
SELECT jsonb '{ "a": "null \\u0000 escape" }' as not_an_escape;
not_an_escape
------------------------------
@@ -253,7 +253,7 @@ ERROR: unsupported Unicode escape sequence
LINE 1: SELECT jsonb '{ "a": "null \u0000 escape" }' ->> 'a' as fai...
^
DETAIL: \u0000 cannot be converted to text.
-CONTEXT: JSON data, line 1: { "a":...
+CONTEXT: JSON data, line 1: { "a": "null \u0000...
SELECT jsonb '{ "a": "null \\u0000 escape" }' ->> 'a' as not_an_escape;
not_an_escape
--------------------
diff --git a/contrib/pax_storage/src/test/regress/expected/jsonpath.out
b/contrib/pax_storage/src/test/regress/expected/jsonpath.out
index 6dab98d03a9..ccb32d543f9 100644
--- a/contrib/pax_storage/src/test/regress/expected/jsonpath.out
+++ b/contrib/pax_storage/src/test/regress/expected/jsonpath.out
@@ -354,21 +354,19 @@ select 'null.type()'::jsonpath;
(1 row)
select '1.type()'::jsonpath;
- jsonpath
-----------
- 1.type()
-(1 row)
-
+ERROR: trailing junk after numeric literal at or near "1.t" of jsonpath input
+LINE 1: select '1.type()'::jsonpath;
+ ^
select '(1).type()'::jsonpath;
- jsonpath
-----------
- 1.type()
+ jsonpath
+------------
+ (1).type()
(1 row)
select '1.2.type()'::jsonpath;
- jsonpath
-------------
- 1.2.type()
+ jsonpath
+--------------
+ (1.2).type()
(1 row)
select '"aaa".type()'::jsonpath;
@@ -479,7 +477,7 @@ select '$ ? (@ like_regex "pattern" flag "a")'::jsonpath;
ERROR: invalid input syntax for type jsonpath
LINE 1: select '$ ? (@ like_regex "pattern" flag "a")'::jsonpath;
^
-DETAIL: unrecognized flag character "a" in LIKE_REGEX predicate
+DETAIL: Unrecognized flag character "a" in LIKE_REGEX predicate.
select '$ < 1'::jsonpath;
jsonpath
----------
@@ -545,9 +543,9 @@ select '(($))'::jsonpath;
(1 row)
select '((($ + 1)).a + ((2)).b ? ((((@ > 1)) || (exists(@.c)))))'::jsonpath;
- jsonpath
--------------------------------------------------
- (($ + 1)."a" + 2."b"?(@ > 1 || exists (@."c")))
+ jsonpath
+---------------------------------------------------
+ (($ + 1)."a" + (2)."b"?(@ > 1 || exists (@."c")))
(1 row)
select '$ ? (@.a < 1)'::jsonpath;
@@ -569,17 +567,23 @@ select '$ ? (@.a < +1)'::jsonpath;
(1 row)
select '$ ? (@.a < .1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < .1)'::jsonpath;
- ^
+ jsonpath
+-----------------
+ $?(@."a" < 0.1)
+(1 row)
+
select '$ ? (@.a < -.1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < -.1)'::jsonpath;
- ^
+ jsonpath
+------------------
+ $?(@."a" < -0.1)
+(1 row)
+
select '$ ? (@.a < +.1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < +.1)'::jsonpath;
- ^
+ jsonpath
+-----------------
+ $?(@."a" < 0.1)
+(1 row)
+
select '$ ? (@.a < 0.1)'::jsonpath;
jsonpath
-----------------
@@ -635,17 +639,23 @@ select '$ ? (@.a < +1e1)'::jsonpath;
(1 row)
select '$ ? (@.a < .1e1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < .1e1)'::jsonpath;
- ^
+ jsonpath
+---------------
+ $?(@."a" < 1)
+(1 row)
+
select '$ ? (@.a < -.1e1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < -.1e1)'::jsonpath;
- ^
+ jsonpath
+----------------
+ $?(@."a" < -1)
+(1 row)
+
select '$ ? (@.a < +.1e1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < +.1e1)'::jsonpath;
- ^
+ jsonpath
+---------------
+ $?(@."a" < 1)
+(1 row)
+
select '$ ? (@.a < 0.1e1)'::jsonpath;
jsonpath
---------------
@@ -701,17 +711,23 @@ select '$ ? (@.a < +1e-1)'::jsonpath;
(1 row)
select '$ ? (@.a < .1e-1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < .1e-1)'::jsonpath;
- ^
+ jsonpath
+------------------
+ $?(@."a" < 0.01)
+(1 row)
+
select '$ ? (@.a < -.1e-1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < -.1e-1)'::jsonpath;
- ^
+ jsonpath
+-------------------
+ $?(@."a" < -0.01)
+(1 row)
+
select '$ ? (@.a < +.1e-1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < +.1e-1)'::jsonpath;
- ^
+ jsonpath
+------------------
+ $?(@."a" < 0.01)
+(1 row)
+
select '$ ? (@.a < 0.1e-1)'::jsonpath;
jsonpath
------------------
@@ -767,17 +783,23 @@ select '$ ? (@.a < +1e+1)'::jsonpath;
(1 row)
select '$ ? (@.a < .1e+1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < .1e+1)'::jsonpath;
- ^
+ jsonpath
+---------------
+ $?(@."a" < 1)
+(1 row)
+
select '$ ? (@.a < -.1e+1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < -.1e+1)'::jsonpath;
- ^
+ jsonpath
+----------------
+ $?(@."a" < -1)
+(1 row)
+
select '$ ? (@.a < +.1e+1)'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '$ ? (@.a < +.1e+1)'::jsonpath;
- ^
+ jsonpath
+---------------
+ $?(@."a" < 1)
+(1 row)
+
select '$ ? (@.a < 0.1e+1)'::jsonpath;
jsonpath
---------------
@@ -821,7 +843,7 @@ select '0'::jsonpath;
(1 row)
select '00'::jsonpath;
-ERROR: syntax error at end of jsonpath input
+ERROR: trailing junk after numeric literal at or near "00" of jsonpath input
LINE 1: select '00'::jsonpath;
^
select '0.0'::jsonpath;
@@ -879,29 +901,27 @@ select '0.0010e+2'::jsonpath;
(1 row)
select '1e'::jsonpath;
-ERROR: invalid floating point number at or near "1e" of jsonpath input
+ERROR: trailing junk after numeric literal at or near "1e" of jsonpath input
LINE 1: select '1e'::jsonpath;
^
select '1.e'::jsonpath;
- jsonpath
-----------
- 1."e"
-(1 row)
-
+ERROR: trailing junk after numeric literal at or near "1.e" of jsonpath input
+LINE 1: select '1.e'::jsonpath;
+ ^
select '1.2e'::jsonpath;
-ERROR: invalid floating point number at or near "1.2e" of jsonpath input
+ERROR: trailing junk after numeric literal at or near "1.2e" of jsonpath input
LINE 1: select '1.2e'::jsonpath;
^
select '1.2.e'::jsonpath;
- jsonpath
-----------
- 1.2."e"
+ jsonpath
+-----------
+ (1.2)."e"
(1 row)
select '(1.2).e'::jsonpath;
- jsonpath
-----------
- 1.2."e"
+ jsonpath
+-----------
+ (1.2)."e"
(1 row)
select '1e3'::jsonpath;
@@ -913,19 +933,19 @@ select '1e3'::jsonpath;
select '1.e3'::jsonpath;
jsonpath
----------
- 1."e3"
+ 1000
(1 row)
select '1.e3.e'::jsonpath;
jsonpath
------------
- 1."e3"."e"
+ (1000)."e"
(1 row)
select '1.e3.e4'::jsonpath;
jsonpath
-------------
- 1."e3"."e4"
+ (1000)."e4"
(1 row)
select '1.2e3'::jsonpath;
@@ -935,30 +955,38 @@ select '1.2e3'::jsonpath;
(1 row)
select '1.2.e3'::jsonpath;
- jsonpath
-----------
- 1.2."e3"
+ jsonpath
+------------
+ (1.2)."e3"
(1 row)
select '(1.2).e3'::jsonpath;
+ jsonpath
+------------
+ (1.2)."e3"
+(1 row)
+
+select '1..e'::jsonpath;
jsonpath
----------
- 1.2."e3"
+ (1)."e"
(1 row)
-select '1..e'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '1..e'::jsonpath;
- ^
select '1..e3'::jsonpath;
-ERROR: syntax error at or near "." of jsonpath input
-LINE 1: select '1..e3'::jsonpath;
- ^
+ jsonpath
+----------
+ (1)."e3"
+(1 row)
+
select '(1.).e'::jsonpath;
-ERROR: syntax error at or near ")" of jsonpath input
-LINE 1: select '(1.).e'::jsonpath;
- ^
+ jsonpath
+----------
+ (1)."e"
+(1 row)
+
select '(1.).e3'::jsonpath;
-ERROR: syntax error at or near ")" of jsonpath input
-LINE 1: select '(1.).e3'::jsonpath;
- ^
+ jsonpath
+----------
+ (1)."e3"
+(1 row)
+
diff --git
a/contrib/pax_storage/src/test/regress/expected/jsonpath_encoding.out
b/contrib/pax_storage/src/test/regress/expected/jsonpath_encoding.out
index 7cbfb6abcf3..d53affe364f 100644
--- a/contrib/pax_storage/src/test/regress/expected/jsonpath_encoding.out
+++ b/contrib/pax_storage/src/test/regress/expected/jsonpath_encoding.out
@@ -17,15 +17,15 @@ SELECT getdatabaseencoding(); -- just to label
the results files
-- checks for double-quoted values
-- basic unicode input
SELECT '"\u"'::jsonpath; -- ERROR, incomplete escape
-ERROR: invalid unicode sequence at or near "\u" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u" of jsonpath input
LINE 1: SELECT '"\u"'::jsonpath;
^
SELECT '"\u00"'::jsonpath; -- ERROR, incomplete escape
-ERROR: invalid unicode sequence at or near "\u00" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u00" of jsonpath input
LINE 1: SELECT '"\u00"'::jsonpath;
^
SELECT '"\u000g"'::jsonpath; -- ERROR, g is not a hex digit
-ERROR: invalid unicode sequence at or near "\u000" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u000" of jsonpath input
LINE 1: SELECT '"\u000g"'::jsonpath;
^
SELECT '"\u0000"'::jsonpath; -- OK, legal escape
@@ -99,15 +99,15 @@ select '"null \\u0000 escape"'::jsonpath as not_an_escape;
-- checks for quoted key names
-- basic unicode input
SELECT '$."\u"'::jsonpath; -- ERROR, incomplete escape
-ERROR: invalid unicode sequence at or near "\u" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u" of jsonpath input
LINE 1: SELECT '$."\u"'::jsonpath;
^
SELECT '$."\u00"'::jsonpath; -- ERROR, incomplete escape
-ERROR: invalid unicode sequence at or near "\u00" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u00" of jsonpath input
LINE 1: SELECT '$."\u00"'::jsonpath;
^
SELECT '$."\u000g"'::jsonpath; -- ERROR, g is not a hex digit
-ERROR: invalid unicode sequence at or near "\u000" of jsonpath input
+ERROR: invalid Unicode escape sequence at or near "\u000" of jsonpath input
LINE 1: SELECT '$."\u000g"'::jsonpath;
^
SELECT '$."\u0000"'::jsonpath; -- OK, legal escape
diff --git a/contrib/pax_storage/src/test/regress/expected/privileges.out
b/contrib/pax_storage/src/test/regress/expected/privileges.out
index 60f54cec2c8..1c4624db9b4 100644
--- a/contrib/pax_storage/src/test/regress/expected/privileges.out
+++ b/contrib/pax_storage/src/test/regress/expected/privileges.out
@@ -55,6 +55,7 @@ ALTER FUNCTION leak(integer,integer) OWNER TO
regress_priv_user1;
-- test owner privileges
GRANT regress_priv_role TO regress_priv_user1 WITH ADMIN OPTION GRANTED BY
CURRENT_ROLE;
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY
foo; -- error
+ERROR: role "foo" does not exist
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY
regress_priv_user2; -- error
REVOKE ADMIN OPTION FOR regress_priv_role FROM regress_priv_user1 GRANTED BY
CURRENT_USER;
REVOKE regress_priv_role FROM regress_priv_user1 GRANTED BY CURRENT_ROLE;
@@ -446,7 +447,6 @@ RESET SESSION AUTHORIZATION;
ALTER ROLE regress_priv_user1 NOINHERIT;
SET SESSION AUTHORIZATION regress_priv_user1;
DELETE FROM atest3;
-ERROR: permission denied for table atest3
ROLLBACK;
-- views
SET SESSION AUTHORIZATION regress_priv_user3;
@@ -1620,12 +1620,14 @@ CREATE FUNCTION dogrant_ok() RETURNS void LANGUAGE sql
SECURITY DEFINER AS
GRANT regress_priv_group2 TO regress_priv_user5; -- ok: had ADMIN OPTION
SET ROLE regress_priv_group2;
GRANT regress_priv_group2 TO regress_priv_user5; -- fails: SET ROLE suspended
privilege
-ERROR: must have admin option on role "regress_priv_group2"
+ERROR: permission denied to grant role "regress_priv_group2"
+DETAIL: Only roles with the ADMIN option on role "regress_priv_group2" may
grant this role.
SET SESSION AUTHORIZATION regress_priv_user1;
GRANT regress_priv_group2 TO regress_priv_user5; -- fails: no ADMIN OPTION
-ERROR: must have admin option on role "regress_priv_group2"
+ERROR: permission denied to grant role "regress_priv_group2"
+DETAIL: Only roles with the ADMIN option on role "regress_priv_group2" may
grant this role.
SELECT dogrant_ok(); -- ok: SECURITY DEFINER conveys ADMIN
-NOTICE: role "regress_priv_user5" is already a member of role
"regress_priv_group2"
+NOTICE: role "regress_priv_user5" has already been granted membership in role
"regress_priv_group2" by role "regress_priv_user4"
dogrant_ok
------------
@@ -1633,14 +1635,17 @@ NOTICE: role "regress_priv_user5" is already a member
of role "regress_priv_gro
SET ROLE regress_priv_group2;
GRANT regress_priv_group2 TO regress_priv_user5; -- fails: SET ROLE did not
help
-ERROR: must have admin option on role "regress_priv_group2"
+ERROR: permission denied to grant role "regress_priv_group2"
+DETAIL: Only roles with the ADMIN option on role "regress_priv_group2" may
grant this role.
SET SESSION AUTHORIZATION regress_priv_group2;
GRANT regress_priv_group2 TO regress_priv_user5; -- ok: a role can self-admin
-NOTICE: role "regress_priv_user5" is already a member of role
"regress_priv_group2"
+ERROR: permission denied to grant role "regress_priv_group2"
+DETAIL: Only roles with the ADMIN option on role "regress_priv_group2" may
grant this role.
CREATE FUNCTION dogrant_fails() RETURNS void LANGUAGE sql SECURITY DEFINER AS
'GRANT regress_priv_group2 TO regress_priv_user5';
SELECT dogrant_fails(); -- fails: no self-admin in
SECURITY DEFINER
-ERROR: must have admin option on role "regress_priv_group2"
+ERROR: permission denied to grant role "regress_priv_group2"
+DETAIL: Only roles with the ADMIN option on role "regress_priv_group2" may
grant this role.
CONTEXT: SQL function "dogrant_fails" statement 1
DROP FUNCTION dogrant_fails();
SET SESSION AUTHORIZATION regress_priv_user4;
@@ -1892,7 +1897,7 @@ ERROR: permission denied for table pg_largeobject
-- test pg_database_owner
RESET SESSION AUTHORIZATION;
GRANT pg_database_owner TO regress_priv_user1;
-ERROR: role "pg_database_owner" cannot have explicit members
+ERROR: role "pg_database_owner" cannot have explicit members (user.c:3722)
GRANT regress_priv_user1 TO pg_database_owner;
ERROR: role "pg_database_owner" cannot be a member of any role
CREATE TABLE datdba_only ();
@@ -2698,7 +2703,6 @@ LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should
pass
COMMIT;
BEGIN;
LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail
-ERROR: permission denied for table lock_table
ROLLBACK;
BEGIN;
LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should fail
@@ -2714,7 +2718,6 @@ LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should
pass
COMMIT;
BEGIN;
LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail
-ERROR: permission denied for table lock_table
ROLLBACK;
BEGIN;
LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass
@@ -2729,7 +2732,6 @@ LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should
pass
COMMIT;
BEGIN;
LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail
-ERROR: permission denied for table lock_table
ROLLBACK;
BEGIN;
LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass
@@ -2744,7 +2746,6 @@ LOCK TABLE lock_table IN ROW EXCLUSIVE MODE; -- should
pass
COMMIT;
BEGIN;
LOCK TABLE lock_table IN ACCESS SHARE MODE; -- should fail
-ERROR: permission denied for table lock_table
ROLLBACK;
BEGIN;
LOCK TABLE lock_table IN ACCESS EXCLUSIVE MODE; -- should pass
diff --git a/contrib/pax_storage/src/test/regress/expected/rangefuncs.out
b/contrib/pax_storage/src/test/regress/expected/rangefuncs.out
index 92c4b79de44..28d21bfee63 100644
--- a/contrib/pax_storage/src/test/regress/expected/rangefuncs.out
+++ b/contrib/pax_storage/src/test/regress/expected/rangefuncs.out
@@ -2177,13 +2177,22 @@ select * from usersview;
begin;
alter table users drop column moredrop;
+ERROR: cannot drop column moredrop of table users because other objects
depend on it
+DETAIL: view usersview depends on column moredrop of table users
+HINT: Use DROP ... CASCADE to drop the dependent objects too.
select * from usersview; -- expect clean failure
-ERROR: attribute 5 of type record has been dropped
+ERROR: current transaction is aborted, commands ignored until end of
transaction block
rollback;
alter table users alter column seq type numeric;
+ERROR: cannot alter type of a column used by a view or rule
+DETAIL: rule _RETURN on view usersview depends on column "seq"
select * from usersview; -- expect clean failure
-ERROR: attribute 2 of type record has wrong type
-DETAIL: Table has type numeric, but query expects integer.
+ userid | seq | email | moredrop | enabled | generate_series | ordinality
+--------+-----+--------+----------+---------+-----------------+------------
+ id | 1 | email | 11 | t | 10 | 1
+ id2 | 2 | email2 | 12 | t | 11 | 2
+(2 rows)
+
drop view usersview;
drop function get_first_user();
drop function get_users();
diff --git a/contrib/pax_storage/src/test/regress/expected/xml.out
b/contrib/pax_storage/src/test/regress/expected/xml.out
index 01292cd2e43..c6cf21a750d 100644
--- a/contrib/pax_storage/src/test/regress/expected/xml.out
+++ b/contrib/pax_storage/src/test/regress/expected/xml.out
@@ -223,17 +223,11 @@ ERROR: invalid XML content
DETAIL: line 1: xmlParseEntityRef: no name
<invalidentity>&</invalidentity>
^
-line 1: chunk is not well balanced
-<invalidentity>&</invalidentity>
- ^
SELECT xmlparse(content '<undefinedentity>&idontexist;</undefinedentity>');
ERROR: invalid XML content
DETAIL: line 1: Entity 'idontexist' not defined
<undefinedentity>&idontexist;</undefinedentity>
^
-line 1: chunk is not well balanced
-<undefinedentity>&idontexist;</undefinedentity>
- ^
SELECT xmlparse(content '<invalidns xmlns=''<''/>');
xmlparse
---------------------------
@@ -252,9 +246,6 @@ DETAIL: line 1: Entity 'idontexist' not defined
<twoerrors>&idontexist;</unbalanced>
^
line 1: Opening and ending tag mismatch: twoerrors line 1 and unbalanced
-<twoerrors>&idontexist;</unbalanced>
- ^
-line 1: chunk is not well balanced
<twoerrors>&idontexist;</unbalanced>
^
SELECT xmlparse(content '<nosuchprefix:tag/>');
@@ -603,18 +594,18 @@ CREATE VIEW xmlview8 AS SELECT xmlserialize(content
'good' as char(10));
CREATE VIEW xmlview9 AS SELECT xmlserialize(content 'good' as text);
SELECT table_name, view_definition FROM information_schema.views
WHERE table_name LIKE 'xmlview%' ORDER BY 1;
- table_name | view_definition
-------------+-------------------------------------------------------------------------------------------------------------------
+ table_name | view_definition
+------------+------------------------------------------------------------------------------------------------------------
xmlview1 | SELECT xmlcomment('test'::text) AS xmlcomment;
xmlview2 | SELECT XMLCONCAT('hello'::xml, 'you'::xml) AS "xmlconcat";
xmlview3 | SELECT XMLELEMENT(NAME element, XMLATTRIBUTES(1 AS ":one:",
'deuce' AS two), 'content&') AS "xmlelement";
- xmlview4 | SELECT XMLELEMENT(NAME employee, XMLFOREST(emp.name AS name,
emp.age AS age, emp.salary AS pay)) AS "xmlelement"+
+ xmlview4 | SELECT XMLELEMENT(NAME employee, XMLFOREST(name AS name, age AS
age, salary AS pay)) AS "xmlelement" +
| FROM emp;
xmlview5 | SELECT XMLPARSE(CONTENT '<abc>x</abc>'::text STRIP WHITESPACE)
AS "xmlparse";
xmlview6 | SELECT XMLPI(NAME foo, 'bar'::text) AS "xmlpi";
xmlview7 | SELECT XMLROOT('<foo/>'::xml, VERSION NO VALUE, STANDALONE YES)
AS "xmlroot";
- xmlview8 | SELECT (XMLSERIALIZE(CONTENT 'good'::xml AS
character(10)))::character(10) AS "xmlserialize";
- xmlview9 | SELECT XMLSERIALIZE(CONTENT 'good'::xml AS text) AS
"xmlserialize";
+ xmlview8 | SELECT (XMLSERIALIZE(CONTENT 'good'::xml AS character(10) NO
INDENT))::character(10) AS "xmlserialize";
+ xmlview9 | SELECT XMLSERIALIZE(CONTENT 'good'::xml AS text NO INDENT) AS
"xmlserialize";
(9 rows)
-- Text XPath expressions evaluation
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]