2009/7/4 Dilm E.I.R.L <i.d...@yahoo.es>:
> Hola nuevamente, quisiera una recomendacion, tengo un tabla que tiene un
> campo correlativo (bigserial) y quiero extraer ese  codigo y colocarlo en
> una tabla detalle, pero nose si usar integer(4 bytes) o bigint (8 bytes)
>

Hola,

La respuesta a tu pregunta esta en la documentación,
http://www.postgresql.org/docs/8.4/static/datatype-numeric.html#DATATYPE-SERIAL

"The data types serial and bigserial are not true types, but merely a
notational convenience for creating unique identifier columns (similar
to the AUTO_INCREMENT property supported by some other databases)"

BIGSERIAL es en realidad BIGINT.
SERIAL  es en realidad INTEGER.

Entonces, si en realidad necesitas usar BIGSERIAL como indice en una
tabla, una FK debería ser BIGINT.

Saludos
--
TIP 2: puedes desuscribirte de todas las listas simultáneamente
    (envía "unregister TuDirecciónDeCorreo" a majord...@postgresql.org)

Responder a