Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-05 Thread Chris Travers
On Sun, Aug 4, 2013 at 7:01 PM, Craig Ringer cr...@2ndquadrant.com wrote: I think part of the issue is that people tend to consider stored procedures part of the application's internal implementation where you just change all the call sites when you change the function. Normally stored

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-04 Thread Craig Ringer
On 08/02/2013 09:18 PM, Merlin Moncure wrote: On Fri, Aug 2, 2013 at 1:49 AM, Chris Travers chris.trav...@gmail.com wrote: Here's my $0.02 Stored procedures have a bunch of problems historically. Part of this is because the interface traditionally is pretty spartan, and partly because some

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-02 Thread Chris Travers
Here's my $0.02 Stored procedures have a bunch of problems historically. Part of this is because the interface traditionally is pretty spartan, and partly because some people take them too far. The first issue is that if you have a stored procedure which takes 2 arguments and you need to extend

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-02 Thread Merlin Moncure
On Fri, Aug 2, 2013 at 1:49 AM, Chris Travers chris.trav...@gmail.com wrote: Here's my $0.02 Stored procedures have a bunch of problems historically. Part of this is because the interface traditionally is pretty spartan, and partly because some people take them too far. The first issue is

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-01 Thread Kevin Grittner
Neil Tiffin ne...@neiltiffin.com wrote: Some Developer someukdevelo...@gmail.com wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. Application architecture is a specific software engineering

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-01 Thread Gavin Flower
On 02/08/13 08:24, Kevin Grittner wrote: [...] When working as a consultant, one client was doing everything client-side and engaged me to fix some performance problems. In one case a frequently run query was taking two minutes. As a stored procedure the correct results were returned in two

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Luca Ferrari
On Thu, Jul 25, 2013 at 2:57 AM, Some Developer someukdevelo...@gmail.com wrote: The added advantage of removing load from the app servers so they can actually deal with serving the app is a bonus. Uhm...I don't know what application you are developing, but I don't buy your explaination. While

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Vincenzo Romano
2013/7/25 Luca Ferrari fluca1...@infinito.it: On Thu, Jul 25, 2013 at 2:57 AM, Some Developer someukdevelo...@gmail.com wrote: The added advantage of removing load from the app servers so they can actually deal with serving the app is a bonus. Uhm...I don't know what application you are

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Pavel Stehule
2013/7/25 Vincenzo Romano vincenzo.rom...@notorand.it: 2013/7/25 Luca Ferrari fluca1...@infinito.it: On Thu, Jul 25, 2013 at 2:57 AM, Some Developer someukdevelo...@gmail.com wrote: The added advantage of removing load from the app servers so they can actually deal with serving the app is a

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Some Developer
On 25/07/13 07:57, Luca Ferrari wrote: On Thu, Jul 25, 2013 at 2:57 AM, Some Developer someukdevelo...@gmail.com wrote: The added advantage of removing load from the app servers so they can actually deal with serving the app is a bonus. Uhm...I don't know what application you are developing,

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Some Developer
On 25/07/13 08:14, Vincenzo Romano wrote: 2013/7/25 Luca Ferrari fluca1...@infinito.it: On Thu, Jul 25, 2013 at 2:57 AM, Some Developer someukdevelo...@gmail.com wrote: The added advantage of removing load from the app servers so they can actually deal with serving the app is a bonus.

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Bèrto ëd Sèra
Hi, the whole design of this application is asynchronous in nature. Then you'll be MUCH better off with SPs, from an architectural POV, as you can basically design building blocks by initially just making SPs that deliver a mock result, and have the entire development of the app server being in

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread V S P
I do not see why stored procedures are particular better for asynchronous application design. this can be done, as some pointed before, using standard libraries. Furthermore, while this does not apply to databases that do not burden users with heavy per-cpu costs, for many companies that build

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Steve Atkins
On Jul 25, 2013, at 1:44 AM, Some Developer someukdevelo...@gmail.com wrote: When I was talking about improving speed I was talking about reducing load on the app servers by putting more of the work load on the database server. I know that it won't actually save CPU cycles (one of the

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Pavel Stehule
2013/7/25 Steve Atkins st...@blighty.com: On Jul 25, 2013, at 1:44 AM, Some Developer someukdevelo...@gmail.com wrote: When I was talking about improving speed I was talking about reducing load on the app servers by putting more of the work load on the database server. I know that it

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Gauthier, Dave
...@postgresql.org] On Behalf Of Pavel Stehule Sent: Thursday, July 25, 2013 11:09 AM To: Steve Atkins Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Why are stored procedures looked on so negatively? 2013/7/25 Steve Atkins st...@blighty.com: On Jul 25, 2013, at 1:44 AM, Some Developer someukdevelo

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Sébastien Lorion
On Thu, Jul 25, 2013 at 4:41 AM, Some Developer someukdevelo...@gmail.comwrote: You are forgetting that you can execute a query asynchronously using libpq therefore the app server can continue serving requests whilst the database server chugs away on its work. You just poll the server every

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-25 Thread Neil Tiffin
On Jul 23, 2013, at 7:29 PM, Some Developer someukdevelo...@gmail.com wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. Application architecture is a specific software engineering discipline.

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Luca Ferrari
On Wed, Jul 24, 2013 at 2:29 AM, Some Developer someukdevelo...@gmail.com wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I believe because most developers are not DBAs, and therefore are

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Aaron Abreu
a NON-technical version... st.procedures and automation are great... but... sounds like everybody is dancing around the main theme.. so lets say it that dreaded word that developers and DBA's cring to hear... the one part of our job that we all hate... DOCUMENTATION ! My worst fear is

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Vincenzo Romano
2013/7/24 Aaron Abreu abre...@bay.k12.fl.us: a NON-technical version... st.procedures and automation are great... but... sounds like everybody is dancing around the main theme.. so lets say it that dreaded word that developers and DBA's cring to hear... the one part of our job that we

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Vincenzo Romano
2013/7/24 Aaron Abreu abre...@bay.k12.fl.us: a NON-technical version... st.procedures and automation are great... but... sounds like everybody is dancing around the main theme.. so lets say it that dreaded word that developers and DBA's cring to hear... the one part of our job that we

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Bèrto ëd Sèra
Hi, In other words an API in the database. +1. People code apps and then disappear, because once the development is over they are not available in the company any more. And each thing you hardwire in the app becomes a stopper. Meanwhile, every company will have at least one DBA, who can

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Merlin Moncure
On Wed, Jul 24, 2013 at 7:52 AM, Aaron Abreu abre...@bay.k12.fl.us wrote: a NON-technical version... st.procedures and automation are great... but... sounds like everybody is dancing around the main theme.. so lets say it that dreaded word that developers and DBA's cring to hear...

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Gauthier, Dave
@postgresql.org Subject: [GENERAL] Why are stored procedures looked on so negatively? I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I don't understand this argument. If you implement all of your logic

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Adrian Klaver
On 07/24/2013 06:31 AM, Some Developer wrote: Thank you all for the responses. I feel better about making use of them now. Now for one final question: I was planning on using plpython2u to write my stored procedures since Python is a language I am very familiar with. I understand that many

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Merlin Moncure
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Some Developer Sent: Tuesday, July 23, 2013 8:29 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Why are stored procedures looked on so negatively? I've done quite a bit of reading on stored procedures recently and the consensus seems

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Some Developer
-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Some Developer Sent: Tuesday, July 23, 2013 8:29 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Why are stored procedures looked on so negatively? I've done quite a bit of reading on stored procedures recently

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Jeff Janes
On Tue, Jul 23, 2013 at 5:29 PM, Some Developer someukdevelo...@gmail.com wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I think that mostly speaks to the method you used for finding things

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-24 Thread Some Developer
On 24/07/13 20:33, Jeff Janes wrote: On Tue, Jul 23, 2013 at 5:29 PM, Some Developer someukdevelo...@gmail.com wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I think that mostly speaks to

[GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I don't understand this argument. If you implement all of your logic in the application then you need to make a network request to the database

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread hidayat365
by Sinyal Kuat INDOSAT -Original Message- From: Some Developer someukdevelo...@gmail.com Sender: pgsql-general-owner@postgresql.orgDate: Wed, 24 Jul 2013 01:29:14 To: pgsql-general@postgresql.org Subject: [GENERAL] Why are stored procedures looked on so negatively? I've done quite a bit

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Adrian Klaver
On 07/23/2013 05:29 PM, Some Developer wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I don't understand this argument. If you implement all of your logic in the application then you need to

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Kevin Goess
On Tue, Jul 23, 2013 at 5:40 PM, Adrian Klaver adrian.kla...@gmail.comwrote: On 07/23/2013 05:29 PM, Some Developer wrote: I'm in the middle of building a database and was going to make extensive use of stored procedures and trigger functions because it makes more sense for the actions to

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread John Meyer
Taking an absolutist position either way is pretty blind. What is the purpose of the procedure? Is it enforcing business rules? Are these rules that must be enforced against already existing data or are they more akin to validation of a credit card. How many people are accessing your

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
On 24/07/13 01:55, John Meyer wrote: Taking an absolutist position either way is pretty blind. What is the purpose of the procedure? Is it enforcing business rules? Are these rules that must be enforced against already existing data or are they more akin to validation of a credit card. How

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Andrew Sullivan
On Tue, Jul 23, 2013 at 06:55:56PM -0600, John Meyer wrote: are accessing your database at one time? And most importantly, what are you best at? That is one of the most important questions, for sure, but there's a close second that I'd suggest: what are the scaling properties? For practical

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
On 24/07/13 02:56, Andrew Sullivan wrote: On Tue, Jul 23, 2013 at 06:55:56PM -0600, John Meyer wrote: are accessing your database at one time? And most importantly, what are you best at? That is one of the most important questions, for sure, but there's a close second that I'd suggest: what

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Albe Laurenz
Some Developer wrote: On 24/07/13 01:55, John Meyer wrote: Taking an absolutist position either way is pretty blind. What is the purpose of the procedure? Is it enforcing business rules? Are these rules that must be enforced against already existing data or are they more akin to