Hi Hannu, > -1 is given for types that are of fixed size and whose length can be > read from pg_type.typlen for that type.
I don't think so...jsut look into this file pq_type.h.... it says......... ***************************************************************** typlen is the number of bytes we use to represent a value of this type, e.g. 4 for an int4. But for a variable length type, typlen is -1 ***************************************************************** -1 is for variable length n not for fixed length.........this point is very clear even in documentation.......... now how to find length for a numeric, varchar or anyother one that has variable length where the system PQfsize returns -1.........? As tom said.....The type is encoded in the atttypmod field (see PQfmod) and recommended using format_type()..... but when this is used, it returns -1 for integer , real n other fixed datatypes ......... any better way , please......... Shra ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])