Search Postgresql Archives

Re: cast list of oid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

2011/4/8 salah jubeh <s_jubeh@xxxxxxxxx>:
> is it possible to cast a list of oids . i.e something like below. Or I
> need to write a procedure
>
> SELECT groname, grolist::regclass::text FROM pg_group;
>

what is list? Is it a array?

you can use a unnest and array()

postgres=# select array(select unnest(array[25,26,27]::oid[])::regtype);
    ?column?
ââââââââââââââââ
 {text,oid,tid}
(1 row)


Regards

Pavel Stehule

>
> ÂRegards
>
> Best Regard
>
> Eng. Salah Al Jubeh
> Palestine Polytechnic University
> College of Applied Science
> Computer Science
> P.O. Box 198
> Mobile:++97259369122
> Tel:++97222254680
>
>
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux