Re: Identifying casts

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Marc Munro" <marc(at)bloodnok(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Identifying casts
Date: 2007-12-07 19:58:38
Message-ID: 162867790712071158y15905a61l69bea0d568259d5a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

you can use oid. When oid is greather than some constant, then cast is
custom. The constant is different on any postgresq versions.

You can get it on clean postgres with statement

select max(oid) from pg_cast;

Regards
Pavel Stehule

On 07/12/2007, Marc Munro <marc(at)bloodnok(dot)com> wrote:
> Is there any way of identifying whether a cast was built-in or is
> user-defined?
>
> I am tempted to just assume that if the cast is to/from a user-defined
> type or uses a user-defined function that it is user-defined. I suspect
> though that a user could define a new cast on pre-defined types using a
> pre-defined function.
>
> __
> Marc
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2007-12-07 20:44:02 Re: Re-partitioning huge schema
Previous Message Erik Jones 2007-12-07 19:23:52 Re: Replication using WAL files