?How create a one serial decimal(500,0) column or simulate it withbigint multicolumns serial?

Поиск
Список
Период
Сортировка
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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Tablespaces
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: ?How create a one serial decimal(500,0) column or simulate it with bigint multicolumns serial?