pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
5+ messages / 4 participants
[nested] [flat]
* BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
@ 2016-10-26 09:24 grygoriy.gonchar@kreditech.com
0 siblings, 2 replies; 5+ messages in thread
From: grygoriy.gonchar@kreditech.com @ 2016-10-26 09:24 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14397
Logged by: Grygoriy Gonchar
Email address: grygoriy.gonchar@kreditech.com
PostgreSQL version: 9.5.4
Operating system: x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.2
Description:
I have a view defined as:
CREATE OR REPLACE VIEW TEST AS SELECT * FROM TEST_1 WITH CASCADED CHECK
OPTION;
This is necessary to abstract from table name while application code is
working via view name (to implement a kind of simple partitioning)
When I run the following query on view:
insert into test (c1, c2, c3) values (?, ?, ?) on conflict (c1, c2) do
update set c3=excluded.c3
I get the following error:
An exception or error caused a run to abort: ERROR: ON CONFLICT is not
supported on table "test" used as a catalog table
Position: 98
org.postgresql.util.PSQLException: ERROR: ON CONFLICT is not supported on
table "encrypted_value" used as a catalog table
Position: 98
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2310)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2023)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:217)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:421)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
at
org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:137)
If I run the same query without prepared statement from command line all
works fine
If I run the same query on table directly all works fine both from command
line and PgPreparedStatement
Looks to me like a bug with PgPreparedStatement
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
@ 2016-10-31 16:55 Peter Geoghegan <pg@heroku.com>
parent: grygoriy.gonchar@kreditech.com
1 sibling, 0 replies; 5+ messages in thread
From: Peter Geoghegan @ 2016-10-31 16:55 UTC (permalink / raw)
To: grygoriy.gonchar@kreditech.com; +Cc: pgsql-bugs
On Wed, Oct 26, 2016 at 2:24 AM, <grygoriy.gonchar@kreditech.com> wrote:
> If I run the same query on table directly all works fine both from command
> line and PgPreparedStatement
>
> Looks to me like a bug with PgPreparedStatement
Have you reported the bug to pgjdbc?
--
Peter Geoghegan
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
@ 2016-10-31 17:09 David G. Johnston <david.g.johnston@gmail.com>
parent: grygoriy.gonchar@kreditech.com
1 sibling, 1 reply; 5+ messages in thread
From: David G. Johnston @ 2016-10-31 17:09 UTC (permalink / raw)
To: grygoriy.gonchar@kreditech.com; +Cc: pgsql-bugs
On Wed, Oct 26, 2016 at 2:24 AM, <grygoriy.gonchar@kreditech.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14397
> Logged by: Grygoriy Gonchar
> Email address: grygoriy.gonchar@kreditech.com
> PostgreSQL version: 9.5.4
> Operating system: x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.2
> Description:
>
> [...]
>
>
> An exception or error caused a run to abort: ERROR: ON CONFLICT is not
> supported on table "test" used as a catalog table
>
Any chance you cross-posted this to Stack Overflow? A Google search on
"used as a catalog table" turns up a post from 5 days ago that is awfully
similar.
http://stackoverflow.com/questions/40260920/updatable-view-doesnt-work-with-on-conflict-in-postgres-...
The conclusion there is that we seem to have a RLS interaction failure. I
suspect this isn't a code bug but a known, if under-documented, limitation
though others more versed with these two features need to chime in.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
@ 2016-10-31 17:27 Grygoriy Gonchar <grygoriy.gonchar@kreditech.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Grygoriy Gonchar @ 2016-10-31 17:27 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; pg@heroku.com; +Cc: pgsql-bugs
Hi David and Peter,
Yes, I did this cross posting to http://stackoverflow.com/
questions/40260920/updatable-view-doesnt-work-with-on-
conflict-in-postgres-9-5 So it's not a bug but a limitation which is quite
logical but is not reflected in documentation. According to Postgres bug
reporting guideline
<https://www.postgresql.org/docs/current/static/bug-reporting.html; "If it
is not clear from the documentation whether you can do something or not,
please report that too; it is a bug in the documentation" should I create a
separate bug to improve documentation or can we use this one?
Thanks,
Grygoriy
On Mon, Oct 31, 2016 at 6:09 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:
>
>
> On Wed, Oct 26, 2016 at 2:24 AM, <grygoriy.gonchar@kreditech.com> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 14397
>> Logged by: Grygoriy Gonchar
>> Email address: grygoriy.gonchar@kreditech.com
>> PostgreSQL version: 9.5.4
>> Operating system: x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.2
>> Description:
>>
>> [...]
>>
>>
>> An exception or error caused a run to abort: ERROR: ON CONFLICT is not
>> supported on table "test" used as a catalog table
>>
>
> Any chance you cross-posted this to Stack Overflow? A Google search on
> "used as a catalog table" turns up a post from 5 days ago that is awfully
> similar.
>
> http://stackoverflow.com/questions/40260920/updatable-view-
> doesnt-work-with-on-conflict-in-postgres-9-5
>
> The conclusion there is that we seem to have a RLS interaction failure.
> I suspect this isn't a code bug but a known, if under-documented,
> limitation though others more versed with these two features need to chime
> in.
>
> David J.
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement
@ 2016-10-31 17:30 David G. Johnston <david.g.johnston@gmail.com>
parent: Grygoriy Gonchar <grygoriy.gonchar@kreditech.com>
0 siblings, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2016-10-31 17:30 UTC (permalink / raw)
To: Grygoriy Gonchar <grygoriy.gonchar@kreditech.com>; +Cc: Peter Geoghegan <pg@heroku.com>; pgsql-bugs
On Mon, Oct 31, 2016 at 10:27 AM, Grygoriy Gonchar <
grygoriy.gonchar@kreditech.com> wrote:
>
> On Mon, Oct 31, 2016 at 6:09 PM, David G. Johnston <
> david.g.johnston@gmail.com> wrote:
>
>>
>>
>> On Wed, Oct 26, 2016 at 2:24 AM, <grygoriy.gonchar@kreditech.com> wrote:
>>
>>> The following bug has been logged on the website:
>>>
>>> Bug reference: 14397
>>> Logged by: Grygoriy Gonchar
>>> Email address: grygoriy.gonchar@kreditech.com
>>> PostgreSQL version: 9.5.4
>>> Operating system: x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.2
>>> Description:
>>>
>>> [...]
>>>
>>>
>>> An exception or error caused a run to abort: ERROR: ON CONFLICT is not
>>> supported on table "test" used as a catalog table
>>>
>>
>> Any chance you cross-posted this to Stack Overflow? A Google search on
>> "used as a catalog table" turns up a post from 5 days ago that is awfully
>> similar.
>>
>> http://stackoverflow.com/questions/40260920/updatable-view-
>> doesnt-work-with-on-conflict-in-postgres-9-5
>>
>> The conclusion there is that we seem to have a RLS interaction failure.
>> I suspect this isn't a code bug but a known, if under-documented,
>> limitation though others more versed with these two features need to chime
>> in.
>>
>> David J.
>>
> """
Hi David and Peter,
Yes, I did this cross posting to
http://stackoverflow.com/questions/40260920/updatable-view-doesnt-work-with-on-conflict-in-postgres-...
So it's not a bug but a limitation which is quite logical but is not
reflected in documentation. According to Postgres bug reporting guideline
"If it is not clear from the documentation whether you can do something or
not, please report that too; it is a bug in the documentation" should I
create a separate bug to improve documentation or can we use this one?
"""
Please don't top-post and, in the future, mention any cross-posting that
you do.
This bug report will suffice as a request for improved documentation if
indeed that is the ultimate problem.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-10-31 17:30 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 09:24 BUG #14397: Updatable VIEW doesn't work with ON CONFLICT from PgPreparedStatement grygoriy.gonchar@kreditech.com
2016-10-31 16:55 ` Peter Geoghegan <pg@heroku.com>
2016-10-31 17:09 ` David G. Johnston <david.g.johnston@gmail.com>
2016-10-31 17:27 ` Grygoriy Gonchar <grygoriy.gonchar@kreditech.com>
2016-10-31 17:30 ` David G. Johnston <david.g.johnston@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