ola pessoal
como posso ter a informação do tamanho do campo filler ?
tenho a seguinte estrutura de testes
CREATE TABLE accounts
(
aid integer NOT NULL,
bid integer,
abalance integer,
filler character(84),
CONSTRAINT accounts_pkey PRIMARY KEY (aid)
)
e o seguinte script
SELECT n.nspname as esquema, c.relname as tabela, a.attname as campo,
format_type(t.oid, null) as tipo_de_dado
FROM pg_namespace n, pg_class c,
pg_attribute a, pg_type t
WHERE n.oid = c.relnamespace
and c.relkind = 'r' -- no indices
and c.relname = 'accounts'
and n.nspname not like 'pg\\_%' -- no catalogs
and n.nspname != 'information_schema' -- no information_schema
and a.attnum > 0 -- no system att's
and not a.attisdropped -- no dropped columns
and a.attrelid = c.oid
and a.atttypid = t.oid
ORDER BY nspname, relname, attname;
--
daniel lopes filho
campo grande/ms
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral