| От | Inoqulath |
|---|---|
| Тема | SQL Newbie Question |
| Дата | |
| Msg-id | epaifs$2c92$1@news.hub.org обсуждение |
| Ответы |
Re: SQL Newbie Question
Re: SQL Newbie Question |
| Список | pgsql-general |
Hello Folks Have a look at this Table: CREATE TABLE foo( id serial, a_name text, CONSTRAINT un_name UNIQUE (a_name)); Obviously, inserting a string twice results in an error (as one would expect). But: is there any known possibility to ingnore an errorneous INSERT like SQLite's "conflict algorithm" (SQLite:"INSERT OR [IGNORE|ABORT] INTO foo [...]")? I tried to use a trigger before INSERT takes place, but it seems that before firing a trigger the constraints are checked... Background: I'd like to INSERT a few thousand lines in one transaction, where some values will be appear twice. thx in Advance
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера