Gary Stainburn wrote:
>
> I found that the compile error complaining about the 'OR' was on the
>
> CREATE OR REPLACE FUNCTION
>
> line. I removed the 'OR REPLACE' and everything worked fine.
OR REPLACE is since postgres 7.2
>
>
> Also I had to change the returns to 'opaque' and 'return 0' to 'return
> null'
In this case it's ok to "return null", but if you create "before"
trigger you shoud "return new", because "return null" forces postgres
not to insert any data.
Tomasz Myrta