PGSQL ext...
Stefano Corsi <[email protected]> Thu, 15 May 2003 11:14:55 +0000
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Organization | Moto Project |
| Message-ID | <[email protected]> |
Is there a way to retrieve a value from the PGResultSet independently fro=
m the=20
column type? In other words, is it possible to retrieve a value without b=
eing=20
forced to try a case like this:
switch (rset.getColumnType(n)) {
=09case "integer":
=09=09int i =3D rset.getInt(n);
=09case "String":
=09=09String s =3D rset.getString(n);
=09...etc...
}
I would like to retrive only strings, even if the column type is an int (=
thus=20
somewhere there must be a conversion...).=20
Is there already a way for doing this in PGSQL.i?
Thanks,=09
Stefano
P.S I've used perl a lot, so having differences between data types someti=
mes=20
is still shocking for me. Perl programmers often forget the difference=20
between apples and grapes, cars and bicycles, cats and dogs. The world te=
nds=20
to become a flattened $ish space.
What? Should I use two different types of food(for(@animals)) for my $cat=
and=20
my $dog?