| From: | David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | plruby issue with redeclaring functions |
| Date: | 2004-08-09 10:07:09 |
| Message-ID: | 41174CCD.10206@zara.6.isreserved.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
-- plruby 0.4.2, ruby 1.8.1, pg 7.4.3, linux
-- 1. create a valid plruby function
create or replace function sqr(int4) returns int4 as '
args[0]*args[0]
' language 'plruby';
-- 2. test it
select sqr(5);
-- 3. recreate the function, with syntax error
create or replace function sqr(int4) returns int4 as '
args[0]*args[0]-
' language 'plruby';
-- 4. test it
select sqr(5);
-- 5. recreate the function, fix the syntax error
create or replace function sqr(int4) returns int4 as '
args[0]*args[0]
' language 'plruby';
-- 6. test it.
select sqr(5);
step 6 fails with:
ERROR: method `proc_1057896' not defined in Module
note:
* ok if using plpgsql
* ok if step 2 and/or 4 is skipped
* of if step 5 is replaced with DROP FUNCTION + CREATE FUNCTION
--
dave
| From | Date | Subject | |
|---|---|---|---|
| Next Message | zhicheng wang | 2004-08-09 10:10:31 | postgresql and smp linux kernel |
| Previous Message | dmartini | 2004-08-09 10:01:18 | Re: Embedded Database |