dbTalk Databases Forums  

[Info-Ingres] System generated sequences.

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] System generated sequences. in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Bowes
 
Posts: n/a

Default [Info-Ingres] System generated sequences. - 08-21-2012 , 03:57 AM






Hi All,

Here's an idea ... a data type which implements an anonymous system generated sequence tied to the column, auto generated at table create.

The data type would be sequence4 or sequence8 (for basing on data type integer4 or integer8). The sequenceN type by definition has a default value taken from the anonymous sequence used to support it.
On creation you could specify a start number, an increment, and probably the majority of the full sequence create stuff.

alter table alter column could specify a restart number.

So we could see something like:...
create table x(
a sequence4 not null start with 100 increment by 10,
....
)...

Thoughts?

Martin Bowes

Reply With Quote
  #2  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-21-2012 , 07:15 AM






Ahhh it helps to read the manual...

What I want is almost covered by the identity column attribute you can use when creating an integer4 or integer8 column in a table.

The only fly in the ointment is that the table can only have one identity column...which seems a very artificial restraint.

Anyone have any idea why this should be limited?

Marty

From: Martin Bowes [mailto:martin.bowes (AT) ctsu (DOT) ox.ac.uk]
Sent: 21 August 2012 09:58
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] System generated sequences.

Hi All,

Here's an idea ... a data type which implements an anonymous system generated sequence tied to the column, auto generated at table create.

The data type would be sequence4 or sequence8 (for basing on data type integer4 or integer8). The sequenceN type by definition has a default value taken from the anonymous sequence used to support it.

On creation you could specify a start number, an increment, and probably the majority of the full sequence create stuff.

alter table alter column could specify a restart number.

So we could see something like:...
create table x(
a sequence4 not null start with 100 increment by 10,
....
)...

Thoughts?

Martin Bowes

Reply With Quote
  #3  
Old   
Ingres Forums
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-21-2012 , 08:11 AM



Having more than one risks having an identity crisis.

Jeremy


--
jruffer

Reply With Quote
  #4  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-21-2012 , 08:52 AM



Quote:
Having more than one risks having an identity crisis.
Oh that's why!

Well played Sir!

Marty

Reply With Quote
  #5  
Old   
Roger L. Whitcomb
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-21-2012 , 01:20 PM



And leaves you open for identity theft...

~Roger Whitcomb

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Martin Bowes
Sent: Tuesday, August 21, 2012 6:53 AM
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] System generated sequences.

Quote:
Having more than one risks having an identity crisis.
Oh that's why!

Well played Sir!

Marty


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
  #6  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-22-2012 , 01:59 AM



Quote:
And leaves you open for identity theft...
Damn! I'm annoyed I didn't see that one coming.

Marty

Reply With Quote
  #7  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] System generated sequences. - 08-22-2012 , 03:49 AM



And Geraint Jones just quipped 'You started an identity parade'....

The hits just keep on coming.

Marty

-----Original Message-----
From: Martin Bowes [mailto:martin.bowes (AT) ctsu (DOT) ox.ac.uk]
Sent: 22 August 2012 08:00
To: Ingres and related product discussion forum
Cc: Roger L. Whitcomb
Subject: Re: [Info-Ingres] System generated sequences.

Quote:
And leaves you open for identity theft...
Damn! I'm annoyed I didn't see that one coming.

Marty


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.