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

From: Dani <danielcheagle(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: ?How create a one serial decimal(500,0) column or simulate it with bigint multicolumns serial?
Date: 2018-01-07 06:17:29
Message-ID: CAEXvJLfO6-=6jBe+kdSV3eOV4SACttkqYu9A59qjqKE_MBk6-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:-)

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2018-01-07 08:27:21 Re: ?How create a one serial decimal(500,0) column or simulate it with bigint multicolumns serial?
Previous Message Alvaro Herrera 2018-01-04 21:05:27 Re: Tablespaces