Re: attisdropped, * expansion and tg_trigtuple - Mailing list pgsql-general

From Tom Lane
Subject Re: attisdropped, * expansion and tg_trigtuple
Date
Msg-id 8337.1056031206@sss.pgh.pa.us
Whole thread Raw
In response to attisdropped, * expansion and tg_trigtuple  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Responses Re: attisdropped, * expansion and tg_trigtuple  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
> If in a trigger one does a select * from the table the trigger is on
> is it safe to assume that tg_trigtuple (and so tg_newtuple) will use
> the same TupleDesc as that returned from the select *, i.e. the
> tg_relation->rd_att TupleDesc?

Given recent discussions about decoupling logical and physical column
order, I'd think that assumption might blow up in your face in a version
or two.  It's unsafe even today if the relation has dropped columns.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: explicit joins vs implicit joins
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: why are my SELECTs in transaction?