>
>
>  You will see there are many pointers also in
> RelationData but we ensure before we access them they are initialized,
>

The initialized values are not much helpful in the cases I provided here.

What do you think about this question?

2. _If_ the relation can be reset after we open it during Executor code,
then would the
relation (RelationData *) pointed memory still validated after the relcache
reset?  For example

CREATE TABLE t(a int);
INSERT INTO t VALUES(1), (2);

UPDATE t set a = 100;

We need to update 2 tuples in the update statement, if the relcache is
reset after the first tuple is
updated,  can we still use the previous (RelationData *) to do the 2nd
update? This is just
a common example.  If you would say, in this case the relcache can't be
reset,  then the question
come back to what situation the relcache can be reset between the first
time I open it during execution
code  and the end of execution code.  I think we have some talks about this
at [1].

Right now, I am not pretty sure I am doing something well.  That's why I
post the question here.  but still
I didn't find a better solution right now. [2]

[1]
https://www.postgresql.org/message-id/CAKU4AWonyG2_5V+vKaD6GETNNDKbKFL=otwWSEA3UXOJ=rs...@mail.gmail.com

[2]
https://www.postgresql.org/message-id/CAKU4AWotGB7PH%2BSJk41cgvqxOfeEEvJ1MV%2B6b21_5DMDE8SLXg%40mail.gmail.com

-- 
Best Regards
Andy Fan

Reply via email to