From: | Dan S <strd911(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: strange type name in information_schema |
Date: | 2011-05-21 18:54:29 |
Message-ID: | BANLkTimx5jXzArwwWR8i31QX2qB_KGj=Sw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is there any examples of how to join the system tables to get the same
information as I was trying to get from the function ?
Best Regards
Dan S
2011/5/21 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> 2011/5/21 Dan S <strd911(at)gmail(dot)com>:
> > So is there always an underscore prepended to the type name of an array ?
> > for example float[] would then be _float right ?
>
> usually yes - this is older method for marking some type as array. Now
> array types are described by typelem in pg_type table.
>
> Pavel
>
> >
> > Best Regards
> > Dan S
> >
> > 2011/5/21 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> >>
> >> Hello
> >>
> >> type "array of text" has name "_text"
> >>
> >> Regards
> >>
> >> Pavel Stehule
> >>
> >> 2011/5/21 Dan S <strd911(at)gmail(dot)com>:
> >> > Hi !
> >> >
> >> > I'm running "PostgreSQL 9.0.2, compiled by Visual C++ build 1500,
> >> > 32-bit".
> >> >
> >> > I'm trying to get type information on functions out of
> >> > information_schema.
> >> > When there is an array as input or output of a function I try to query
> >> > information_schema of the array type.
> >> >
> >> > In this case udt_name gives the type name _text why does it not give
> >> > text ?
> >> >
> >> > Is this the right way to query the parameter types ?
> >> >
> >> > CREATE OR REPLACE FUNCTION test(ta text[]) RETURNS void AS $$
> >> > BEGIN
> >> > RETURN;
> >> > END;
> >> > $$ LANGUAGE plpgsql;
> >> >
> >> > select p.udt_name,p.data_type,*
> >> > from information_schema.routines r ,information_schema.parameters p
> >> > where r.routine_name = 'test'
> >> > and p.specific_name = r.specific_name
> >> > and p.specific_catalog=r.specific_catalog
> >> > and p.specific_schema=r.specific_schema
> >> >
> >> >
> >> > Best Regards
> >> > Dan S
> >> >
> >
> >
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2011-05-21 19:07:19 | Re: strange type name in information_schema |
Previous Message | Pavel Stehule | 2011-05-21 18:28:10 | Re: strange type name in information_schema |