Re: getting trigger to work

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Merrill Oveson <merrill(at)actarg(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: getting trigger to work
Date: 2002-03-19 17:14:24
Message-ID: 1016558064.25779.49.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2002-03-19 at 15:46, Merrill Oveson wrote:

> The error is "Attribute 'a1000' not found"
>
> The column pros_id is char(5).
> How do I put in the 'A1000'?

new.pros_id:= ''A1000'';

Your first example used a number, which was automatically converted to a
char for comparison.

The second was interpreted as an identifier and lower-cased, but you had
no attribute in the table called "a1000". You need to put it in single
quotes to have it treated as a char constant; since you are inside a
plpgsql program declaration, the quotes need to be doubled up.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

" And God shall wipe away all tears from their eyes;
and there shall be no more death, neither sorrow, nor
crying, neither shall there be any more pain: for the
former things are passed away."
Revelations 21:4

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Travis Bauer 2002-03-19 17:38:58 PL/PGSQL and PL/Perl time issues
Previous Message Antonio Sergio de Mello e Souza 2002-03-19 16:50:21 Re: getting trigger to work