Re: still problem: inserting into writeable views

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Holger Jakobs <Holger(at)Jakobs(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: still problem: inserting into writeable views
Date: 2008-11-30 04:08:31
Message-ID: 493211BF.10508@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Holger Jakobs wrote:

> Using JDBC (org.postgresql.Driver) produces an error
> org.postgresql.util.PSQLException: FEHLER: kann nicht in eine Sicht einfügen
> (German version, translates as 'ERROR: cannot insert into a view')
>
> Why can't the JDBC driver just leave the decision whether a table/view
> is writeable or not to the database instead of interfering?

I don't see that error message in the JDBC driver's de.po, and there's
no equivalent check or message in the driver that I can see. Are you
sure the error is generated by the driver and not by the backend?

The driver does not modify your INSERTs if you construct & execute them
as queries/updates.

If you are generating your INSERTs implicitly via use of an updateable
ResultSet, then the only extra requirement enforced by the driver is
that it can parse the original SELECT to etermine the table/view to update.

So as far as I know, the driver *does* leave this decision up to the
server. Why do you think this is a driver problem? Do you have a
testcase demonstrating it?

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2008-11-30 04:26:00 Re: still problem: inserting into writeable views
Previous Message Holger Jakobs 2008-11-29 22:20:43 still problem: inserting into writeable views