Updatable/Read-only columns - Mailing list pgsql-jdbc

From Michaël Michaud
Subject Updatable/Read-only columns
Date
Msg-id 56B65FBC.7020102@orange.fr
Whole thread Raw
Responses Re: Updatable/Read-only columns  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc
Hi,

First of all, I'm very happy with postgresql and its jdbc driver.
Recently, I wanted to access updatable views and know if some columns
are read-only (like columns defined by an operation)

I looked into DatabaseMataData.getColumns, but the
24.IS_GENERATEDCOLUMN attribute, defines in java7/jdbc4.1 is not
availiable in the current driver which has only 23 attributes (anyway,
I'm not sure what this attribute is supposed to return)

I also looked into ResultSetMetaData.isReadOnly(), but it always return
false. Comments say that "we would have to check the GRANT/REVOKE stuff
for this to be effective". A first step could be to return if the column
cannot be updatable for anybody

Maybe information_schema.columns.isupdatable column could be of any help
to get this information ?

Best regards,

Michaël


pgsql-jdbc by date:

Previous
From: rob stone
Date:
Subject: Re: Unable to connect to 9.5 via JDBC driver 1207
Next
From: Vladimir Sitnikov
Date:
Subject: Re: Updatable/Read-only columns