Constraint validation

Поиск
Список
Период
Сортировка
От Demian Lessa
Тема Constraint validation
Дата
Msg-id 45E772E3.4060007@lessa.org
обсуждение исходный текст
Ответы Re: Constraint validation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

After browsing the source, and running some experiments, it seems like
PostgreSQL blindly verifies all CHECK constraints for an update, even if
the update COULDN'T possibly be violated by the specified update (for
instance

  UPDATE table SET field3=value WHERE condition

and there is no CHECK constraint on field3. I compared my observations
with what I saw by running the same experiments in Oracle, and they seem
to verify constraints selectively.

Two questions: is there a reason for this behavior in PostgreSQL? and,
does this also hold for other constraints such as PRIMARY KEYs, UNIQUEs,
and FOREIGN KEYs?

Thanks,

Demian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFF53LXWs7G5iIp9akRAiQHAJ4nxqKt/gH2SVqDYxS+8bcTpHIt6gCeL/HH
ZhpTHmGPQ9qaylyBZiBaBw4=
=pnf6
-----END PGP SIGNATURE-----

В списке pgsql-general по дате отправления:

Предыдущее
От: "Postgres User"
Дата:
Сообщение: Fun with Cursors- how to rewind a cursor
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Fun with Cursors- how to rewind a cursor