Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Andrew Sullivan
On Wed, Apr 02, 2014 at 08:17:12AM -0400, loc wrote: > value, MySQL also works this way. With PostgreSQL I will need to do a lot > of code modification to my Aubit4GL programs, since I will need to either > insert with the key word default or omit the serial column in the insert > statement. Why

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Shaun Thomas
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

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread David Johnston
loc wrote > Setting the serial column to null to auto increment would also > work for me. Can you set it to a literal value DEFAULT? Only helps for the insert case (not copy) but that is the mechanism that is used to specify a column and ask for the default. David J. -- View this message in

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Adrian Klaver
On 04/02/2014 05:17 AM, loc wrote: I'm currently using an Informix Innovator-C database with Aubit4GL and I would like to migrate to PostgreSQL, it looks like the transition will not be too difficult, however there is one feature that I would like added to PostgreSQL. Where is the best place to

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Scott Marlowe
On Wed, Apr 2, 2014 at 6:53 AM, Jayadevan M wrote: > Will a rule work? > http://www.postgresql.org/docs/9.3/static/sql-createrule.html There are a couple of issues you face if you use a rule, copy commands ignore rules, and rules are slower. Triggers are almost always better here and really aren

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Jayadevan M
Will a rule work? http://www.postgresql.org/docs/9.3/static/sql-createrule.html On Wed, Apr 2, 2014 at 5:47 PM, loc wrote: > I'm currently using an Informix Innovator-C database with Aubit4GL and I > would like to migrate to PostgreSQL, it looks like the transition will not > be too difficult,

Re: [GENERAL] Insert zero to auto increment serial column

2014-04-02 Thread Albe Laurenz
loc wrote: > I'm currently using an Informix Innovator-C database with Aubit4GL and I > would like to migrate to > PostgreSQL, it looks like the transition will not be too difficult, however > there is one feature that > I would like added to PostgreSQL. Where is the best place to request a > f