Re: cast name to oid - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: cast name to oid
Date
Msg-id CAL_0b1ttZqUsJ8=jVHCVSEfr9FMaKC1RNnPNHqnJcXqsmKGADQ@mail.gmail.com
Whole thread Raw
In response to cast name to oid  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
List pgsql-general
Hi,

On Wed, Aug 15, 2012 at 1:02 AM, Little, Douglas
<DOUGLAS.LITTLE@orbitz.com> wrote:
> Can someone let me know the correct way to do this?
>
> This is failing
>    where p.oid = cast(proname as regproc);
>
> NOTICE:  found dba_work.pg_get_functiondef2
> WARNING:  sqlstate 42846
> WARNING:  sqlerrm cannot cast type text to regproc
>
> CREATE OR REPLACE FUNCTION dba_work.pg_get_functiondef2(proname text)
> ...
>    where p.oid = cast(proname as name);
> ...

Typo?

--
Sergey Konoplev

a database architect, software developer at PostgreSQL-Consulting.com
http://www.postgresql-consulting.com

Jabber: gray.ru@gmail.com Skype: gray-hemp Phone: +79160686204


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Regarding pc-lint on PostgreSQL code
Next
From: "Carl von Clausewitz"
Date:
Subject: corrupted statistics file "pg_stat_tmp/pgstat.stat"