Pessoal,

É possível usar o case com um alter table?

Tipo assim:

alter table rua

case n_rua exists (SELECT attname FROM pg_attribute WHERE attrelid = 
(SELECT oid FROM pg_class WHERE relname = 'ruas') AND attname = 'n_rua')

then add column largura double precision,add column tipologia text,add 
column declive double precision

else alter table ruas add column n_rua integer,



Obrigado


_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a