Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aSAcW-0002ua-QH for pgsql-jdbc@arkaria.postgresql.org; Sat, 06 Feb 2016 21:42:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aSAcV-0007br-Jk for pgsql-jdbc@arkaria.postgresql.org; Sat, 06 Feb 2016 21:42:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aSA1d-0000aL-Cq for pgsql-jdbc@postgresql.org; Sat, 06 Feb 2016 21:04:13 +0000 Received: from smtp12.smtpout.orange.fr ([80.12.242.134] helo=smtp.smtpout.orange.fr) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aSA1Y-0002aJ-Ax for pgsql-jdbc@postgresql.org; Sat, 06 Feb 2016 21:04:10 +0000 Received: from [192.168.1.11] ([86.252.189.110]) by mwinf5d35 with ME id F9451s0052PMbkN03945bu; Sat, 06 Feb 2016 22:04:05 +0100 X-ME-Helo: [192.168.1.11] X-ME-Auth: bS5taWNoYWVsLm1pY2hhdWRAd2FuYWRvby5mcg== X-ME-Date: Sat, 06 Feb 2016 22:04:05 +0100 X-ME-IP: 86.252.189.110 To: pgsql-jdbc@postgresql.org From: =?UTF-8?Q?Micha=c3=abl_Michaud?= Subject: Updatable/Read-only columns Message-ID: <56B65FBC.7020102@orange.fr> Date: Sat, 6 Feb 2016 22:03:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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