Re: Changing pg_type records - Mailing list pgsql-general

From Tom Lane
Subject Re: Changing pg_type records
Date
Msg-id 1068.1237492819@sss.pgh.pa.us
Whole thread Raw
In response to Changing pg_type records  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
Responses Is there a meaningful benchmark?  ("Will Rutherdale (rutherw)" <rutherw@cisco.com>)
List pgsql-general
"Rob Richardson" <Rob.Richardson@rad-con.com> writes:
> I just discovered the existence of a couple of functions I don't
> understand in one customer's PostgreSQL database:

What do the substitute output functions do differently?

> UPDATE pg_type SET typoutput='c_textout'    WHERE typname='SET';

This one has been a no-op since 7.4, because there is no longer any such
row in pg_type; and I'm pretty sure the row was vestigial long before that.
If the underlying code is old enough that it was designed when changing
that row did something interesting, it certainly all needs a fresh look
anyway...

> Are these functions really as innocuous as he claims?  It seems to me
> that between the time c_mode() is called and the time that pg_mode() is
> called, any other database access is likely to be confused.

Yes, you definitely are taking big risks there.  Aside from the question
of how data appears to the client, this could bollix the behavior of
most PL languages too.

            regards, tom lane

pgsql-general by date:

Previous
From: ray
Date:
Subject: Re: Installation Error, Server Won't Start
Next
From: "Will Rutherdale (rutherw)"
Date:
Subject: Is there a meaningful benchmark?