Õzbek Õzbek - 14 days ago 4x
SQL Question

how to get column size and type through my database in posgreSQL

I've changed column length manulally in my previous database.
But after creating new database via HQL it's creating varchar(255) and i need make it more longer length
i need to find which table's column should i change ?
i can find it manually but now i have about 200 tables
need some query...

how to get column type and its length in posgresql through my database?
thanks in advance.


The INFORMATION_SCHEMA tables will help you here:

select *

You can examine the table_name, column_name, data_type and character_maximum_length columns in the result set.