Alvaro Herrera wrote:
> Guillaume Lelarge wrote:
>
>> We first send the query to the database. For each returned column, we
>> send two queries. The first one gives us the type's name of the column
>> and the second one gives us the OID of the base type. So, each query
>> executed with pgAdmin's query tool should increase age(datfrozenxid) by :
>> 1 + (2 * number of columns in the SELECT)
>
> Ever thought of doing it all in a single transaction?
>
Well, I'm not sure of the consequences of this. I'll get a look at this.
What I first thought on my previous mail was to keep in memory a list
of all types available, but this was stupid : it needs refresh when
another user adds a new type and I'm sure there are others corner cases.
I much prefer your idea, thanks.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com