473,320 Members | 2,003 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,320 software developers and data experts.

Tool to ease development of plpgsql



What's the best way to ease development of plpgsql.

My largest issues with plpgsql pertain to the quoting of course.

Bill McMilleon
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #1
6 2698
On Friday 16 January 2004 22:52, bi*******************@mcmilleon.com wrote:
What's the best way to ease development of plpgsql.

My largest issues with plpgsql pertain to the quoting of course.


I personally use kate (on KDE) or vi, but any syntax-hightlighting editor can
help. I don't use anything fancy, just make sure the highlighting picks up
quoting / comments.
Edit the file with your function and use \i from psql to test it - that'll
give you line numbers for errors too.
ALWAYS make sure your variables/parameters have names that are different from
columns in queries.

Having done a _lot_ of plpgsql in the last few months, what irritates from my
end is:
1. Can't EXPLAIN inside a function
2. Error reporting not always useful
3. To work around the EXPLAIN problem I copy/paste SQL from my function, at
which time I have to unfix the quoting, then paste it back and refix the
quoting...

Anyway - there is the possiblilty that something a bit like shell/perl HERE
documents might exist in 7.5 which'll make the quoting problem go away.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #2
Would a tool like www.presicient.com/teraforge be of value ?
I'm thinking of making a Pg port....if interested, please
let me know, and let me know what kind of features
you'd like to see...

--
Dean Arnold
Presicient Corp.
www.presicient.com

"Richard Huxton" <de*@archonet.com> wrote in message
news:200401181512.22916.de*@archonet.com...
On Friday 16 January 2004 22:52, bi*******************@mcmilleon.com wrote:
What's the best way to ease development of plpgsql.

My largest issues with plpgsql pertain to the quoting of course.


I personally use kate (on KDE) or vi, but any syntax-hightlighting editor

can help. I don't use anything fancy, just make sure the highlighting picks up
quoting / comments.
Edit the file with your function and use \i from psql to test it - that'll
give you line numbers for errors too.
ALWAYS make sure your variables/parameters have names that are different from columns in queries.

Having done a _lot_ of plpgsql in the last few months, what irritates from my end is:
1. Can't EXPLAIN inside a function
2. Error reporting not always useful
3. To work around the EXPLAIN problem I copy/paste SQL from my function, at which time I have to unfix the quoting, then paste it back and refix the
quoting...

Anyway - there is the possiblilty that something a bit like shell/perl HERE documents might exist in 7.5 which'll make the quoting problem go away.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #3
Richard Huxton wrote:
On Friday 16 January 2004 22:52, bi*******************@mcmilleon.com wrote:

What's the best way to ease development of plpgsql.
My largest issues with plpgsql pertain to the quoting of course.

3. To work around the EXPLAIN problem I copy/paste SQL from my function, at
which time I have to unfix the quoting, then paste it back and refix the
quoting...

<plug>

I use EMS PostgreSQL Manager to edit PL/PGSQL functions. It automagically
escapes the quotes for you as you write functions, so you can just write:

SELECT 'sometexthere'::text;

instead of having to do:

SELECT ''sometexthere''::text;

It's a major time saver when developing. You gotta pay money for PG
Manager,
but it's worth it and has Windows and Linux versions.

http://www.ems-hitech.com/pgmanager/download.phtml

</plug>

Dante

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #4
Hello

try: http://www.ems-hitech.com/pgmanager. It has plpgsql debugger.

Regards
Pavel Stehule

On Fri, 16 Jan 2004 bi*******************@mcmilleon.com wrote:


What's the best way to ease development of plpgsql.

My largest issues with plpgsql pertain to the quoting of course.

Bill McMilleon
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #5
On Sunday 18 January 2004 16:02, D. Dante Lorenso wrote:
Richard Huxton wrote:
On Friday 16 January 2004 22:52, bi*******************@mcmilleon.com wrote:
What's the best way to ease development of plpgsql.
My largest issues with plpgsql pertain to the quoting of course.


3. To work around the EXPLAIN problem I copy/paste SQL from my function,
at which time I have to unfix the quoting, then paste it back and refix
the quoting...


<plug>

I use EMS PostgreSQL Manager to edit PL/PGSQL functions. It automagically
escapes the quotes for you as you write functions, so you can just write:

SELECT 'sometexthere'::text;

instead of having to do:

SELECT ''sometexthere''::text;

It's a major time saver when developing. You gotta pay money for PG
Manager,
but it's worth it and has Windows and Linux versions.

http://www.ems-hitech.com/pgmanager/download.phtml

</plug>


FWIW I believe both phpPgAdmin and PgAdmin do this.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #6
PG Manager is a great tool. EMS is very responsive when it comes to bugs
or useability issues.

Rick

Pavel Stehule wrote:
Hello

try: http://www.ems-hitech.com/pgmanager. It has plpgsql debugger.

Regards
Pavel Stehule

On Fri, 16 Jan 2004 bi*******************@mcmilleon.com wrote:
What's the best way to ease development of plpgsql.

My largest issues with plpgsql pertain to the quoting of course.

Bill McMilleon
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)


--
------------------------------------------------------------------------
A Message from MicroPatent® LLC

MicroPatent now offers searchable .PDF patents! Save time and improve your workflow efficiencies with these convenient, easy-to-review documents. For more information, go to http://www.micropat.com/0/searchable...hable_pdf.html.

Richard Hall
Database Programmer
MicroPatent LLC
250 Dodge Avenue
East Haven, CT 06512
T: <Phone Number>, x 3321
F: <Fax Number>
S: <Toll Free Number>
rh***@micropat.com
www.micropat.com

MicroPatent is an Information Holdings Inc. company (NYSE: IHI).

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #7

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

Similar topics

5
by: anthonymorris | last post by:
I have been charged with determining a standard for my company for finding a standard for documenting our code. Actually, I'm new to the company and have been told that very little is generated so...
4
by: Mark Mikulec | last post by:
Hi there, I wonder if anyone can shed some light on a very frustrating problem. I'm running a debian linux 3.0 "woody" server, nothing special, with the latest version of postres that apt-get...
6
by: Martin Marques | last post by:
We are trying to make some things work with plpgsql. The problem is that I built several functions that call one another, and I thought that the way of calling it was just making the assign: ...
1
by: Rajesh Kumar Mallah | last post by:
Hi, profile_row profile_master%ROWTYPE; in a plpgsql function gives the error below tradein_clients=# SELECT general.create_accounts(); WARNING: plpgsql: ERROR during compile of...
0
by: Bill McMilleon | last post by:
What's the best way to ease development of plpgsql. My largest issues with plpgsql pertain to the quoting of course. Bill McMilleon ---------------------------(end of...
4
by: Bill Moran | last post by:
I've got a bit of a strange problem that's causing me some MAJOR headaches. I'm developing the server-side of a large database application in PostgreSQL. This consists of a C daemon, and a LOT...
14
by: Karl O. Pinc | last post by:
Hi, Thought perhaps some other eyes than mine can tell if I'm doing something wrong here or if there's a bug somewhere. I've never passed a ROWTYPE varaible to a function but I don't see where...
0
by: sripathy sena | last post by:
Hi, I am trying to install OPenacs with postgres 7.4.3 as the database. The openacs requires plpgsql to be installed. When I try to do this by running "CREATELANG plpgsql template1". I get a...
1
by: Karl O. Pinc | last post by:
FYI, mostly. But I do have questions as to how to write code that will continue to work in subsequent postgresql versions. See code below. begintest() uses EXIT to exit a BEGIN block from...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.