Forum OpenACS Q&A: How do I query the size of a column in postgres?

I am trying to make the prototype module work. The only bug that I have run into is in the max_col_length proc which makes to following sql query:

set sql "select data_length from USER_TAB_COLUMNS where table_name='[string toupper $table]' and column_name = '[string toupper $col]'"

The table USER_TAB_COLUMNS looks like an oracle construct that tells you information about columns in the user tables. Does any one know the equivalent postgres tables?

(I have submitted this to the SDM, and I have poked around in the PG docs without much success. This isn't super pressing since the workaround is pretty easy, but it would be helpful for future knowledge). Thank you.