From: | Andreas Kretschmer <akretschmer(at)spamfence(dot)net> |
---|---|
To: | pgsql-de-allgemein(at)postgresql(dot)org |
Subject: | Re: bigint our 4 bytes? |
Date: | 2015-11-29 15:49:35 |
Message-ID: | 20151129154935.GA29924@tux |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-de-allgemein |
Charlie Schaubmair <occurred(at)gmail(dot)com> wrote:
> Hallo,
>
> Meine Installation auf OS X ist:
> 9.4.4
>
> Folgende Tabelle mit Insert scheint leider kein bigint, sondern lediglich ein
> integer mit 4 bytes zu sein:
> CREATE TABLE public.test_big_integer (
> id bigint NULL
> );
>
> INSERT INTO test_big_integer (id) VALUES (3968832031);
>
> SELECT * FROM test_big_integer;
> —> 2147483647
test=*# CREATE TABLE public.test_big_integer (
test(# id bigint NULL
test(# );
CREATE TABLE
test=*#
test=*# INSERT INTO test_big_integer (id) VALUES (3968832031);
INSERT 0 1
test=*#
test=*# SELECT * FROM test_big_integer;
id
------------
3968832031
(1 row)
>
> Es scheint also so, als ob meine installation den Typ "bigint" auch auf 4 bytes
> beschränkt hat und nicht wie eigentlich auf 8 bytes.
>
> Ich bin gerade dabei von MySQL zu PostgreSQL zu wechseln und wundere mich ob
> ich da eventuell bei der Installation/Konfiguration einen Fehler gemacht habe?
>
> Getestet mit folgenden clients:
> SQLPro for Postgres Version 1.0.12
> IntelliJ IDEA 15
Probiere es ZUERST mal in psql. Du wirst sehe: da wird es klappen. Das
Problem scheint beim Client zu liegen. Ändere Dein Insert mal zu:
INSERT INTO test_big_integer (id) VALUES (3968832031::bigint);
vielleicht hilft das schon. Wie gesagt: den Murks macht Dein Client. Hab
erst vor 2 Tagen bei der pgconf.de ein ähnliches Beispiel gehört.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
From | Date | Subject | |
---|---|---|---|
Next Message | Charlie Schaubmair | 2015-11-29 16:00:04 | Re: bigint our 4 bytes? |
Previous Message | Charlie Schaubmair | 2015-11-29 15:26:54 | bigint our 4 bytes? |