Re: Insert zero to auto increment serial column
От | Shaun Thomas |
---|---|
Тема | Re: Insert zero to auto increment serial column |
Дата | |
Msg-id | 533C1AF6.10502@optionshouse.com обсуждение исходный текст |
Ответ на | Re: Insert zero to auto increment serial column (Scott Marlowe <scott.marlowe@gmail.com>) |
Список | pgsql-general |
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@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
В списке pgsql-general по дате отправления: