Search Postgresql Archives

How to find details of arguments in all functions in postgre - One solution

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

 




Hello All,

I was trying to find some way, to list out all argument details in all functions in postgre(input parameter names, types and mode - in/out).
 I found one solution -

------------------------------------------------------------------------------------------------------
select r.routine_schema,b.typname,t.* from
(
select proname,proallargtypes[idx] argType, proargnames[idx] argName,proargmodes[idx] argMode
from pg_proc a
inner join generate_series(1,50)idx on 1 = 1

-- is this correct way, i dont know.

)t
inner join pg_type b on b.typelem = t.argType
inner join information_schema.routines r on r.routine_name = t.proname
where t.argType is not null
order by r.routine_schema,t.proname

--------------------------------------------------------------------------------------------


Please suggest, if some better way is available of achieving this.
Also, i want to know the way i am getting type of argument is right or not?
Background - We have migrated one oracle database to postgre. Now from .Net for coding , we need a list of all functions and their types.

Thanks in advance


Regards,
Venkat
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



[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