pg.ddx.io pgsql-jdbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Updatable/Read-only columns 2+ messages / 2 participants [nested] [flat]
* Updatable/Read-only columns @ 2016-02-06 21:03 Michaël Michaud <m.michael.michaud@orange.fr> 0 siblings, 1 reply; 2+ messages in thread From: Michaël Michaud @ 2016-02-06 21:03 UTC (permalink / raw) To: 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 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Updatable/Read-only columns @ 2016-02-07 11:23 Vladimir Sitnikov <sitnikov.vladimir@gmail.com> parent: Michaël Michaud <m.michael.michaud@orange.fr> 0 siblings, 0 replies; 2+ messages in thread From: Vladimir Sitnikov @ 2016-02-07 11:23 UTC (permalink / raw) To: Michaël Michaud <m.michael.michaud@orange.fr>; +Cc: pgsql-jdbc Hi, Pull requests are welcome. I think the way to go is to update org.postgresql.jdbc.PgResultSetMetaData#fetchFieldMetaData with an expression that is used in information_schema.columns.is_updatable. TravisCI validates all the supported versions, thus we'll know if the change requires some version-specific tweaks. Vladimir -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-02-07 11:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-02-06 21:03 Updatable/Read-only columns Michaël Michaud <m.michael.michaud@orange.fr> 2016-02-07 11:23 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
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