nome do regsitro = nome da coluna certo?
 ps.attname = nome da coluna

Fernando Grassi de Oliveira
[EMAIL PROTECTED]



On Thu, Nov 13, 2008 at 8:47 AM, Antonio Prado
<[EMAIL PROTECTED]> wrote:
> ...
>> para fazer a função que você precisa, podes utilizar o seguinte select
>> para ter uma idéia
>>
>> select ps.tablename
>>       , ps.attname
>>       ,pt.typname
>>       from pg_stats ps
>>       ,pg_attribute pa
>>       ,pg_type pt
>>       where schemaname='public'
>>       and ps.attname=pa.attname
>>       and pt.typelem=pa.atttypid
> ...
>
> Além do nome da tabela, necessito também obter o nome do registro. Aonde
> eu o obtenho ?
>
> select  ps.tablename
>        ,pt.typname
>        from pg_stats ps
>        ,pg_attribute pa
>        ,pg_type pt
>        where schemaname='public'
>        and ps.attname=pa.attname
>        and pt.typelem=pa.atttypid
>        and ps.attname='data'
>        and pt.typname='_varchar'
>        order by ps.tablename
>
> Obrigado.
>
>
> Antonio.
>
>
>
>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a