| От | knut.suebert@web.de |
|---|---|
| Тема | Re: oids vs. serial question |
| Дата | |
| Msg-id | 20020303222835.GA1605@web.de обсуждение исходный текст |
| Ответ на | oids vs. serial question (Alex Rice <alex_rice@arc.to>) |
| Список | pgsql-general |
Alex Rice schrieb:
> I am considering using OIDs for my application. I like the fact that
> they are just automagic. However, the magic seems to disappear when it
Hi,
as far as I understood the thing, take OIDs as 'internal' (they are
unique all over all databases) and do not use them to organize your
data.
> CREATE TABLE park (
> region_oid oid references region,
> primary key (oid),
> ...
> );
>
> CREATE TABLE region (
> PRIMARY KEY (oid),
> ...
> ) ;
Something like
CREATE TABLE park (
id serial primary key,
region int4 references region,
...
);
CREATE TABLE region (
id serial primary key,
...
) ;
should work.
Is SERIAL still INT4 in v7.2?
Bye,
Knut Sübert
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера