Re: Conditional INSERT: if not exists

Поиск
Список
Период
Сортировка
От Don Morrison
Тема Re: Conditional INSERT: if not exists
Дата
Msg-id aee6519f0608221630w164005f4yd26092d074988786@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Conditional INSERT: if not exists  ("Don Morrison" <donmorrison@gmail.com>)
Список pgsql-novice
> > > I want to insert a row unless it exists already.  Do I have to write a
> > > stored procedure to do this?
> >[...]
> > isn't a problem.  If you need to do this in a transaction, you can
> > simply set savepoints and roll back to the savepoint if an insert fails
> > (and you expected that it could).
> Yes, that's the problem: I have it in one transaction which I don't
> want to fail on error.  I'll look into the savepoint method.
> Specifically the transaction I'm writing is a "Z SQL Method" in Zope
> (a page templating system and web server).

I'll have to upgrade to PostgreSQL 8.X. :( 7.X doesn't have savepoint.

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

Предыдущее
От: Srinivas Iyyer
Дата:
Сообщение: Re: problem with single quote : ' Problem solved
Следующее
От: Keith Worthington
Дата:
Сообщение: protecting a database