Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > Tom Lane írta: >> You're missing the hard part: NEXT VALUE FOR is sufficiently different >> from nextval() that it will be very painful to implement. > Do you mean the allowed and denied contexts of the > NEXT VALUE FOR expression in section 6.13?

Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Zoltan Boszormenyi
Tom Lane írta: =?iso-8859-2?Q?B=F6sz=F6rm=E9nyi_Zolt=E1n?= <[EMAIL PROTECTED]> writes: Well, I read all sections of 5WD-02-Foundation-2003-09.pdf where "identity" appears, here are the list of changes that will be needed for an identity column: You're missing the hard part: NEXT VALUE

Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Zoltan Boszormenyi
Hi, Jim C. Nasby írta: On Mon, Jun 12, 2006 at 02:27:31PM +0200, B?sz?rm?nyi Zolt?n wrote: Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: after some experimentation, I came up with the attached patch, which implements parsing the following SERIAL types: As has been pointed

Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Tom Lane
=?iso-8859-2?Q?B=F6sz=F6rm=E9nyi_Zolt=E1n?= <[EMAIL PROTECTED]> writes: > Well, I read all sections of 5WD-02-Foundation-2003-09.pdf > where "identity" appears, here are the list of changes that will > be needed for an identity column: You're missing the hard part: NEXT VALUE FOR is sufficiently d

Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Jim C. Nasby
On Mon, Jun 12, 2006 at 02:27:31PM +0200, B?sz?rm?nyi Zolt?n wrote: > > Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > >> after some experimentation, I came up with the attached patch, > >> which implements parsing the following SERIAL types: > > > > As has been pointed out before, it would be a

Re: [HACKERS] Extended SERIAL parsing

2006-06-12 Thread Böszörményi Zoltán
> Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: >> after some experimentation, I came up with the attached patch, >> which implements parsing the following SERIAL types: > > As has been pointed out before, it would be a seriously bad idea to > implement the SQL syntax for identity columns without

Re: [HACKERS] Extended SERIAL parsing

2006-06-11 Thread Tom Lane
Zoltan Boszormenyi <[EMAIL PROTECTED]> writes: > after some experimentation, I came up with the attached patch, > which implements parsing the following SERIAL types: As has been pointed out before, it would be a seriously bad idea to implement the SQL syntax for identity columns without matching

Re: [HACKERS] Extended SERIAL parsing

2006-06-11 Thread Zoltan Boszormenyi
Rod Taylor írta: The condition (column->is_serial && column->force_default) can help enforcing GENERATED ALWAYS at INSERT time and can also help fixing the two TODO entries about SERIAL. You will need to include the insert components of the spec which allow for overriding GENERATED ALWAYS

Re: [HACKERS] Extended SERIAL parsing

2006-06-11 Thread Rod Taylor
> The condition (column->is_serial && column->force_default) > can help enforcing GENERATED ALWAYS at INSERT time > and can also help fixing the two TODO entries about SERIAL. You will need to include the insert components of the spec which allow for overriding GENERATED ALWAYS during an INSERT an

[HACKERS] Extended SERIAL parsing

2006-06-11 Thread Zoltan Boszormenyi
Hi, after some experimentation, I came up with the attached patch, which implements parsing the following SERIAL types: SERIAL SERIAL GENERATED { ALWAYS | BY DEFAULT } SERIAL GENERATED [ ALWAYS | BY DEFAULT ] AS IDENTITY( sequence options ) The underlying type is still int4 or int8, so the prob