Re: Bigint in sequences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Garo Hussenjian <garo(at)xapnet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bigint in sequences
Date: 2002-08-31 14:01:39
Message-ID: 15697.1030802499@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Garo Hussenjian <garo(at)xapnet(dot)com> writes:
> I'm using pg_dump to port a database from one server to another, and I've
> found that the max_value of several sequences are 9223372036854775807 (type
> bigint), but most of the sequences' max_values are 2147483647 (also bigint,
> but not so big...). The larger value is causing errors when I try to import
> the database.
> Does this have to do with the OS or the postgres version? The source
> database is version 7.2.1, and the destination is 7.1.3. Did 7.2 raise the
> upper limit of bigint?

No, but sequences were based on int before 7.2. You seem to have
a mix of sequences dumped-and-reloaded from 7.1 and sequences made
natively in 7.2. If you want to load this dump in 7.1, I'd recommend
just editing out the clauses that specify the sequence upper limit ---
these are really all "default" anyway.

As a general rule, back-porting PG databases to older versions is a
recipe for headaches. My real recommendation is to update the
destination machine to 7.2.2 ;-)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mordicus 2002-08-31 15:38:15 ODBC Driver
Previous Message Fabiàn R.Breschi 2002-08-31 13:47:51 Internationalisation support.