Обсуждение: New sequence in 1.8.1
Hi team,<br /><br />I've noticed a small bug in 1.8.1 on Windows XP (SP2).<br /><br />If I create a new table, and add anew serial column to it before OK'ing the "create table" dialog, the "sequence" drop-down remains disabled for the column.<br /><br />If I create a table, and OK the dialog without any columns in, then go back and modify the table and adda new serial column to it, the "sequence" drop-down is enabled correctly.<br /><br />Regards,<br /><br />Andy <br />
Andy Shellam wrote: > I've noticed a small bug in 1.8.1 on Windows XP (SP2). > > If I create a new table, and add a new serial column to it before OK'ing > the "create table" dialog, the "sequence" drop-down remains disabled for > the column. > > If I create a table, and OK the dialog without any columns in, then go > back and modify the table and add a new serial column to it, the > "sequence" drop-down is enabled correctly. > I just had a quick look and you're right. Behaviour is different when table is already created. I think we need to fix this so the behavior remains consistent. I'm not sure what value has the "<new sequence>" text. So should we add this text when we add a serial column at table creation time or should we suppress this text ? -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
On 14/01/2008, Guillaume Lelarge <guillaume@lelarge.info> wrote: > Andy Shellam wrote: > > I've noticed a small bug in 1.8.1 on Windows XP (SP2). > > > > If I create a new table, and add a new serial column to it before OK'ing > > the "create table" dialog, the "sequence" drop-down remains disabled for > > the column. > > > > If I create a table, and OK the dialog without any columns in, then go > > back and modify the table and add a new serial column to it, the > > "sequence" drop-down is enabled correctly. > > > > I just had a quick look and you're right. Behaviour is different when > table is already created. I think we need to fix this so the behavior > remains consistent. I'm not sure what value has the "<new sequence>" > text. So should we add this text when we add a serial column at table > creation time or should we suppress this text ? Yeah, that box just doesn't work when the dialogue is called from the table dialogue (even when the control is enabled) - it tries to do things that just aren't possible given the way the two dialogues communicate. It also doesn't do anything when changing an existing column because at that point it thinks the column is an integer column with a default value. I'm of half a mind to remove the sequence combo box altogether. Thoughts? /D
Hi Dave,
I see your point about it not doing anything after the column is created, as a serial column is just an integer column with a new default value. I liked the idea of being able to specify a different sequence to use with the serial column, but having said that I can't think of many uses where you'd want to!
Unless you can make the sequence combo of any use (e.g. to change the default sequence used when creating the column) I'd say get rid of it!
Thanks,
Andy
I see your point about it not doing anything after the column is created, as a serial column is just an integer column with a new default value. I liked the idea of being able to specify a different sequence to use with the serial column, but having said that I can't think of many uses where you'd want to!
Unless you can make the sequence combo of any use (e.g. to change the default sequence used when creating the column) I'd say get rid of it!
Thanks,
Andy
On 1/14/08, Dave Page <dpage@postgresql.org > wrote:
On 14/01/2008, Guillaume Lelarge < guillaume@lelarge.info> wrote:
> Andy Shellam wrote:
> > I've noticed a small bug in 1.8.1 on Windows XP (SP2).
> >
> > If I create a new table, and add a new serial column to it before OK'ing
> > the "create table" dialog, the "sequence" drop-down remains disabled for
> > the column.
> >
> > If I create a table, and OK the dialog without any columns in, then go
> > back and modify the table and add a new serial column to it, the
> > "sequence" drop-down is enabled correctly.
> >
>
> I just had a quick look and you're right. Behaviour is different when
> table is already created. I think we need to fix this so the behavior
> remains consistent. I'm not sure what value has the "<new sequence>"
> text. So should we add this text when we add a serial column at table
> creation time or should we suppress this text ?
Yeah, that box just doesn't work when the dialogue is called from the
table dialogue (even when the control is enabled) - it tries to do
things that just aren't possible given the way the two dialogues
communicate. It also doesn't do anything when changing an existing
column because at that point it thinks the column is an integer column
with a default value.
I'm of half a mind to remove the sequence combo box altogether.
Thoughts?
/D
On 14/01/2008, Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote: > Hi Dave, > > I see your point about it not doing anything after the column is created, as > a serial column is just an integer column with a new default value. I liked > the idea of being able to specify a different sequence to use with the > serial column, but having said that I can't think of many uses where you'd > want to! > > Unless you can make the sequence combo of any use (e.g. to change the > default sequence used when creating the column) I'd say get rid of it! Thanks Andy. Any more opinions before I start pulling code? /D
Dave Page wrote: > On 14/01/2008, Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote: >> Hi Dave, >> >> I see your point about it not doing anything after the column is created, as >> a serial column is just an integer column with a new default value. I liked >> the idea of being able to specify a different sequence to use with the >> serial column, but having said that I can't think of many uses where you'd >> want to! >> >> Unless you can make the sequence combo of any use (e.g. to change the >> default sequence used when creating the column) I'd say get rid of it! > > Thanks Andy. Any more opinions before I start pulling code? > Getting rid of it seems better to me. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
On 15/01/2008, Guillaume Lelarge <guillaume@lelarge.info> wrote: > >> Unless you can make the sequence combo of any use (e.g. to change the > >> default sequence used when creating the column) I'd say get rid of it! > > > > Thanks Andy. Any more opinions before I start pulling code? > > > > Getting rid of it seems better to me. OK, I've pulled it out completely. The only thing it did that you couldn't do yourself by editing the column default value directly was create the sequence at the same time and attempt to create the correct dependency information in the catalogs. That only worked if you were a superuser though, and as we've found, the whole thing only worked if you edited an existing table in one particular way. Anyhoo, it would be good if this could be tested some more in the next day or - I can send you a Win32 binary if you like Andy? Thanks, Dave