?How create a one serial decimal(500,0) column or simulate it withbigint multicolumns serial? - Mailing list pgsql-novice

Hi! All!

I Need create a one decimal serial column or simulate it with multiple columns of bigint.

gaps don't are problem.

pseudo-code:

create table bank (
  id0 decimal( 500, 0) not null auto-increment,
  etc text
)

or

create table bank (
  id0 bigint not null,
  id1 bigint not null,
  id2 bigint not null,
  idn bigint not null,
  etc text
  primary key(id0, id1, id2, idn),
  auto_increment(id0, id1, id2, idn)
)

How a example of behavior (using a range of 1 .. 3)

insert into bank(etc) Values "3*3*3 times 'Thanks'";

select * from bank;

id0  id1 id2 idn text
1     1   1    1   T
1     1   1    2   T
1     1   1    3   T
1     1   2    1   T
1     1   2    2   T
1     1   2    3   T
1     1   3    1   T
1     1   3    2   T
1     1   3    3   T
1     2   1    1   T
etc.


Thanks So Much!!!!

[]'s Dani. :-)


--
"There are many plans in the Human heart, But
 is the Lord's Purpose that prevails"

"Existem Muitos planos e desejos no coração Humano, MAS
são os Propósitos do Senhor que prevalecem"

  []'s Dani:-)

pgsql-novice by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Tablespaces
Next
From: Andreas Kretschmer
Date:
Subject: Re: ?How create a one serial decimal(500,0) column or simulate it with bigint multicolumns serial?