Re: [HACKERS] question for serial types with CHECK conditions

2007-04-29 Thread Martijn van Oosterhout
On Sat, Apr 28, 2007 at 01:34:15PM -0300, Guido Barosio wrote: > My point was to step on the asumption that the implicit "serial" > call for a type represents the fact that the sequence will start > allways in the same place, unless inmediatelly after your "create > table" you plan to modify that

Re: [HACKERS] question for serial types with CHECK conditions

2007-04-28 Thread Michael Glaesemann
On Apr 28, 2007, at 10:30 , Guido Barosio wrote: Now, my question is: Shouldn't postgresql avoid the creation of the table while a serial type contains a check condition? My question to you is why should it? "a" SERIAL is a shorthand for creating an INTEGER column "a", a sequence ("a_seq

Re: [HACKERS] question for serial types with CHECK conditions

2007-04-28 Thread Guido Barosio
Thanks for your reply Michael. My point was to step on the asumption that the implicit "serial" call for a type represents the fact that the sequence will start allways in the same place, unless inmediatelly after your "create table" you plan to modify that, which makes no sense when we go back

[HACKERS] question for serial types with CHECK conditions

2007-04-28 Thread Guido Barosio
Hey ya, Found a behaviour that caught my attention. While it's not a real problem, and definetely not serious, I realize that it may be good to write about it, cause I couldn't find previous posts on the matter. Basically, I am preparing a presentation for an install party, and while I was ch