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
bigint[] | min bigint, max
bigint, dims integer[], lbounds integer[] DEFAULT NULL::integer[] |
func
pg_catalog | array_random | integer[]| min integer, max
integer, dims integer[], lbounds integer[] DEFAULT NULL::integer[] |
func
pg_catalog | array_random | numeric[]|
On Sat, Jun 21, 2025 at 1:29 PM jian he wrote:
>
> ( the following excerpted from create_type.sql)
>
> BEGIN;
> CREATE TYPE int42;
> -- Make dummy I/O routines using the existing internal support for int4, text
> CREATE FUNCTION int42_in(cstring)
>RETURNS int42
>
On Thu, Jun 19, 2025 at 5:11 AM Peter Eisentraut wrote:
> Here is a new patch.
>
> My previous patch was a bit too simple. I had thought that
> check_functions_in_node() does the node walking itself, but that was
> wrong, so the patch only worked at the top-level of the expression. So
> I had to
ffa5c5?
>
hi.
in transformTableLikeClausem, let cxt(CreateStmtContext) to add
CommentStmt should just work.
Please check attached, tests also added.
From 41fd109bd75451cadc347cc37be56228e85f3417 Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 19 Jun 2025 13:40:06 +0800
Subject: [PATCH v1 1/1
nt name.
if tbinfo->notnull_constrs is an empty string, we need to use the above
"%s_%s_not_null" trick to get the default no-null constraint name.
From 4cce00779490001f4e40fb3055c7bddd539e1ad2 Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 19 Jun 2025 10:26:44 +0800
Subject: [PATCH
n print_notnull is true. Since we already know which columns have had
their not-null constraints printed, it makes sense to dump inline not-null
comments here too.
Please check the attached POC patch.
From c586c07a2c2b473f88453c12de0a08190db42a2f Mon Sep 17 00:00:00 2001
From: jian he
Date: Wed,
hi.
The following are changes I made based on v47.
mainly comments refactoring, variable/argument renaming.
please see the attached patch.
+
+ /* Create the relation. */
+ newRelId = heap_create_with_catalog(newPartName->relname,
+ namespaceId,
+ modelRel->rd_rel->reltablespace,
+
+ allowSyst
On Tue, Jun 17, 2025 at 7:42 PM Peter Eisentraut wrote:
>
> However, I see your point that it contrasts with the attidentity code
> just above.
>
> Perhaps a way to resolve this would be to rewrite the comment something
> like:
>
> /*
> * Although inserting into a GENERATED BY DEFAULT i
On Tue, Jun 17, 2025 at 1:21 PM Peter Eisentraut wrote:
>
> On 12.06.25 08:26, jian he wrote:
> > in contrib/amcheck/verify_heapam.c, check_tuple
> > report_corruption(ctx,
> >psprintf("number of attributes %u exceeds
>
On Tue, Jun 17, 2025 at 4:15 AM Dmitry Koval wrote:
>
> Added patch and a bit modified test.
>
hi.
Please check the attached patch for addressing the following issues.
+ else
+ {
+ ereport(ERROR,
+ errcode(ERRCODE_DUPLICATE_TABLE),
+ errmsg("relation \"%s\" already exists", cmd->name->relname));
for v45.
+ foreach_ptr(CookedConstraint, ccon, cookedConstraints)
+ {
+ if (!ccon->skip_validation && ccon->contype == CONSTR_CHECK)
+ {
+ Bitmapset *attnums = NULL;
+
+ pull_varattnos((Node *) ccon->expr, 1, &attnums);
+
+ /*
+ * Add check only if it contains tableoid
+ * (TableOidAttributeNumbe
hi.
static void checkPartition(Relation rel, Oid partRelOid)
function name checkPartition is not ideal, maybe we can change it to
CheckPartitionForMerge or MergePartitionCheck.
(attached v45-002 is error message refactoring for checkPartition,
I didn't change the name though.)
For the command:
A
On Wed, Jun 11, 2025 at 10:20 PM Fujii Masao
wrote:
>
> >> We discussed this already, didn't we? There's a thread with IIRC three
> >> proposed patches for this. I think I liked this one the most:
> >>
> >> https://postgr.es/m/caaj_b97hd-jmts7ajgu6tdbczdx_kyukxg+k-dtymoieg+g...@mail.gmail.com
>
On Fri, Jun 13, 2025 at 4:36 AM Dmitry Koval wrote:
>
> Hi, Jian He!
>
> Thanks for the notes and patches (again).
> I read a part of emails, I hope to read the rest emails tomorrow.
>
hi.
in doc/src/sgml/ref/alter_table.sgml
Parameters section,
we also need explain
p
hi.
one more minor issue.
+ * defaultPart: true if one of split partitions is DEFAULT
+ * pstate: pointer to ParseState struct for determining error position
+ */
+static void
+check_two_partitions_bounds_range(Relation parent,
+ RangeVar *first_name,
+ PartitionBoundSpec *first_bound,
+ RangeV
hi.
+/*
+ * check_two_partitions_bounds_range
+ *
+ * (function for BY RANGE partitioning)
+ *
+ * This is a helper function for check_partitions_for_split() and
+ * calculate_partition_bound_for_merge().
check_partitions_for_split does not exist in v43-0001.
+ /*
+ * Rename the existing partiti
hi.
in contrib/amcheck/verify_heapam.c, check_tuple
report_corruption(ctx,
psprintf("number of attributes %u exceeds
maximum expected for table %u",
ctx->natts,
RelationGetDescr(ctx->rel)->natts
hi.
+ /* Copy data from merged partitions to new partition. */
+ moveMergedTablesRows(rel, mergingPartitionsList, newPartRel);
+
+ /* Drop the current partitions before attaching the new one. */
+ foreach_ptr(RelationData, mergingPartition, mergingPartitionsList)
+ {
+ ObjectAddress object;
+
+ /*
On Wed, Jun 11, 2025 at 8:06 AM Dmitry Koval wrote:
>
> >Do getAttributesList need to care about pg_attribute.attidentity?
> >currently MERGE PARTITION seems to work fine with identity columns,
> >this issue i didn't dig deeper.
>
> Probably after commit [3] partition's identity columns shares
hi.
we generally no need to worry about the partitioned table check constraint,
generated column does not apply to newly merged partitions.
since partitioned table constraints apply to each individual partition,
including newly created partitions.
However, there are corner cases:
constraints incl
On Tue, Jun 10, 2025 at 6:48 AM Dmitry Koval wrote:
> 3.
> >i think, we can do the following way:
> >if (modelRel->rd_rel->relam)
> > elog(ERROR, "error");
> >relamId = modelRel->rd_rel->relam;
>
> Can you clarify what is reason to change the current AM-logic for
> creating a new partition?
>
hi.
for all the progress report views[1],
we can add a timestamptz column, maybe named as query_start.
People generally want to track the progress of operations and the time spent on
them. While pg_stat_activity already provides column query_start, including
query_start in pg_stat_get_progress_i
On Thu, Jun 5, 2025 at 4:47 AM Robert Treat wrote:
>
> I think some of those changes are worth a second stab, so here is an
> updated patch which removes the ancillary tagging and corresponding
> line wrappings and focuses just on the wording/grammer improvements;
> hopefully it will be easier to
hi.
some more minor comments about v13-0001.
GetCommandLogLevel also needs to specify LogStmtLevel for T_RepackStmt?
/*
* (CLUSTER might change the order of
* rows on disk, which could affect the ordering of pg_dump
* output, but that's not semantically significant.)
*/
do we need adjust this
On Fri, Apr 11, 2025 at 5:28 PM Antonin Houska wrote:
>
> Please check the next version [1]. Thanks for your input.
>
> [1] https://www.postgresql.org/message-id/97795.1744363522%40localhost
>
Hi, I’ve briefly experimented with v13-0001.
EXPLAIN tab complete:
explain (verbose O
OFF ON
since we
On Mon, Jun 2, 2025 at 3:35 PM Jiří Kavalík wrote:
> What I changed:
>
> `commands/tablecmds.c`
> - start and end reporting inside `ATRewriteTables()`
> - report blocks total, blocks and tuples scanned and possibly tuples written
> in `ATRewriteTable`
> - add at least phase info in `validateForei
hi.
in createTableConstraints
+ /* Add a pre-cooked default expression. */
+ StoreAttrDefault(newRel, num, def, true);
+
+ /* Store CHECK constraints. */
+ StoreConstraints(newRel, cookedConstraints, false);
Here, StoreConstraints last argument should be set to true?
see also StoreAttrDefault.
+
hi.
one more patch for regress tests.
ALTER TABLE salespeople MERGE PARTITIONS (salespeople10_20,
salespeople20_30, salespeople30_40) INTO salespeople10_40;
the trigger on the merged partition will be dropped.
For example, here, trigger on salespeople10_20 will be dropped.
I am surprised that pa
On Thu, Jun 5, 2025 at 10:39 PM Robert Haas wrote:
>
> On Thu, Jun 5, 2025 at 6:49 AM Peter Eisentraut wrote:
> > I propose to address this by not allowing the use of user-defined
> > functions in generation expressions for now. The attached patch
> > implements this. This assumes that all buil
hi.
When using ALTER TABLE ... MERGE PARTITIONS, some of the new
partition's properties will
not be inherited from to be merged partitions; instead, they will be directly
copied from the root partitioned table.
so we need to test this behavior.
The attached test file is for test table properties:
hi.
bug in transformPartitionCmdForMerge "equal(name, name2))"
+static void
+transformPartitionCmdForMerge(CreateStmtContext *cxt, PartitionCmd *partcmd)
+{
+
+
+ foreach(listptr, partcmd->partlist)
+ {
+ RangeVar *name = (RangeVar *) lfirst(listptr);
+
+ /* Partitions in the list should have di
hi.
the following are review of
v40-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch
ALTER TABLE sales_range MERGE PARTITIONS (sales_feb2022,
sales_mar2022) INTO sales_feb_mar_apr2022;
There are no tests when sales_feb2022 or sales_mar2022 have any constraints.
a partition can have its
on: application/sql
From fca7b87718264cb5ea52f3b4462f4d6e52d58cdc Mon Sep 17 00:00:00 2001
From: jian he
Date: Thu, 5 Jun 2025 08:44:13 +0800
Subject: [PATCH v11 1/1] support COPY partitioned_table TO
this is for implementatoin of ``COPY (partitioned_table) TO``. it will be
faster th
On Wed, Jun 4, 2025 at 4:53 AM Dmitry Koval wrote:
> Added some changes to documentation.
> Patches are attached to the email.
>
hi.
I haven't touched v39-0002 yet.
The following are reviews of v39-0001.
+CREATE INDEX sales_range_sales_date_idx ON sales_range USING btree
(sales_date);
+INSERT IN
On Tue, Jun 3, 2025 at 12:14 PM Amul Sul wrote:
> >
>
> I found a third approach that requires only a few changes. The key
> idea is to determine the root referenced table and pass it to
> QueueFKConstraintValidation(). We would then enqueue phase 3
> validation only if the constraint tuple’s conf
On Tue, Jun 3, 2025 at 9:19 AM Tom Lane wrote:
>
> In any case, this doesn't feel like something to be defining and
> implementing post-beta1. Even if it were not security-critical,
> the amount of complication involved is well past our standards
> for what can go in post-feature-freeze.
>
> I'm
:00:00 2001
From: jian he
Date: Mon, 2 Jun 2025 21:54:53 +0800
Subject: [PATCH v1 1/1] alter check constraint enforceability
context: https://git.postgresql.org/cgit/postgresql.git/commit/?id=ca87c415e2fccf81cec6fd45698dde9fae0ab570
discussion: https://postgr.es/m/
---
doc/src/sgml/ref
hi.
attached is to fix the regress test failure[0] in V5.
I also did some test simplification.
[0]
https://api.cirrus-ci.com/v1/artifact/task/6014753866252288/log/src/test/regress/regression.diffs
From 1df9fc6e8e645463e864f44492d532def74c8437 Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon
://www.postgresql.org/docs/devel/sql-altertable.html
From bf01db5085901f179fa83b4cca12ba55c9bd0a64 Mon Sep 17 00:00:00 2001
From: jian he
Date: Mon, 2 Jun 2025 14:45:47 +0800
Subject: [PATCH v1 1/1] tab complte for ALTER TABLE ALTER CONSTRAINT
ALTER TABLE tab complte for
ALTER CONSTRAINT constraint_name
On Thu, May 29, 2025 at 11:06 AM Richard Guo wrote:
>
> On Fri, May 16, 2025 at 5:35 PM jian he wrote:
> > we have used the USING expression in ATPrepAlterColumnType,
> > ATColumnChangeRequiresRewrite.
> > expanding it on ATPrepAlterColumnType seems to make more se
On Mon, Jun 2, 2025 at 12:13 AM Álvaro Herrera wrote:
>
> Hmm, I think it would be more consistent to reject the case of duplicate
> constraints, instead of silently ignoring it. So you'd do it in the
> loop that checks for constraints before creating anything, like
>
>
> diff --git a/src/backend
On Wed, May 28, 2025 at 7:59 PM Álvaro Herrera wrote:
>
> On 2025-May-28, jian he wrote:
>
> > hi.
> >
> > create table t(a int, constraint cc check(a = 1));
> > ALTER TABLE t ALTER CONSTRAINT cc not valid;
> > ERROR: FOREIGN KEY constraints cannot be mar
hi.
CREATE DOMAIN int_domain1 AS INT CONSTRAINT nn1 NOT NULL CONSTRAINT
nn2 NOT NULL;
will install two not-null pg_constraint entries.
we should have only one?
From 8328340ac98daa3e26ac13cc06348560a468abf0 Mon Sep 17 00:00:00 2001
From: jian he
Date: Sun, 1 Jun 2025 11:32:28 +0800
Subject
On Fri, May 30, 2025 at 6:32 PM Amul Sul wrote:
>
>
> Kindly take a look at the attached version. I've also added the tests.
> Thanks for your script -- all tests are passing with this patch.
>
hi.
+ * Note that validation should be performed against the referencing
+ * root table only, not its
On Thu, May 29, 2025 at 8:58 PM Amul Sul wrote:
> >
> > I just realized we have the same problem with ALTER FOREIGN KEY ENFORCED.
> > for example:
>
> Yeah, I think adding a "currcon->confrelid == pkrelid" check before
> enqueueing validation in ATExecAlterConstrEnforceability() would
> address th
On Thu, May 29, 2025 at 8:12 PM Amul Sul wrote:
>
> > >> > [...]
> > The attached *draft* patch is based on your idea.
> >
> > The idea is that we only need to conditionally do
> > ``tab->constraints = lappend(tab->constraints, newcon);`` within
> > QueueFKConstraintValidation.
> > but the catalog
On Wed, May 28, 2025 at 8:38 PM Tender Wang wrote:
>
>
>
> Alvaro Herrera 于2025年5月28日周三 20:26写道:
>>
>> On 2025-May-28, Tender Wang wrote:
>>
>> > I dided the codes, in QueueFKConstraintValidation(), we add three
>> > newconstraint for the
>> > fk rel, because the pk rel is partition table.
>> >
1 - 100 of 1141 matches
Mail list logo