Re: BUG #11702: Identity column error - Mailing list pgsql-bugs

From David G Johnston
Subject Re: BUG #11702: Identity column error
Date
Msg-id 1413564758999-5823453.post@n5.nabble.com
Whole thread Raw
In response to BUG #11702: Identity column error  (abhishekmvn@gmail.com)
List pgsql-bugs
abhishekmvn wrote
> The following bug has been logged on the website:
>
> Bug reference:      11702
> Logged by:          Abhishek
> Email address:

> abhishekmvn@

> PostgreSQL version: 9.3.3
> Operating system:   Windows 7
> Description:
>
> How do i restrict the Server not to accept a manual insertion of identity
> column value. This is causing an exception in the App when we have
> multiple
> users using the same table and one of them doing a insertion of value in
> Identity column.
> Expecting a reply from you.

This is not a bug.  In the future reports of this nature should be directed
to the general mailing list.

When you give the users in question permission to INSERT on the table you
have to specify the columns they are allowed to insert to.

http://www.postgresql.org/docs/9.4/interactive/sql-grant.html

Per the comment for "INSERT" all other columns will be forced to receive
default values.

Given: tablea (id, val)
GRANT INSERT (val) ON TABLE tablea TO ...;

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-11702-Identity-column-error-tp5823423p5823453.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: jaime soler
Date:
Subject: Re: ARMv5
Next
From: karl.bartel@adspert.de
Date:
Subject: BUG #11703: ERROR: variable not found in subplan target list