Re: pg_upgrade issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: depstein <depstein(at)alliedtesting(dot)com>, bruce <bruce(at)momjian(dot)us>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, pgagarinov <pgagarinov(at)alliedtesting(dot)com>
Subject: Re: pg_upgrade issues
Date: 2010-07-27 21:28:29
Message-ID: 14580.1280266109@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from depstein's message of lun jul 26 08:05:24 -0400 2010:
>> I just want to note that one reason regclass may be used in user tables (as opposed to, say, regtype) is that in PL/pgSQL trigger procedures there is a special variable TG_RELID, which provides a convenient reference to the table that pulled the trigger (this is the case for some of our uses).

> I've wanted to use regclass (and regproc too, for that matter) in some
> db designs, but I've refrained precisely because of the movability issues.

> Note that you can use TG_SCHEMANAME and TG_RELNAME in plpgsql triggers
> anyway.

How does TG_RELID lead to wanting to store regclass columns, exactly?
I've always supposed that was a legacy parameter rather than something
anyone would actually use.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2010-07-27 22:22:18 Re: failed to fetch tuple for EvalPlanQual recheck
Previous Message Andres Freund 2010-07-27 21:20:37 Re: failed to fetch tuple for EvalPlanQual recheck