The prototype tool uses an oraclism, user_tab_column, to get some
info about column sizes. I cobbled together a postgres view that
emulates the "important" columns, so I can use the prototyper to
make first pass UI's. Here's the view:
CREATE VIEW user_tab_columns AS
SELECT upper(c.relname) AS table_name,
upper(a.attname) AS column_name,
CASE WHEN (t.typprtlen > 0)
THEN t.typprtlen
ELSE (a.atttypmod - 4)
END AS data_length
FROM pg_class c, pg_attribute a, pg_type t
WHERE (a.attrelid = c.oid) AND (a.atttypid = t.oid) AND (a.attnum >
0);