Re: duplicate key violates unique constraint

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: duplicate key violates unique constraint
Дата
Msg-id 20080226170325.GJ5763@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: duplicate key violates unique constraint  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Список pgsql-sql
Shavonne Marietta Wijesinghe wrote:
> I wrote the query in the SQL windows provided by the pgadmin.

That SQL window only executes SQL, so you can't use PL/pgSQL commands on
it.  PL/pgSQL can only be used in the context of a PL/pgSQL function, so
you need to do CREATE FUNCTION to do that.

If you want to use the SQL window you could use SAVEPOINT and ROLLBACK TO.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: "Bart Degryse"
Дата:
Сообщение: Re: Function returns error (view)
Следующее
От: "Rodrigo E. De León Plicet"
Дата:
Сообщение: Re: duplicate key violates unique constraint