Skip site navigation (1) Skip section navigation (2)

JDBC ResultSetMetaData.getColumnType and getColumnTypeName work properly?

From: Shankha Mitra <ssm(at)antrim(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: JDBC ResultSetMetaData.getColumnType and getColumnTypeName work properly?
Date: 1998-12-26 06:42:42
Message-ID: 36848562.83920B1D@antrim.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
If I create a table thus:

CREATE TABLE title (
	title		text	NOT NULL,
	editions	int4[]
);

and through the JDBC ResultMetaData.getColumnType() interface try to get
the
type of the 'editions' column, I get the value sql.Types.OTHER.  I would
have
guessed it would have been Types.ARRAY.  Am I missing something?

Also getColumnTypeName() returns _int4; is that correct?

Shankha Mitra


As an aside, I decided to print out the values of all the JDBC types and
I get:
ARRAY=2003
BIGINT=-5
BINARY=-2
BIT=-7
BLOB=2004
CHAR=1
CLOB=2005
DATE=91
DECIMAL=3
DISTINCT=2001
DOUBLE=8
FLOAT=6
INTEGER=4
JAVA_OBJECT=2000
LONGVARBINARY=-4
LONGVARCHAR=-1
NULL=0
NUMERIC=2
OTHER=1111
REAL=7
REF=2006
SMALLINT=5
STRUCT=2002
TIME=92
TIMESTAMP=93
TINYINT=-6
VARBINARY=-3
VARCHAR=12

Responses

pgsql-interfaces by date

Next:From: cheng wah yeungDate: 1998-12-27 08:29:54
Subject:
Previous:From: Mark NielsenDate: 1998-12-23 01:42:01
Subject: my perl interface to postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group