| From: | Harald Fuchs <hf0614x(at)protecting(dot)net> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: ERROR: syntax error at or near "select" at character 9 |
| Date: | 2005-09-06 08:57:58 |
| Message-ID: | 871x427euh.fsf@srv.protecting.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
In article <20050905213103(dot)F5782(at)megazone(dot)bigpanda(dot)com>,
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> On Fri, 2 Sep 2005, [ISO-8859-2] Graf László wrote:
>>
>> CREATE FUNCTION test_verif() RETURNS trigger AS $test_verif$
>> BEGIN
>> NEW.id := select nextval('test_azon_seq');
> I think you want to remove select here, you're already effectively doing a
> select of the right hand side in the assignment.
>> NEW.nev := nev;
> I think you want to remove this line entirely. What nev were you
> expecting on the right hand side? If it's the new one, well, NEW.new is
> already that.
László could also remove the entire trigger and use something like
CREATE TABLE test (
id SERIAL NOT NULL,
nev VARCHAR(25),
datum TIMESTAMP NOT NULL DEFAULT current_timestamp,
PRIMARY KEY (id)
);
| From | Date | Subject | |
|---|---|---|---|
| Next Message | nathan wagner | 2005-09-06 13:50:57 | uuid type for postgres |
| Previous Message | Thomas F. O'Connell | 2005-09-06 04:38:42 | Re: Searching for results with an unknown amount of data |