Re: [phpOpenTracker-User] Duplicate key insertion (bug?) with postgreSQL

Sebastian Bergmann <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.general
Organization www.sebastian-bergmann.de
Message-ID <[email protected]>
Jean-Christian Imbeault wrote:
> create or replace function pot_doc_dup_check() returns trigger as '
> BEGIN
>   PERFORM 1 FROM pot_documents WHERE data_id=NEW.data_id LIMIT 1;
>   IF FOUND THEN
>       RETURN null;
>   END IF;
>   RETURN NEW;
> END;
> ' LANGUAGE 'plpgsql' with (iscachable);

  This looks like a sound approach, however I get an

    ERROR: language "plpgsql" does not exist

  with PostgreSQL 7.3.3.

-- 
Sebastian Bergmann
http://sebastian-bergmann.de/                   http://phpOpenTracker.de/

Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.