Why wouldn't you just use a unique index or perhaps the primary key? -----Original Message----- From: Andy Lewis <alewis@themecca.net> To: pgsql general mailing list <pgsql-general@postgreSQL.org> Date: Monday, April 26, 1999 7:52 AM Subject: [GENERAL] Trigger or Rule? >I have a table that among other things has a name, address, city, state >fields. When I insert into, I want to be able to make sure that there is >no duplicate records or that a row is inserted that is already in the DB. > >Question number one is: Should I use a trigger or a rule? > >And request number two is perhaps a sample that could get me started. > >I've read thru the Documentation and Man pages and tried creating a rule >but, had no luck. > >Thanks in advance. > >Andy > > >
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера