Re: BUG #11702: Identity column error

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11702: Identity column error
Date: 2014-10-17 16:52:39
Message-ID: 1413564758999-5823453.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message finkel 2014-10-17 19:42:58 BUG #11705: \d(escribe) table shows incorrect check constraint
Previous Message karl.bartel 2014-10-17 16:22:36 BUG #11703: ERROR: variable not found in subplan target list