RE: should INSERT SELECT use a BulkInsertState?

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Luc Vlaming <luc(at)swarm64(dot)com>
Subject: RE: should INSERT SELECT use a BulkInsertState?
Date: 2021-03-22 09:44:49
Message-ID: OS0PR01MB5716D2829433F1F1A787B42894659@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

About the 0002-patch [Check for volatile defaults].

I wonder if we can check the volatile default value by traversing "query->targetList" in planner.

IMO, the column default expression was written into the targetList, and the current parallel-safety check
travere the "query->targetList" to determine whether it contains unsafe column default expression.
Like: standard_planner-> query_tree_walker
if (walker((Node *) query->targetList, context))
return true;
May be we can do the similar thing to check the volatile defaults, if so, we do not need to add a field to TargetEntry.

Best regards,
houzj

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-03-22 09:47:07 Re: proposal: schema variables - doc
Previous Message Amit Langote 2021-03-22 09:32:52 Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb