Re: pg_class.relistemp

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_class.relistemp
Date: 2011-07-14 16:55:22
Message-ID: 4E1F1F7A.90100@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14.07.2011 19:51, David E. Wheeler wrote:
> On Jul 13, 2011, at 12:57 PM, Kevin Grittner wrote:
>
>> create or replace function relistemp(rel pg_class)
>> returns boolean language sql immutable strict as
>> $$select $1.relpersistence = 't';$$;
>>
>> Just don't forget to use the table name or alias in front of it... :-)
>
> Oh, nice hack. How far back does that work (pgTAP runs on 8.0 and higher)?

Far back. But you only need it in >= 9.1. Older versions have the
pg_class.relistemp column anyway.

Not sure how this helps, though. If you modify pgTAP to install that
automatically in pgTAP when dealing with a new server version, you might
as well modify its queries to use relispersistence = 't' directly when
dealing with a new server version. It works as a manual work-around if
you can't upgrade pgTAP, I guess.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-07-14 16:57:03 Re: pg_class.relistemp
Previous Message David E. Wheeler 2011-07-14 16:53:08 Re: Full GUID support