Hi all,
I have a problem with metadata.........just read this ....... Let us simply suppose a table "test" with 2 fileds "name (varchar(10))" and "age (numeric)" and there b values as name="abc",age="20". Now in a function i need to develop a list where the column header info has to b made in this format i.e., as "column name, column type, column width"......... am getting the column name using PQfname function, column type using PQftype and column size using PQfsize....... am also able to get each filed values n their size correctly.......... but the problem now is ......when i use PQfsize to get the column header size then i get a -1 if the field is a variable length in nature else i get the exact size........i.e., in the above declared table for both the name and age being variable fields am getting -1 for their size.......now i need some mechanism to get 10 for "name" header and number of bytes allocated for "age"(30,6).......is their any way to overcome this problem? Is this a draw back in Postgre? Is there any way i can get the exact size that i allocated when creating the table.....infact most of the other databases do provide APIs with not having this problem........can anyone help me, please......... Shra ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org