It is doing my head in

From: "Blyth A J C (Comp)" <ajcblyth(at)glam(dot)ac(dot)uk>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: It is doing my head in
Date: 1999-05-20 13:15:52
Message-ID: EB62C0C34246D111A39A00805FA6A85502652862@ems2.glam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ok all here is an question for you.

I am running pgsql on a linux 5.1 box.

Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL

type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: postgres

postgres=> create table smile (
postgres-> s1 integer,
postgres-> s2 integer );
CREATE
postgres=> insert into smile values ( 1 , 2 );
INSERT 17866 1
postgres=> insert into smile values ( 3 , 4 );
INSERT 17867 1
postgres=> select * from smile
postgres-> ;
s1|s2
--+--
1| 2
3| 4
(2 rows)

postgres=> create function ttt() returns integer
postgres-> as 'select 4 as result'
postgres-> language 'sql' ;
CREATE
postgres=> select * from smile where s2=ttt() ;
s1|s2
--+--
3| 4
(1 row)

postgres=> create trigger trg1 after insert on smile for each row
postgres-> execute procedure ttt() ;
ERROR: CreateTrigger: function ttt () does not exist
postgres=> \q

So my question is - why does the create trigger function fail when the
function does in
fact exist ?

Andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-05-20 13:18:10 Re: [HACKERS] Open 6.5 items
Previous Message Tom Lane 1999-05-20 13:14:15 Re: [HACKERS] Last call for docs