Daniel Schuchardt <[EMAIL PROTECTED]> writes:
> i tried a bit with errorhandling and found the following :
> (i want to ignore the dublicate key exception)
> ERROR: SPI_prepare failed for "ROLLBACK": SPI_ERROR_TRANSACTION
You can't use ROLLBACK inside a plpgsql function. I agree that this
error
Hi list,
i tried a bit with errorhandling and found the following :
(i want to ignore the dublicate key exception)
CREATE OR REPLACE FUNCTION test() RETURNS VARCHAR AS'
BEGIN
BEGIN
INSERT INTO table a dublicate key (primary);
EXCEPTION
WHEN OTHERS THEN ROLLBACK;
END;
RETURN ''test'';
END'LA