Find the type of all tables in Java, can i do that

Hello all

In my postgres database, I have many tables (>100 tables). I want to check all these tables to see if the first field of these tables are correct type and default value. E.g. I want to check the first field is type "int4" and default value is something like

item_id int4 NULL DEFAULT nextval(item_id_seq'::regclass),

Suppose that I have a list of all tables in this database. I am trying to create a Java program to go through all those tables, get the first fields of these table and check its type and its default value

Can I do it in Java or I can only do it manually ?

Thank you very much for any help

shuhu

[668 byte] By [suhua] at [2007-11-27 9:17:49]
# 1
You may find Connection#getMetaData() useful.Here is it's API documentation: http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#getMetaData()
BalusCa at 2007-7-12 22:08:33 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...