On Tue, Aug 26, 2025 at 4:05 PM Dmitry Koval wrote:
>
> Hi!
> Thanks for the notes and patches!
>
hi.
ORDER BY regclass seems not stable, see
https://git.postgresql.org/cgit/postgresql.git/commit/?id=17bcf4f5450430f67b744c225566c9e0e6413e95
some of the SQL tests seem not necessary, so I refactore
d be fine.
please check the attached POC, regress tests also added.
main idea is
first check CreateStatsStmt->relations,
then call transformStatsStmt, transformStatsStmt only to transform
CreateStatsStmt->exprs.
also the above complaint about the relation lock issue will be resolved.
From 049
column
values as 0, isnull as true).
what do you think?
From cc458eec71fd100ea420629ae9d84d9e80bbdd88 Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 28 Aug 2025 11:53:46 +0800
Subject: [PATCH v1 1/1] ALTER COLUMN SET EXPRESSION [GENERATED|STORED]
example syntax explanation:
ALTER TABLE gtest29
On Mon, Aug 25, 2025 at 9:04 PM Kirill Reshke wrote:
>
> Hi!
>
> On Sun, 24 Aug 2025 at 14:05, jian he wrote:
> >
> > hi.
> >
> > --this ALTER COLUMN DROP EXPRESSION work as expected
> > DROP TABLE IF EXISTS parent cascade;
> > CREATE TABLE pare
On Tue, Aug 26, 2025 at 7:43 PM Fujii Masao wrote:
>
> >
> > summary of attached patch:
>
> Thanks for the patches!
>
> > 01: make pg_restore not restore comments if comments associated
> > objects are excluded.
>
> > TODO: need perl tests
>
> How about adding tests for pg_restore --no-policies in
On Tue, Aug 26, 2025 at 11:53 AM Alexandra Wang
wrote:
>
> Hi Jian,
>
> I’ve attached v14, which includes only indentation and comment changes
> from v13.
>
hi.
still reviewing v14-0001 to v14-0005.
I am confused by the comments in jsonb_subscript_transform
""
* (b) jsonb_subscript_make_jso
n encoding,
if fail, error message may different on different machines, So we have to put
some of the tests to collate.icu.utf8.sql.
Please check the latest attached.
v7-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-SCHEMA.patch
v7-0002-CREATE-SCHEMA-CREATE-DOMAIN.patch
v7-0003-CREATE-SCHEMA
On Thu, Jul 10, 2025 at 2:00 AM jian he wrote:
>
> we can add a new boolean field, coerce_to_domain, to NewColumnValue. this
> field
> is set to true only when changing an existing column's type to a constrained
> domain. In such cases, a table scan is enough—no tab
On Mon, Aug 25, 2025 at 3:52 PM Nishant Sharma
wrote:
>
>
> Experiment 1:-
> SQL File : PG_Exp_1.sql
>
> Actual Output : PG_Exp_1.out
>
> Created COLLATION : CREATE COLLATION test_coll (
> provider = icu, locale = 'ja-u-kr-latn-digit');
>
> Experiment 2:-
> SQL File : PG_Exp_2.sql
>
> Actual Outpu
On Sat, Aug 23, 2025 at 3:34 AM Alexandra Wang
wrote:
>
> I don’t understand the question. In the case of an unsupported Node
> type (not an Indices in patch 0001 or 0002), we break out of the loop
> to stop transforming the remaining subscripts. So there won’t be any
> ‘not contiguous’ indirectio
On Mon, Aug 25, 2025 at 11:58 AM Chao Li wrote:
>
> I tested this patch with “partition by range”, it works for me.
>
> Just have a few small comments:
>
> + if (bms_is_member(0 -
> FirstLowInvalidHeapAttributeNumber, expr_attrs))
>
> Can we simply check “if (Var *)expr->var
On Tue, May 6, 2025 at 6:49 PM Yura Sokolov wrote:
>
> 06.05.2025 13:31, jian he пишет:
> > On Tue, May 6, 2025 at 5:57 PM Yura Sokolov
> > wrote:
> >>
> >> 21.04.2025 05:30, jian he пишет:
> >>> hi.
> >>> While trying to make the
On Tue, Apr 22, 2025 at 7:39 PM jian he wrote:
>
> demo:
> drop table if exists t4;
> CREATE TABLE t4(f1 int, f2 bigint) PARTITION BY list ((t4));
> create table t4_1 partition of t4 for values in ((1,2));
> alter table t4 alter column f2 set data type text using f2;
>
>
ALTER COLUMN SET EXPRESSION,
so I added a test on it.
From 55fed544cab5addb108d61f43fe6d2286fcb6f40 Mon Sep 17 00:00:00 2001
From: jian he
Date: Sun, 24 Aug 2025 22:51:30 +0800
Subject: [PATCH v1 1/1] refactor test_ddl_deparse/sql/alter_table.sql
1. The test initially focuses on the "parent&
generated error:
ERROR: 0A000: ALTER TABLE / DROP EXPRESSION must be applied to child tables too
LOCATION: ATPrepDropExpression, tablecmds.c:8734
The attached patch fixes this potential issue.
From 78f2d0734d492296289671cc0b740329d1f2da30 Mon Sep 17 00:00:00 2001
From: jian he
Date: Sun, 24 Aug
hi.
I just found this
https://www.postgresql.org/message-id/flat/CALAY4q8o00Sg5nemi2AuqNuLvmGLaR6br%2BYrvM41ZuSPjM2Qvg%40mail.gmail.com
maybe it's not that very helpful.
IMV,
pg_dump --option="view_name"
is better than
pg_dump -d cary --where="test1:a3 = ( select max(aa1) from test2 )" > testdump
hi.
will
+ if (!IsA(rln, RangeVar))
+ ereport(ERROR,
+ errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("CREATE STATISTICS only
supports regular tables, materialized views, foreign table
On Thu, Aug 21, 2025 at 12:54 PM Alexandra Wang
wrote:
>
> Hi Jian,
>
> Thanks for reviewing! I’ve attached v13, which addresses your
> feedback.
>
hi.
in the context of v13-0001 and v13-0002.
In transformIndirection:
while (subscripts)
{
Node *newresult = (Node *) =
transformContainer
On Thu, Aug 21, 2025 at 2:45 PM jian he wrote:
>
> On Thu, Aug 21, 2025 at 10:53 AM jian he wrote:
> >
> > > this time, I only checked
> > > v52-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch
hi.
+static void
+check_two_partitions_bounds_range(Relati
hi.
while reviewing other work, some error messages in src/backend/tcop/utility.c
seem not accurate.
static void
ProcessUtilitySlow(ParseState *pstate,
PlannedStmt *pstmt,
const char *queryString,
ProcessUtilityContext context,
On Thu, Aug 21, 2025 at 10:53 AM jian he wrote:
>
> > this time, I only checked
> > v52-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch
> >
hi.
we may need to change checkPartition.
+-- ERROR: "sales_apr2022" is not a table
+ALTER TABLE sales_range
On Wed, Aug 20, 2025 at 5:22 PM jian he wrote:
>
> this time, I only checked
> v52-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch
>
> typedef struct PartitionCmd
> {
> NodeTagtype;
> RangeVar *name;/* name of partitio
hi.
this time, I only checked
v52-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch
typedef struct PartitionCmd
{
NodeTagtype;
RangeVar *name;/* name of partition to attach/detach/merge */
PartitionBoundSpec *bound;/* FOR VALUES, if attaching */
On Tue, Aug 19, 2025 at 10:08 PM jian he wrote:
>
> drop table if exists dt1;
> drop domain if exists d1;
> create domain d1 as int;
> create table dt1(i int, c d1);
> insert into dt1 values(1,2);
> alter domain d1 add constraint cc check(value <> 2) not valid;
&g
hi.
should UPDATE statement need to verify that the domain value is satisfied with
invalid domain constraints?
Álvaro Herrera already mentioned this in [1], but I just want to confirm it.
drop table if exists dt1;
drop domain if exists d1;
create domain d1 as int;
create table dt1(i int, c d1);
i
N.patch
v6-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-SCHEMA.patch
is refactor/rebase based on
v1-0001-Don-t-try-to-re-order-the-subcommands-of-CREATE-S.patch
v6-0002-CREATE-SCHEMA-CREATE-DOMAIN.patch
for CREATE SCHEMA ... CREATE-DOMAIN
v6-0003-CREATE-SCHEMA-CREATE-COLLATION.patch
for C
On Thu, Aug 14, 2025 at 5:02 PM Kirill Reshke wrote:
>
> I have few observations.
> One is whether we should now support CREATE DOMAIN ... NOT NULL NOT
> VALID syntax? This could be a separate patch though.
>
in gram.y:
CreateDomainStmt:
CREATE DOMAIN_P any_name opt_as Typename ColQu
hi.
maybe we should start working on this?
https://www.postgresql.org/developer/roadmap
says 18 will be released in September 2025.
On Sat, Aug 16, 2025 at 12:57 AM Tom Lane wrote:
>
> I think you're missing the point: per the commit message for 0001,
>
> The real reason for doing it is to provide a mechanism whereby
> pushJsonbValue() can be told to construct the JsonbValue tree
> in a context that is not CurrentM
On Thu, Aug 14, 2025 at 4:59 PM jian he wrote:
>
> > 0001 is a somewhat invasive refactoring of the API for
> > pushJsonbValue and friends.
in pushJsonbValue:
/*
* pushJsonbValueScalar handles all cases not involving pushing a
* container object as an ELEM or VALUE.
On Wed, Jul 23, 2025 at 12:37 AM Tom Lane wrote:
>
> There have been some complaints recently about how jsonb_agg()
> is a lot slower than json_agg() [1]. That's annoying considering
> that the whole selling point of JSONB is to have faster processing
> than the original JSON type, so I poked int
hi.
rebase and minor cosmetic change.
From b87caa1b2f78d3f1e94e1055219c97e038d2fe61 Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 14 Aug 2025 10:40:49 +0800
Subject: [PATCH v3 1/1] ALTER DOMAIN ADD NOT NULL NOT VALID
We have NOT NULL NO VALID for table constraints, we can make domain have
aving_table);
>
but where "error_saving_table_type" TYPE/TABLE will come from?
"error_saving_table_type" either comes from built-in or makes it user defined.
Preserving it as a built-in type would require broader consensus,
which is likely difficult to achieve.
user-define
m/CACJufxF4OW=x2rcwa+zmcgopdwgkdxha09qtftpcj3qstg6...@mail.gmail.com
From ef719a5fcf2e96d7fc756a021aebd8caf5b0b385 Mon Sep 17 00:00:00 2001
From: jian he
Date: Tue, 12 Aug 2025 14:23:02 +0800
Subject: [PATCH v4 1/1] CAST(val AS type FORMAT 'template')
MIME-Version: 1.0
Content-Type: text/plain;
so here you don't need to consider RELKIND_PARTITIONED_TABLE.
From a54609c8aa66174e171fdfd7c08519e587561d85 Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon, 11 Aug 2025 17:51:56 +0800
Subject: [PATCH v3 1/1] alter check constraint enforceability
syntax: ALTER TABLE ALTER CONSTRAINT [NOT] ENFOR
e9104bcc0a6c4ca96df5ff3fdd3ae659885dd664 Mon Sep 17 00:00:00 2001
From: jian he
Date: Wed, 30 Jul 2025 19:50:41 +0800
Subject: [PATCH v18 3/3] Add option force_array for COPY JSON FORMAT
force_array option can only be used in COPY TO with JSON format. it make the
output json output behave like json array type
On Mon, Aug 4, 2025 at 1:09 PM Corey Huinker wrote:
>>
>> so we need to handle numeric source types with fractional points with
>> special care.
>> currently, this applies only to numeric, float4, and float8.
>> (hope this is all the corner case we need to catch...)
>
>
> I'm fairly certain that t
hi.
one more question:
For binary coercible type casts, no formatted related function for it,
should we error out?
For example, should the following error out or return text '1'.
select cast('1'::text as text format ''::text);
hi.
fix the regress tests failure in
https://api.cirrus-ci.com/v1/artifact/task/5894868779663360/testrun/build/testrun/regress/regress/regression.diffs
From e60e5190511326568eba8e6748062adb47f1134c Mon Sep 17 00:00:00 2001
From: jian he
Date: Fri, 18 Jul 2025 13:00:19 +0800
Subject: [PATCH v4 2
On Tue, Jul 29, 2025 at 11:54 AM David G. Johnston
wrote:
>
> The slight variation to this would be to specify these 2/4 and 1-arg
> functions as optional “format_in” and “format_out” optional properties (like
> typmod_in). The format-aware code can look for these which will end up
> having th
because it will call
numeric_mul.
so I made these 16 function errors safe.
see v3-0001-make-some-numeric-cast-function-error-safe.patch
From 0fa2361b7d7692a9c032d8a8a7f2b04ab4302849 Mon Sep 17 00:00:00 2001
From: jian he
Date: Fri, 18 Jul 2025 13:00:19 +0800
Subject: [PATCH
hi.
rebase.
From b3b2d794c83b36cf129d917d527ebf2cac46ca3b Mon Sep 17 00:00:00 2001
From: jian he
Date: Wed, 30 Jul 2025 11:06:17 +0800
Subject: [PATCH v19 1/1] COPY (on_error set_null)
Current grammar makes us unable to use "on_error null". if we did it, then in
all the COPY command
On Mon, Jul 28, 2025 at 9:22 AM torikoshia wrote:
>
> I think the behavior for materialized views can be described along with
> that for partitioned tables. For example:
>
> COPY TO can be used with plain
> tables, populated materialized views and partitioned tables.
> For exampl
hi.
after run the v2 python script and ``git apply
v2-0001-update-filelist.sgml-allfiles.sgml.no-cfbot``
git status -u
shows:
Changes not staged for commit:
(use "git add/rm ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified
$ BEGIN RETURN '1';
END; $$ LANGUAGE plpgsql VOLATILE FORMAT;
this function "test" format text based on second argument(template)
and return json type.
POC attached.
what do you think?
From c944169304c3922c3cc76166ccd7a54cfcf595ba Mon Sep 17 00:00:00 2001
From: jian he
Date: Tue,
On Mon, Jul 28, 2025 at 2:31 AM Vik Fearing wrote:
>
>
> On 27/07/2025 17:43, jian he wrote:
> > hi.
> >
> > while working on CAST(... DEFAULT ON ERROR), I came across link[1]. I don't
> > have access to the SQL standard, but based on the information in
D'); --error
select cast('2018-13-12' as date format '-DD-MM'); --no error
select to_char(cast('2018-13-12' as date format '-DD-MM'), '-Mon-DD');
returns
2018-Dec-13
[1]:
https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard#Major
On Tue, Jul 22, 2025 at 8:26 PM Vik Fearing wrote:
>
>
> On 22/07/2025 12:19, jian he wrote:
> > On Tue, Jul 22, 2025 at 2:45 PM Vik Fearing
> > wrote:
> >> It was accepted into the standard after 2023 was released. I am the
> >> author of this change
ression or virtual generated column data type changes
will cause the index to rebuild.
Is this we want?
Or should changing the generation expression or data type of a virtual generated
column mark the associated index as invalid, without triggering a rebuild?
From bbc6f3bd7daf53fe97e72bf92a6f9e1f1d71e
7}'::text[] AS integer[] DEFAULT '{-1011}' ON
CONVERSION ERROR);
+ int4
+-
+ {-1011}
+(1 row)
I didn't implement the [ FORMAT ] part for now.
please check the attached regress test and tests expected result.
From 47c181eee593468c3d7b7cb57aec3a1ea8cb3c1d Mon Sep 17
On Thu, Jul 17, 2025 at 1:41 AM Dagfinn Ilmari Mannsåker
wrote:
>
> Hi hackers,
>
> These two patches are split out from my earlier thread about improving
> tab completion for varous RESET forms
> (https://postgr.es/m/87bjqwwtic@wibble.ilmari.org), so that the bug
> fixes can be tracked as an
hi.
src/backend/utils/misc/guc_tables.c:
static const struct config_enum_entry icu_validation_level_options[] = {
{"disabled", -1, false},
{"debug5", DEBUG5, false},
{"debug4", DEBUG4, false},
{"debug3", DEBUG3, false},
{"debug2", DEBUG2, false},
{"debug1", DEBUG1, false},
On Tue, Jul 22, 2025 at 2:45 PM Vik Fearing wrote:
>
> It was accepted into the standard after 2023 was released. I am the
> author of this change in the standard, so feel free to ask me anything
> you're unsure about.
>
is the generally syntax as mentioned in this thread:
CAST(source_expression
ml
[4]
https://peter.eisentraut.org/blog/2023/04/04/sql-2023-is-finished-here-is-whats-new
From 47c181eee593468c3d7b7cb57aec3a1ea8cb3c1d Mon Sep 17 00:00:00 2001
From: jian he
Date: Fri, 18 Jul 2025 13:00:19 +0800
Subject: [PATCH v1 1/2] make ArrayCoerceExpr error safe
similar to https://git.postgr
On Mon, Jul 14, 2025 at 7:39 PM jian he wrote:
>
> overall, raising an error if the collation of the
> JsonBehavior DEFAULT clause differs from that of the RETURNING clause
> is the best option.
>
> what do you think?
in exprSetCollation, the node can be T_CollateExpr.
In that
function argument name to function substr
v6-0002: add function argument name to function substring
v6-0002 incorporated some of the changes in v5-0002-v3-delta.patch.
some of the changes in v5-0002-v3-delta.patch are not related to this thread,
so I didn't incorporate them, right now.
F
On Fri, Jul 11, 2025 at 3:49 PM Dean Rasheed wrote:
>
> On Tue, 8 Jul 2025 at 15:26, Aleksander Alekseev
> wrote:
> >
> > The proposed function seems to do two things at a time - generating
> > random values and transforming them into an array of desired
> > dimensions. Generally we try to avoid
hi.
I found in some cases, we need to print COLLATE clauses for RelabelType Node.
CREATE TABLE ttsa (c1 text[]);
CREATE COLLATION case_sensitive (provider = icu, locale = '');
explain (verbose, cost off) SELECT count(*) FROM ttsa WHERE c1 =
(array[1,2]::int[]::text[]) collate case_sensitive;
On Fri, Jul 18, 2025 at 5:11 AM Álvaro Herrera wrote:
>
> Anyway, here's a patch.
>
one minor issue in getDomainConstraints:
for (int i = 0, j = 0; i < ntups; i++)
{
charcontype = (PQgetvalue(res, i, i_contype))[0];
constraint->contype = *(PQgetvalue(res, i,
hi.
ExecEvalJsonCoercionFinish duplicate line:
jsestate->escontext.error_occurred = false;
jsestate->escontext.error_occurred = false;
https://git.postgresql.org/cgit/postgresql.git/tree/src/backend/executor/execExprInterp.c#n5230
bug:
begin;
drop table if exists pks cascade;
create table pks(i int primary key, b int) partition by range (i);
create table pks_34 partition of pks for values from (3) to (6);
create table pks_d partition of pks default;
insert into pks values (0), (1), (3), (4), (5);
commit;
alter table pks_d a
On Tue, Jul 15, 2025 at 2:10 PM jian he wrote:
>
> accidently found another existing bug.
>
> create schema test;
> CREATE DOMAIN test.d1 AS integer NOT NULL default 11;
> alter domain test.d1 add constraint a2 check(value > 1) not valid;
> comment on CONSTRAINT a2 ON
On Tue, Jul 15, 2025 at 2:24 AM Álvaro Herrera wrote:
>
> On 2025-May-22, jian he wrote:
>
> > I actually found another bug.
> > create schema test;
> > CREATE DOMAIN test.d1 AS integer NOT NULL default 11;
> > pg_dump --schema=test > 1.sql
> >
is in
> scope here.
> It might be better handled in a follow-up patch focused on improving
> test coverage for such unsupported cases, if we decide that's
> worthwhile.
>
i guess it should be fine.
since we are only adding one somehow related test case.
+-- Test COPY TO with a forei
On Mon, Jul 14, 2025 at 10:02 PM Álvaro Herrera wrote:
>
> On 2025-Jul-02, jian he wrote:
>
> > @@ -673,11 +680,34 @@ BeginCopyTo(ParseState *pstate,
> >errmsg("cannot co
hi.
create domain d1 as text collate case_insensitive;
select json_value('{"a": "A"}', '$.a' returning d1 default 'C' on
empty) = 'a'; --return true
select json_value('{"a": "A"}', '$.c' returning d1 default 'A' on
empty) = 'a'; --return true
select json_value('{"a": "A"}', '$.c' returning d1 def
d1;
``SELECT 'A'::d1`` should error out as domain check constraint not satisfied?
If so, attached is the POC trying to implement it.
From 8d0b94976c5c1c0cf16f70f7d740ea4f37698340 Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon, 14 Jul 2025 16:14:32 +0800
Subject: [PATCH v1 1/1] C
hi.
index_create comments:
/*
* Btree text_pattern_ops uses text_eq as the equality operator, which is
* fine as long as the collation is deterministic; text_eq then reduces to
* bitwise equality and so it is semantically compatible with the other
* operators and functions
On Wed, Jun 25, 2025 at 5:28 AM Dmitry Koval wrote:
>
> Hi!
> Thanks for notes!
>
hi.
+static void
+transformPartitionCmdForMerge(CreateStmtContext *cxt, PartitionCmd *partcmd)
+{
+
+ /* Is current partition a DEFAULT partition? */
+ defaultPartOid =
get_default_oid_from_partdesc(RelationGetParti
On Thu, Jul 10, 2025 at 9:34 PM jian he wrote:
>
> --
> in jsonb_subscript_make_jsonpath we have
> foreach(lc, *indirection)
> {
> if (IsA(accessor, String))
>
> else if (IsA(accessor, A_
On Thu, Jul 10, 2025 at 4:53 PM jian he wrote:
>
> src7=# select ('{"a": 1, "b": "c", "d": [1, 2, 3]}'::jsonb).d['1'::int8];
> WARNING: mixed usage of jsonb simplified accessor syntax and jsonb
> subscripting.
On Wed, Jul 9, 2025 at 4:02 PM Alexandra Wang
wrote:
>
> Thanks again for the patch! It was really helpful! I didn't directly
> apply it as I made a few different choices, but I think I have
> addressed all the points you covered in it.
>
> Let me know your thoughts!
>
hi.
in v12-0001 and v12-00
On Tue, Jul 8, 2025 at 2:37 PM jian he wrote:
>
> On Tue, Apr 15, 2025 at 4:36 PM jian he wrote:
> >
> > comment out tests are for to be implemented feature.
> > There are some test changes that are indeed not necessary, I restored it
> > back,
> > please ch
is set to true only when changing an existing column's type to a constrained
domain. In such cases, a table scan is enough—no table rewrite is needed.
coerce_to_domain will set to false, if table rewrite is required.
From cad4a214c46dfd95fa2ee5c34e5804bd565bd4fb Mon Sep 17 00:00:00 2001
From:
On Mon, Jun 30, 2025 at 5:34 PM sundayjiang(蒋浩天)
wrote:
>
> The purpose of this patch is to prevent replacing a function via `CREATE OR
> REPLACE FUNCTION` with a new definition that is not marked as `IMMUTABLE`, if
> the existing function is referenced by an index expression.
>
> Replacing such
hi.
within ATRewriteTable we have:
pgstat_progress_update_param(PROGRESS_CLUSTER_TOTAL_HEAP_BLKS,
RelationGetNumberOfBlocks(oldrel));
pgstat_progress_update_param(PROGRESS_CLUSTER_TOTAL_HEAP_BLKS,
heapScan->rs_nblocks);
PROGRESS_CLUSTER_TOTAL_HE
On Sat, Jul 5, 2025 at 3:32 PM Vik Fearing wrote:
>
> On 30/06/2025 17:04, jian he wrote:
>
> reasons for adding array_random is:
> 1. This is better than array_fill. This can fill random and constant
> values (random, min and max the same).
> 2. Building a multi-dimensio
On Tue, Apr 15, 2025 at 4:36 PM jian he wrote:
>
> comment out tests are for to be implemented feature.
> There are some test changes that are indeed not necessary, I restored it back,
> please check attached.
hi.
refactor and rebase.
From d61f21e6fc410827d152a633e5699197c802870a M
hi.
rebased only.
From 3ff7dd0fd260a6b3a35f8652f0840ab96bc68c70 Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon, 7 Jul 2025 10:07:25 +0800
Subject: [PATCH v2 1/1] allow change generated expression while check
constraint on it
currently, if we have check constraints over virtual generated
On Mon, Jun 30, 2025 at 11:04 PM jian he wrote:
>
> demo:
> SELECT array_random(1, 6, array[2,5], array[2,4]);
> array_random
> --
> [2:3][4:8]={{6,2,2,5,4},{4,5,6,4,6}}
>
> reasons for adding array_random is:
> 1. Thi
On Mon, Jun 2, 2025 at 9:57 PM jian he wrote:
>
> Currently in pg18, we can add not enforced check constraints.
> but we can not do ALTER TABLE ALTER CONSTRAINT [NOT] ENFORCED
> for check constraint.
>
> The attached patch is implementation of changing enforceability of
>
On Tue, Mar 11, 2025 at 4:23 PM jian he wrote:
>
hi.
rebase and minor tweaks.
From 44c494fd8d7fdb9d8fd5d2d2a48f49b779d1bcb9 Mon Sep 17 00:00:00 2001
From: jian he
Date: Fri, 4 Jul 2025 13:25:00 +0800
Subject: [PATCH v17 2/2] Add option force_array for COPY JSON FORMAT
force_array option
store security labels if the associated
object is excluded.
From 62055ddac9cf73def7e9d3af275f58180707 Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 3 Jul 2025 11:18:06 +0800
Subject: [PATCH v2 2/3] make pg_dump dump security label for shared database
objects
MIME-Version: 1.0
Content-Type:
On Thu, Jun 5, 2025 at 3:00 AM Andres Freund wrote:
>
> > > The dereference is not reachable
> > > because of the preceding "var->datatype->typlen == -1" check,
> > > but that's not stopping the optimizer from bitching.
> >
> > > I experimented with modifying exec_set_found thus:
> > >
> > > v
error_null, line 1, column a: null input
>
> It might be better to consider standardizing casing across all COPY
> statements (e.g., COPY ... TO, COPY ... FROM STDIN) for consistency.
>
I followed near code conventions, changing the casing here seems not necessary.
From feded9f7562f608e
YPE),
errmsg("cannot copy from foreign table
\"%s\"", relation_name),
errdetail("Partition \"%s\" is a foreign
table in the partitioned table \"%s\"",
ons locally.
However, I haven’t tested --no-security-labels option, so no changes were
made for it. Testing --no-security-labels appears to need more setup, which
didn’t seem trivial.
writing Perl tests is not easier for me, I didn’t add those either.
(seems in master, we didn't have --no-publi
hi.
I don't want to disrupt this thread too much.
so I created a separate thread ([1]) for my attached patch.
[1]
https://www.postgresql.org/message-id/CACJufxF8_VzCFRHRt4OHHF74QtB8tj5Z%3Ddjsy7Y31OHKG5s1-w%40mail.gmail.com
id/CACJufxGRCP19Rm66%3DTSBwmEuVr92FwL_e6YFjmCpJrgu6Km9hQ%40mail.gmail.com
From 0fb93c0edf7c100178794396bc5f09a9696e03ce Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon, 30 Jun 2025 23:02:57 +0800
Subject: [PATCH v1 1/1] array_random
we can not use function signature as array_random(anyelem
On Fri, Jun 27, 2025 at 2:11 PM Fujii Masao wrote:
>
> I had this concern because other commands, like ALTER SEQUENCE ALTER
> CONSTRAINT NOT VALID,
> can also hit this error, and seeing an error message that starts with ALTER
> TABLE ...
> in that context can be confusing. That's why I thought a
h the actual data will be copied.
* root_rel: if not NULL, it indicates that we are copying partitioned relation
* data to the destination, and "rel" is the partition of "root_rel".
* processed: number of tuples processed.
*/
static void
CopyThisRelTo(CopyToState cstate, Rela
COMMENT command whose TocEntry->tag also starts with "POLICY".
which is also true, per https://www.postgresql.org/docs/current/sql-comment.html
after "COMMENT ON", the next word is fixed, and "POLICY" only occurs once.
If this is what we want, we can do the same fo
hi.
in gram.y we have:
indirection_el:
'.' attr_name
{
$$ = (Node *) makeString($2);
}
we can be sure that dot notation, following dot is a plain string.
then in jsonb_subscript_transform, we can transform the String Node to
a TEXTOI
On Wed, Jun 25, 2025 at 1:56 PM jian he wrote:
>
> hi.
CREATE TABLE test_jsonb_dot_notation AS
SELECT '{"a": [1, 2, {"b": "c"}, {"b": "d", "e": "f", "x": {"y":
"yyy", "z":
On Wed, Jun 25, 2025 at 11:04 PM Fujii Masao
wrote:
> >>
> >> This commit corrects the behavior by ensuring CREATE TABLE LIKE to also
> >> copy
> >> the comments on NOT NULL constraints when INCLUDING COMMENTS is specified.
> >
> > LGTM. I'd add a line in the test showing that these comments are
hi.
in src/backend/catalog/sql_features.txt
should we mark any T860, T861, T862, T863, T864
items as YES?
typedef struct SubscriptingRef
{
/* expressions that evaluate to upper container indexes */
List *refupperindexpr;
}
SubscriptingRef.refupperindexpr meaning changed,
So the abo
hi.
I have applied for 0001 to 0006.
static void
jsonb_subscript_transform(SubscriptingRef *sbsref,
List **indirection,
ParseState *pstate,
bool isSlice,
bool isAssignment)
{
List *up
On Thu, Mar 20, 2025 at 10:16 AM David G. Johnston
wrote:
>
> In short, ready to commit (see last paragraph below however), but the
> committer will need to run the python script at the time of commit on the
> then-current tree.
>
hi.
more explanation, since the python script seems quite large.
hi.
+ /* Sort array of lower bounds. */
+ qsort_arg(lower_bounds, nparts, sizeof(PartitionRangeBound *),
+ qsort_partition_rbound_cmp, (void *) key);
here, we don't need ``(void *)``
+ALTER TABLE [ IF EXISTS ] name
+MERGE PARTITIONS (partition_name1, partition_name2 [, ...])
+INTO p
On Mon, Jun 23, 2025 at 9:13 PM Peter Eisentraut wrote:
>
> >
> > Note: Support for composite types in virtual generated columns is
> > currently partial.
> > for example:
> >
> > CREATE TYPE double_int as (a int, b int);
> > --ok
> > CREATE TABLE gtest4 (
> > a int,
> > b double_int GEN
1 - 100 of 1176 matches
Mail list logo