From: Michaël Michaud <m.michael.michaud@orange.fr>
To: pgsql-jdbc@postgresql.org
Subject: Updatable/Read-only columns
Date: Sat, 6 Feb 2016 22:03:56 +0100
Message-ID: <56B65FBC.7020102@orange.fr> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: m.michael.michaud@orange.fr
Subject: Re: Updatable/Read-only columns
In-Reply-To: <56B65FBC.7020102@orange.fr>
References: <56B65FBC.7020102@orange.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox