By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

Tool to ease development of plpgsql

P: n/a


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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.