Is there any way to find out particular datatype [say for example chkpass] is available or not through a query ?
A:
PostgreSQL provides a huge amount of meta-data which is easily accessed via SQL. To obtain information about the presence of a (scalar) data type, the information provided by pg_type catalog might be of interest here. Try, for example:
SELECT COUNT(*)
FROM pg_type
WHERE typname = 'chkpass'
Dirk
2009-09-07 11:26:47