473,396 Members | 2,093 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.

validation of postgresql functions

Hi, I'm in the process of converting an Oracle database into
postgresql. One thing I've noticed is that postgresql functions keep
the entire function body in a string, e.g.:

CREATE OR REPLACE FUNCTION f_do_something(varchar, numeric, varchar)
RETURNS varchar AS
'
....
'
LANGUAGE 'plpgsql' VOLATILE;

The problem I'm having with this is that I can never find any errors
in my functions until runtime, unlike with Oracle where the "create
function" script will fail if, for example, I misspelled a table name.

Is there any way to force postgresql to compile functions, without
running them first?

--Frank
Nov 12 '05 #1
1 2200
Ben
I never found a way. Instead I hacked up a general stored proceedure
testbed. I was going to release it when I had some time to make it
somewhat clean, but if you're desperate for something now I can give you
what I've got....

On 29 Sep 2003, giant food wrote:
Hi, I'm in the process of converting an Oracle database into
postgresql. One thing I've noticed is that postgresql functions keep
the entire function body in a string, e.g.:

CREATE OR REPLACE FUNCTION f_do_something(varchar, numeric, varchar)
RETURNS varchar AS
'
...
'
LANGUAGE 'plpgsql' VOLATILE;

The problem I'm having with this is that I can never find any errors
in my functions until runtime, unlike with Oracle where the "create
function" script will fail if, for example, I misspelled a table name.

Is there any way to force postgresql to compile functions, without
running them first?

--Frank

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2

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

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
11
by: Errol Neal | last post by:
Hi all, Not sure if this is a question for a php list or this one, but I'll give it a shot and if I am wrong, please do not crucify me. :-) There is a php based sourceforge project called...
29
by: Paul Ganainm | last post by:
Hi all, Following up on another thread, here is a comparison between FB and PG from an FB'ers POV. BTW, FB is the love-child of Open-Source-Interbase. BTW, I have tried to be as accurate as I...
4
by: Chris Travers | last post by:
Hi all; A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light,...
59
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. ...
3
by: Robert Abi Saab | last post by:
Hi everyone. I just finished a course on PostgreSQL and I found out that PostgreSQL doesn't provide any object relational features (as claimed in the official documentation), except table...
0
by: phil campaigne | last post by:
Phil Campaigne wrote: > Hi Ron, > I had a couple of questions on your instructions: > 1. what is this for? > >#make install-all-headers According to the docs you need it if you are going...
10
by: Laimis K | last post by:
Hi, I'm oracle man. So, how about features in postgesql which exists in oracle db (order is casual) ? 1. Sequences 2. Packages 3. Functions/procedures 4. Full-text 5. Triggers
2
by: John | last post by:
As per subject, i'm considering migrating a database (still in development) from MaxDB to postgresql. The main reason for this is that the stored procedures (functions) in MaxDB are unreliable and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.