parser error: 9223372036854775807

Started by Aurangzeb M. Aghaover 23 years ago3 messagesgeneral
Jump to latest
#1Aurangzeb M. Agha
aagha@bigfoot.com

I'm having an issue moving my DB from from Win (Cygwin) to Linux 7.2. If
I go from Linux to Cygwin, no probs, everything works fine, creates a new
database beautifully.

However, if I take the exact same DB (which contains data) and try the
following on Linux:

%> psql -d cmsdb -f cmsdb.sql

I get the following:

psql:cmsdb.sql:12: ERROR: parser: parse error at or near
"9223372036854775807"
psql:cmsdb.sql:27: NOTICE: CREATE TABLE/PRIMARY KEY will create implicit
index 'ratingcontentandtype_pkey' for table 'rating'

Any table with a serial decleration has this problem, and the serial
tables don't get built. I wondered if this was due to a MAXINT issue on
Linux, so I wrote a small C program wher I found out that the MAXINT and
LONG are both: 2147483647 -- The catch is that the same is true on my Win
box.

What's going on here, and what can I do to get around this problem?

We're on Postgres 7.1.

Thx,
Aurangzeb

--
Aurangzeb M. Agha | Email : aagha@bigfoot.com
| Home : +3 010 8959.558
34 Nafsika St. | Direct: +3 010 8995.875
Voula 16673 | Mobile: TBD
Greece | Voice : 415 412 4234 (US Only)
| e-Fax : 978 246.0770
PGP ID: 0x68B3A763 |

"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

- Benjamin Franklin

#2Bruce Momjian
bruce@momjian.us
In reply to: Aurangzeb M. Agha (#1)
Re: parser error: 9223372036854775807

Try checking 'long long' to see if they are the same sizes. I bet they
aren't. I assume this is i386 Linux.

---------------------------------------------------------------------------

Aurangzeb M. Agha wrote:

I'm having an issue moving my DB from from Win (Cygwin) to Linux 7.2. If
I go from Linux to Cygwin, no probs, everything works fine, creates a new
database beautifully.

However, if I take the exact same DB (which contains data) and try the
following on Linux:

%> psql -d cmsdb -f cmsdb.sql

I get the following:

psql:cmsdb.sql:12: ERROR: parser: parse error at or near
"9223372036854775807"
psql:cmsdb.sql:27: NOTICE: CREATE TABLE/PRIMARY KEY will create implicit
index 'ratingcontentandtype_pkey' for table 'rating'

Any table with a serial decleration has this problem, and the serial
tables don't get built. I wondered if this was due to a MAXINT issue on
Linux, so I wrote a small C program wher I found out that the MAXINT and
LONG are both: 2147483647 -- The catch is that the same is true on my Win
box.

What's going on here, and what can I do to get around this problem?

We're on Postgres 7.1.

Thx,
Aurangzeb

--
Aurangzeb M. Agha | Email : aagha@bigfoot.com
| Home : +3 010 8959.558
34 Nafsika St. | Direct: +3 010 8995.875
Voula 16673 | Mobile: TBD
Greece | Voice : 415 412 4234 (US Only)
| e-Fax : 978 246.0770
PGP ID: 0x68B3A763 |

"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

- Benjamin Franklin

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Aurangzeb M. Agha (#1)
Re: parser error: 9223372036854775807

"Aurangzeb M. Agha" <aagha@bigfoot.com> writes:

I'm having an issue moving my DB from from Win (Cygwin) to Linux 7.2. If
I go from Linux to Cygwin, no probs, everything works fine, creates a new
database beautifully.
However, if I take the exact same DB (which contains data) and try the
following on Linux:
%> psql -d cmsdb -f cmsdb.sql
I get the following:
psql:cmsdb.sql:12: ERROR: parser: parse error at or near
"9223372036854775807"

Any table with a serial decleration has this problem, and the serial
tables don't get built.

We're on Postgres 7.1.

Apparently the Cygwin database is 7.2, which was the first release that
supported int8 sequences. Either update your Linux PG installation, or
be prepared to do some hand editing of the dump file.

regards, tom lane