Database variable length Problem
Shra
shravan at yaskatech.com
Wed Apr 24 13:49:15 BST 2002
Hi all,
Am using PostgreSQL as my database, but the problem is i want to find the
length/width of the field that i define...for example........
let there b a table test with two fields as name and age as shown here....
"Table test (name varchar(10), age numeric);"
Now the problem is when i use the function PQfsize am getting -1 for name
field rather than 10 as documentation says any field with varying size is
returned -1.
Am keeping the statements as is here from documentation.....
**************************************************************************************
"PQfsize Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
int PQfsize(const PGresult *res,
int field_index); PQfsize returns the space allocated for this
field in a database tuple, in other words the size of the server's binary
representation of the data type. -1 is returned if the field is variable
size."
***************************************************************************************
Now i want to know is there any mechanism through which i can find the exact
size of the individual fileds...i.e., i should get 10 for name
field.........n what will i get for age?(i think platform specific.....)
Please can anyone tell me any developer group where i can get info for these
kind of questions that r not related to kdevelop?
I sincerely appologize as i posted a question not related to
kdevelop..........
Shra
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list