Re: Stored procedure - Mailing list pgsql-general

From Ragnar
Subject Re: Stored procedure
Date
Msg-id 1135341624.803.63.camel@localhost.localdomain
Whole thread Raw
In response to Re: Stored procedure  (Jaime Casanova <systemguards@gmail.com>)
List pgsql-general
On Thu, 2005-12-22 at 12:42 -0500, Jaime Casanova wrote:
> On 12/22/05, Ted Byers <r.ted.byers@rogers.com> wrote:
> >
> > INSERT INTO foo (auto,text)
> >     VALUES(NULL,'text');              # generate ID by inserting NULL
>
> and this of course is bad... if a insert NULL i want the NULL to be inserted.
> SQL Standard way of doing things is "ommiting the auto incremental fld at all"
>
> INSERT INTO foo (text) VALUES ('text');

and then there is the god old DEFAULT value:

  INSERT INTO foo (auto,text) VALUES(DEFAULT,'text');


gnari



pgsql-general by date:

Previous
From: Marko Kreen
Date:
Subject: Re: Why is create function bringing down the Backend server?
Next
From: Karsten Hilbert
Date:
Subject: Re: Inheritance Algebra