Thread: aliases

aliases

From
ivan
Date:
where can i find aliases to type , for example INT4 = INT = INTEGER ...
I realy need it to check if function is exists ..
Or how to get oid from same type , but no like select from pg_type

now about plpgsql
i think that will be nice , to possible declare var. with names started
from $ (like functions arguments names $1 .. )

and i tkink thet command EXECUTE should exec not SQL command, but plpgsql
command, Its very good way to create somthing like eval .
Then EXECUTE 'SELECT INTO var 4;'; will be not a problem any more.

and what about my functions to ips addreses and ports ???

thxivan



Re: aliases

From
Alvaro Herrera
Date:
On Sun, Jul 06, 2003 at 10:15:37PM +0200, ivan wrote:
> 
> where can i find aliases to type , for example INT4 = INT = INTEGER ...
> I realy need it to check if function is exists ..
> Or how to get oid from same type , but no like select from pg_type

Maybe this is helpful:

alvh=> select 'int'::regtype;regtype 
---------integer
(1 row)

alvh=> select 'int4'::regtype;regtype 
---------integer
(1 row)

alvh=> select 23::regtype;regtype 
---------integer
(1 row)

I don't know about the rest though.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"No renuncies a nada. No te aferres a nada"