Search Postgresql Archives

Re: Insert zero to auto increment serial column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/02/2014 08:24 AM, Scott Marlowe wrote:

Triggers are almost always better here and really aren't that hard to
write.

Not only do I have to agree with this statement, I feel it's important to add a clarification regarding your original question.

Translating serial values submitted as 0 to something else is will likely never be a PostgreSQL feature, as it is probably a violation of the SQL standard. Databases are meant to store exactly what you submit, barring any modifications by stored procedure or trigger.

If a database engine takes it upon itself to modify your data, it is no longer a database, but an application that mimics one.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas@xxxxxxxxxxxxxxxx

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux