On 04/10/2014 03:29 PM, Rob Sargent wrote:
Code for db functions should be a repository. Easy edit and rerun
Well, not necessarily inside the transaction that renames the schema.
I've settled for this inside the transaction (running as a superuser):
UPDATE pg_proc
SET proconfig =
I would like to rename schemas without breaking the stored procedures in
them. Currently, this does not work if the stored procedure definition
contains a schema self-reference because that does not get renamed. I
tried SET search_path FROM CURRENT, but that seems to expand the
search path
Code for db functions should be a repository. Easy edit and rerun
Sent from my iPhone
On Apr 10, 2014, at 6:19 AM, Florian Weimer fwei...@redhat.com wrote:
I would like to rename schemas without breaking the stored procedures in
them. Currently, this does not work if the stored procedure
I need to run a series of stored procedures, what is the best way to
organize and run.
Ideally would like something like Oracle PL/SQL where I can put all
methods in one file and create a main() method
then just : select main() to have them all run.
If there is a way to do this, please let
On 09/30/11 12:57 AM, J.V. wrote:
I need to run a series of stored procedures, what is the best way to
organize and run.
Ideally would like something like Oracle PL/SQL where I can put all
methods in one file and create a main() method
then just : select main() to have them all run.
in
J.V. wrote:
I need to run a series of stored procedures, what is the best way to
organize and run.
Ideally would like something like Oracle PL/SQL where I can put all
methods in one file and create a main() method
then just : select main() to have them all run.
If there is a way to do
Thanks a lot for the response Andrej!
One of these texts was known for me. But all of them are VERY basic. No one
explains how to do a query and manage results :(
The only one that manage querys is the source code placed at
contrib/tablefunc in the Postgres distribution. But is VERY hard to
@postgresql.org
Sent: Thursday, April 24, 2008 8:44 AM
Subject: Re: [GENERAL] Stored procedures in C
Thanks a lot for the response Andrej!
One of these texts was known for me. But all of them are VERY basic. No one
explains how to do a query and manage results :(
The only one
On Wed, Apr 23, 2008 at 6:38 PM, Martin Gainty [EMAIL PROTECTED] wrote:
Emiliano and Mike
The real challenge is trying to determine what a datatype is in cobol..for
that matter what is stack variable or heap in Cobol?
In the end you're better off rewriting this mess (preferably in Java)..
Guys, it has nothing to do with my question :D
I don't know why Martin answer to me anything about Cobol.
I just was looking how to query database in a stored procedure in C. Some
people pointed me to SPI documentation (at chapter 41 of oficial Postgres
documentation) that is being useful.
Thanks
Hi all,
I have to do some stuff writing stored procedures for Postgres in C. I saw
the oficial documentation but it was hard for me to find out how to do a
simple function, let's call it query() , that receives a string and uses
this string to do a query and return the results. Has anyone some
then later rewrite to Java
(That should get you at least 2 weeks worth of work..)
Buena Suerte/Good Luck
Martin
- Original Message -
From: Emiliano Moscato
To: pgsql-general@postgresql.org
Sent: Wednesday, April 23, 2008 3:32 PM
Subject: [GENERAL] Stored procedures in C
Hi all
On 24/04/2008, Emiliano Moscato [EMAIL PROTECTED] wrote:
I have to do some stuff writing stored procedures for Postgres in C. I saw
the oficial documentation but it was hard for me to find out how to do a
simple function, let's call it query() , that receives a string and uses
this string to
On Jan 22, 2008 2:24 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote:
I doubt that what you were measuring there was either procedure
call overhead or java computational speed; more likely it was the
cost of calling back out of java, through pl/java's JDBC
emulation, down through
Yep, the more I read, the more I get confused.
Java loading overhead is a common myth (I can't say if true or false),
and what Tom writes above can find a tentative place in my mind.
But still then I can't understand where plsql should or shouldn't be
used.
I really would enjoy to see some
Pavel Stehule wrote:
...
bottleneck is in repeated assign s := s || ..
I will try trick:
create or replace function list(int)
returns varchar as $$
begin
return array_to_string(array(select 'item' || i || '/item'
from generate_series(1, $1) g(i)), '');
end$$ language plpgsql
On Mon, 21 Jan 2008 21:31:23 -0800
johnf [EMAIL PROTECTED] wrote:
On Monday 21 January 2008 04:47:40 pm Tom Lane wrote:
I doubt that what you were measuring there was either procedure
call overhead or java computational speed; more likely it was the
cost of calling back out of java,
Ivan Sergio Borgonovo wrote:
On Mon, 03 Dec 2007 19:06:29 +
Richard Huxton [EMAIL PROTECTED] wrote:
Ivan Sergio Borgonovo wrote:
Any general rule about dynamically generated queries in stored
procedures vs. performances?
It's the same decision as any with any prepared plan vs
On Tue, 04 Dec 2007 08:14:56 +
Richard Huxton [EMAIL PROTECTED] wrote:
Unless it's an obvious decision (millions of small identical
queries vs. occasional large complex ones) then you'll have to
test. That's going to be true of any decision like this on any
system.
:(
I'm trying to
Ivan Sergio Borgonovo wrote:
On Tue, 04 Dec 2007 08:14:56 +
Richard Huxton [EMAIL PROTECTED] wrote:
Unless it's an obvious decision (millions of small identical
queries vs. occasional large complex ones) then you'll have to
test. That's going to be true of any decision like this on any
--- Richard Huxton [EMAIL PROTECTED] wrote:
Ivan Sergio Borgonovo wrote:
On Tue, 04 Dec 2007 08:14:56 +
Richard Huxton [EMAIL PROTECTED] wrote:
Unless it's an obvious decision (millions of
small identical
queries vs. occasional large complex ones) then
you'll have to
test.
On Tue, 04 Dec 2007 13:54:15 +
Richard Huxton [EMAIL PROTECTED] wrote:
Always go for the cleaner design. If it turns out that isn't fast
enough, *then* start worrying about having a bad but faster design.
mmm yeah right. I did express myself badly.
What I mean I've first to know what are
Sent: Tuesday, December 04, 2007 9:59 AM
To: Richard Huxton; Ivan Sergio Borgonovo
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] stored procedures and dynamic queries
--- Richard Huxton [EMAIL PROTECTED] wrote:
Ivan Sergio Borgonovo wrote:
On Tue, 04 Dec 2007 08:14:56 +
Richard
Any general rule about dynamically generated queries in stored
procedures vs. performances?
I was going to write stuff as simple as
create or replace function EditQty(int, int, int, varchar(10))
returns boolean as
'
declare
_uid alias for $1;
_aid alias for $2;
_qty
Ivan Sergio Borgonovo wrote:
Any general rule about dynamically generated queries in stored
procedures vs. performances?
It's the same decision as any with any prepared plan vs plan-each-time
trade-off.
A query built using EXECUTE will have to be planned each time. That
costs you something
On Mon, 03 Dec 2007 19:06:29 +
Richard Huxton [EMAIL PROTECTED] wrote:
Ivan Sergio Borgonovo wrote:
Any general rule about dynamically generated queries in stored
procedures vs. performances?
It's the same decision as any with any prepared plan vs
plan-each-time trade-off.
Should I
Hi All,
Which is the best Stored Procedures or Dynamic SQL generated by ORM ?
Thanks
Madhu Alagu
---(end of broadcast)---
TIP 6: explain analyze is your friend
On Nov 27, 2007 1:57 AM, Alagu Madhu [EMAIL PROTECTED] wrote:
Which is the best Stored Procedures or Dynamic SQL generated by ORM ?
Depends on what you mean by best. Dynamic SQL costs more in the
planning stage because the db has to plan out each statement before
running it. However, it can
On Mon, Nov 26, 2007 at 11:57:37PM -0800, Alagu Madhu wrote:
Which is the best Stored Procedures or Dynamic SQL generated by ORM ?
This is roughly similar to the question, Is it better to travel by car,
boat, or plane? It rather depends on what you're trying to accomplish.
A
--
Andrew
Harpreet Dhaliwal wrote:
Is it true that postgres doesn't have a notion of Stored
Procedures and functions is what it has instead?
RDBMS like Sql Server supports both stored procedures and functions.
So I was wondering what is the difference between a Stored
Procedure and a function.
I
Hi,
Is it true that postgres doesn't have a notion of Stored Procedures and
functions is what it has instead?
RDBMS like Sql Server supports both stored procedures and functions.
So I was wondering what is the difference between a Stored Procedure and a
function.
Thanks,
~Harpreet
On Saturday 2. June 2007 16:47, Harpreet Dhaliwal wrote:
Hi,
Is it true that postgres doesn't have a notion of Stored Procedures
and functions is what it has instead?
RDBMS like Sql Server supports both stored procedures and functions.
So I was wondering what is the difference between a Stored
Hello
Is it true that postgres doesn't have a notion of Stored Procedures and
functions is what it has instead?
RDBMS like Sql Server supports both stored procedures and functions.
So I was wondering what is the difference between a Stored Procedure and a
function.
It's true. PostgreSQL
MySQL supports procedures and functions.
Functions can return results but cannot update the database.
Procedures can update the database but cannot return results.
However :
- a function can call a procedure that updates the database !
- a
Hi,
is there a rule of thumb or an estimate which language provides the best
performance for stored procedures?
I'm currently using PL/Pgsql, and wondering
- to what extent these stored procedures are actually precompiled and/or
optimized
- if Java might provide better performance, or if
[EMAIL PROTECTED] (Daniel Kastenholz) writes:
Hi,
is there a rule of thumb or an estimate which language provides the
best performance for stored procedures?
I'm currently using PL/Pgsql, and wondering
- to what extent these stored procedures are actually precompiled
and/or optimized
- if
On 6/30/06, Alain Roger [EMAIL PROTECTED] wrote:
i'm migrating some SP from MySQL to PostgreSQL 8.1.xI would like to know if it is possible to return aresult of a select request and also a simple interger...that's definitelly possible (and by the way - is was possi ble years before mysql
Hi,i'm migrating some SP from MySQL to PostgreSQL 8.1.xI would like to know if it is possible to return aresult of a select request and also a simple interger...thanks a lot,Alain
hello all,
I desparately need help in developing stored
procedure using postgresql 8.0. I am using pgadmin for developing the stored
procs. Can anyone please help me, The docs are really not helpful.
am trying to pass values through a jsp
page wherein I am accessing this stored procedures
Minal A. Aryamane wrote:
hello all,
I desparately need help in developing stored procedure using postgresql 8.0. I am using pgadmin for developing the stored procs. Can anyone please help me, The docs are really not helpful.
am trying to pass values through a jsp page wherein I am accessing
Hello,
I am alagu madhu working as a Developer (postgresql).pls,send
your table design.
Minal A. Aryamane wrote:
hello all,
I desparately need help in developing stored procedure using postgresql 8.0.
I am using pgadmin for developing the stored procs. Can anyone please help
What is everyone's opinion for exclusively using Stored Procedures
for increased security? The scenario I am thinking of means having
one user which is widely accessible (large numbers of staff/user for
example) and only has access to some stored procedures, which where
create with
Title: stored procedures / C-Language
hi,
i'm trying to find some documentation about writing stored procedures with C-language.
i found description in postgresql's documentation but i don't understand everything.
Aat present, i have a pl/perl stored procedure but it isn't fast enough, so
Title: stored procedures / C-Language
hi,
i'm trying to find some documentation about writing stored
procedures with C-language. i found description in
postgresql's documentation but i don't understand everything.
Aat present, i have a pl/perl stored procedure but it isn't
We are currently
switching to stored procedures for a lot of our database activity. The question
has come up about the transactional nature of the stored procedures. I was
wondering if stored procedures can have transactions in themor if you must start the
transaction in your code and call
On Tue, Sep 21, 2004 at 07:41:31AM -0400, Kent Anderson wrote:
We are currently switching to stored procedures for a lot of our database
activity. The question has come up about the transactional nature of the
stored procedures. I was wondering if stored procedures can have
transactions in
On Tue, Sep 21, 2004 at 11:11:33AM -0700, Chris Travers wrote:
Alvaro Herrera wrote:
There's only one transaction (whether it's an explicit transaction block
or an implicit one), and the query that invokes the stored procedure is
already running inside it. So the stored procedure always has
Hello,
We are using a number of stored procedures that are called often from our
client programs. I include one here as an example. The problem we are seeing
is that when executing some of these that deal with a large number of
records, they begin execution and never return. The process handling
On Thu, 2004-08-19 at 10:53, Andrew Hall wrote:
Hello,
We are using a number of stored procedures that are called often from our
client programs. I include one here as an example. The problem we are seeing
is that when executing some of these that deal with a large number of
records, they
Oliver Elphick [EMAIL PROTECTED] writes:
We are using a number of stored procedures that are called often from our
client programs.
Are you somehow setting off an infinite recursion? How is this being
called?
I doubt it would be an infinite-recursion problem, as that would soon
lead to
Hello !
My ODBC driver in MS Visual Basic 6 refers also to
"Stored procedures" asRecord source.
What are these stored procedures, I don't find
anything in the 7.4 documentation,
Where can I find documentation ?
Many thanks.
Luc
Hi List,
How do I define a stored procedure that has an output variable? I am
looking for a way that will not significantly change the way the
argument is called.
Can I, for example, pass a reference to variable in some way?
Shachar
--
Shachar Shemesh
Lingnu Open Source
Shachar Shemesh wrote:
Hi List,
How do I define a stored procedure that has an output variable? I am
looking for a way that will not significantly change the way the
argument is called.
Can I, for example, pass a reference to variable in some way?
If I understand your question, the best way is
Hi!
We're trying to call a set-returning stored procedure
from Excel (MS Query). To do this we type:
select * from getStudents()
(where getStudents() is the stored procedure).
The problem is that MS Query interprets this as if
getStudents was a table, and complains that there is
no table called
Thanks Shridhar!
Works like a charm!
/tomas, Patrik and Siv.
--- Shridhar Daithankar
[EMAIL PROTECTED] wrote:
On Tuesday 28 October 2003 16:06, Tomas Larsson
wrote:
Hi!
We're trying to call a set-returning stored
procedure
from Excel (MS Query).
Create a dummy table and a rule
On Tuesday 28 October 2003 16:06, Tomas Larsson wrote:
Hi!
We're trying to call a set-returning stored procedure
from Excel (MS Query). To do this we type:
select * from getStudents()
(where getStudents() is the stored procedure).
The problem is that MS Query interprets this as if
Hi,
I am very new to PgSQL and I am just trying to figure out what for to
use stored procedures.
What I read/tested up to now is that pl/pgsql seems to be a bit
clumsy to write. Possibly needing a lot of
trial error.
So, I am not really sure what is the benefit of writing logic inside the
Hello
after playing around for a while with PostgreSQL's Stored Functions
I think I understood the concept behind it a little bit. It is mighty
but quite different from all other SQL servers Stored Procedures.
Considering the fact that there is another OpenSourced SQL database
engine Interbase,
Hello friends,
many months ago I starting messing with stored procedures with PostgreSQL,
and at the time, I found out that I could only return "one" value when I
used a stored procedure.
I was wondering if this has changed or has/will/could be changed/implemented
with PostgreSQL 7.0?
It would
Could someone point me to a tutorial or HOWTO regarding stored procedures? I
know very little about them and need to learn everything I possibly can about
them as soon as possible. I looked throught the Postgres docs and couldn't
find anything that goes into them in depth.
Thank you,
-M@
Greets,
Couple of questions,
1: does postgres support stored procedures
2: say a user has a microsoft sql server 7 database
with ~120 stored procedures, and alot of data, is their
a script or tool to convert that to a postgres database
or does it have to
On Fri, 5 Nov 1999, Jeff MacDonald wrote:
1: does postgres support stored procedures
Yes, quite extensively, and far beyond what SQL 7 offers. You may want
to take a look at the programmer's manual for the documentation.
2: say a user has a microsoft sql server 7 database
62 matches
Mail list logo