On Thu, Apr 21, 2016 at 8:26 AM, Andrea Adami <f...@fulcro.net> wrote:
> > Hello, i'm a developer from italy and i need to make a query to get the > list of stored procedures with its signature. > Basically I would like to get the same list pgAdmin shows under the node > functions of the database tree on left panel. with the query : p.oid AS > SELECT oid , p.proname AS name , p.proargtypes FROM pg_proc p I get the > list of procedures with the column "proargtypes" that contains the list > of parameters's type. > Each digit of proargtypes column refers to the corresponding tuple in > pg_type So far all is fine, the problems arise when i want convert these > numbers to strings as the previously mentioned pgAdmin did: 1 ) in typname > column (of pg_type table) some time, I did not understand why , there is a > space in front of the name , better: a space is displayed but there is not > a space because a trim do not throw away . 2 ) I can not understand what > colums tell me if the type of data in question is an array ( to display it > with ' [ ] ' appended to the name ) Someone is kind enough to put me on the > right track ? > > p.s. > the function: pg_catalog.pg_get_function_arguments(p.oid) show what i need > but after the parameter name, what i want is a list of parameter's datatype > (the signature) without the parameter's name > > Using text as an example the system considers the type "_text" to be its array form. As you sure that what you are thinking is a leading space is not this leading underscore? David J.