473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

plruby issue with redeclaring functions

-- 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
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
1 1273
David Garamond wrote:
-- plruby 0.4.2, ruby 1.8.1, pg 7.4.3, linux


Just to note here that the plruby has fixed this issue. He apparently
does not read -general daily, so I'll post to ruby-talk mailing list in
the future.

--
dave

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jessica | last post by:
Hi, I have a question regarding the object-oriented issue. I understand that a class is a type. I have an array class. Now say that I want to implement an algorithm A that uses the array class....
5
by: Steven T. Hatton | last post by:
This is a question about coding styles. I've seen some cases where the programmer has redeclared the pure virtual functions from an interface class in the implementation derived from it. For...
16
by: Roman Susi | last post by:
Hi! Out of curiosity, how do I draw functions outside classes with UML? How module could be drawn in this case? More theoretical question is if I create classes on the fly, how UML can...
12
by: Arash Partow | last post by:
Hi all, I've ported various hash functions to python if anyone is interested: def RSHash(key): a = 378551 b = 63689 hash = 0
33
by: Robert Seacord | last post by:
When writing C99 code is a reasonable recommendation to use inline functions instead of macros? What sort of things is it still reasonable to do using macros? For example, is it reasonable to...
35
by: Francine.Neary | last post by:
I'm finding it really hard to keep some of these things straight... For example, fputs is to puts as fprintf is to printf, except that fputs has the file handle at the end and fprintf at the...
3
by: mthread | last post by:
Hi, I am learning C++ and already have a good experience in C. We have some of the application in C which we want to move it to C++. Will there be any issue in using a C library function in C++. ...
127
by: sanjay.vasudevan | last post by:
Why are the following declarations invalid in C? int f(); int f(); It would be great if anyone could also explain the design decision for such a language restricton. Regards, Sanjay
7
by: Immortal Nephi | last post by:
My project grows large when I put too many member functions into one class. The header file and source code file will have approximately 50,000 lines when one class contains thousand member...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.