Re: [GENERAL] Pass-by-reference UDTs and volatility

2013-06-12 Thread Tom Lane
Stephen Scheck writes: > But how would the hash table keys themselves be deleted? Is there some > callback API to hook transaction completion? See RegisterXactCallback and RegisterSubXactCallback. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Pass-by-reference UDTs and volatility

2013-06-12 Thread Stephen Scheck
Hmm, that might work - so allocate the values in a transaction-scoped memory context? But how would the hash table keys themselves be deleted? Is there some callback API to hook transaction completion? On Wed, Jun 12, 2013 at 1:07 PM, Tom Lane wrote: > Stephen Scheck writes: > > "Never modify

Re: [GENERAL] Pass-by-reference UDTs and volatility

2013-06-12 Thread Tom Lane
Stephen Scheck writes: > "Never modify the contents of a pass-by-reference input value. If you do so > you are likely to corrupt on-disk data, since the pointer you are given > might point directly into a disk buffer. The sole exception to this rule is > explained in Section 35.10." > If the UDTs

[GENERAL] Pass-by-reference UDTs and volatility

2013-06-12 Thread Stephen Scheck
Hello, I am working on an extension which defines a number of user-defined functions which will operate on a common, custom data type to perform a pipeline of transformations (the data type is the IN/OUT parameter for all of the functions), eventually being supplied to a sink function which takes