timization)
Regards
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Thursday, January 19, 2006 12:17 AM
Subject: [SQL] stored procedures for complex SELECTs
Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored
On Jan 19, 2006, at 8:17 , [EMAIL PROTECTED] wrote:
Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored procedure?
I believe it depends on the procedural language. If it's SQL, I think
it may be inlined, so you'd have overhead due to the stored p
Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored procedure?
Alex
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Please Cc the mailing list when you respond -- that way others can
participate in and learn from the discussion. Also, if you have a
new question then please start a new thread with a relevant Subject
header.
On Mon, Nov 29, 2004 at 10:12:59PM -0500, [EMAIL PROTECTED] wrote:
> Thanks for the help
On Mon, Nov 29, 2004 at 01:37:42PM -0500, [EMAIL PROTECTED] wrote:
> I have tried to create a simple function to select data from a table. Could
> you all please correct me
It would be helpful if you told us what you want to happen and what
actually does happen. Without that information we have
I know that there are not stored procedures like that in
oracle. I know that you have to create functions.
I have tried to create a simple function to select data from
a table. Could you all please correct me
Thanks
CREATE FUNCTION retrive_atype(varchar) RETURNS varchar AS
'
--- Kent Anderson <[EMAIL PROTECTED]> wrote:
> I am attempting to use a stored procedure to pull a
> report from the
> database. My questions is if its even possible to
> pull the data using a
> function and then treat the returned data as a
> normal recordset with the web
> pages.
>
> The actua
I am attempting to
use a stored procedure to pull a report from the database. My questions is if
its even possible to pull the data using a function and then treat the
returned data as a normal recordset with the web pages.
The actual function
looks like
CREATE OR REPLACE
FUNCTION submi
Patrice OLIVER wrote:
Hello, I got this error message :
ERROR: set-valued function called in context that cannot accept a set
CONTEXT: PL/pgSQL function "lsttable" line 5 at return next
You need to treat set-returning functions as though they are tables.
SELECT * FROM lsttable();
NOT
SELECT l
yé : mardi, 24. août 2004 11:26
À : Patrice OLIVER
Cc : [EMAIL PROTECTED]
Objet : Re: [SQL] stored procedures and type of returned result.
Patrice OLIVER wrote:
> Hello,
>
> I'm new in PostgreSQL. It's very cool.
Hello, and yes it is isn't it :-)
> I would like
Patrice OLIVER wrote:
Hello,
I'm new in PostgreSQL. It's very cool.
Hello, and yes it is isn't it :-)
I would like to know how to return a set of records from a stored
procedure.
For example, i would like to execute these sql command from a stored
procedure :
select t.typnum, t.typcom, t.typcat
***
Aucun virus n'a été détecté dans la pièce-jointe no filename
---
No virus was detected in the attachment no filename
Votre courrier a été inspecté par InterScan Messaging Security Suite
---
Your mail has been scanned by InterScan MSS.
***
Hello,
I'm new i
Lars Erik Thorsplass wrote:
> On Tue, 20 Jul 2004 09:45:06 -0600, Scott Marlowe <[EMAIL PROTECTED]> wrote:
> > > Kinda like this:
> > >
> > > SELECT *, acl_check( objects.obid, ) AS mode FROM objects
> > > WHERE mode > 0;
> >
> > Here's the problem. In order to do the select, the query first need
Ð ÐÑÑ, 20.07.2004, Ð 15:57, Tomasz Myrta ÐÐÑÐÑ:
> On 2004-07-20 15:34, UÅytkownik Lars Erik Thorsplass napisaÅ:
> > My stored procedure "acl_check()" takes two integers as parameters.
> > Param1 is the object id to check acl on, Param 2 is the object id of
> > the user currently using the system. T
On 2004-07-20 15:34, UÅytkownik Lars Erik Thorsplass napisaÅ:
My stored procedure "acl_check()" takes two integers as parameters.
Param1 is the object id to check acl on, Param 2 is the object id of
the user currently using the system. The procedure returns a positive
number (1 or 3 ) if you have s
I also posted this to the general list, which might not have been a
suitable forum.
--
I have recently ventured into the exciting world of stored procedures,
but I have now become lost.
Background:
Am currently working on access control in a web application. My goal
is to process access control
beyaRecords - The home Urban music <[EMAIL PROTECTED]> writes:
> I am having problems with a stored procedure (plpgsql) that takes in a
> value and returns a record set.
> I am calling the procedure as follows:
> select clientRec('tmpg60');
Use
select * from clientRec('tmpg60') as (colum
Hi,
I am having problems with a stored procedure (plpgsql) that takes in a value and returns a record set.
my code is as follow:
create function pg_clientRec(text) setof record as
'
declare
customerID ALIAS $1;
rec record;
begin
select into rec * from troubletickets where custID = customerID;
ret
[EMAIL PROTECTED] (beyaRecords - The home Urban music) wrote:
> I am new to this list and the world of postgreSQL, and would like to
> know how create stored procedures in postgreSQL.
Have you considered looking at the documentation?
It is fairly well documented there.
% man "CREATE FUNCTION"
On Mon, Dec 29, 2003 at 01:57:00AM +, beyaRecords - The home Urban music wrote:
>
> I am new to this list and the world of postgreSQL, and would like to
> know how create stored procedures in postgreSQL.
If you're new to PostgreSQL then have a look at the documentation:
http://www.postgresql
Hi,
I am new to this list and the world of postgreSQL, and would like to
know how create stored procedures in postgreSQL.
regards
Uzo
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining
On Fri, 28 Nov 2003, FET wrote:
> Hi everybody,
> I have a stored procedure that drops table A and then creates table A
> again. The table A has no constraints on any columns. When I execute
> the stored procedure by saying: SELECT sp_myproc(); It gives me an
> error saying : Relation 68428 does
Hi everybody,
I have a stored procedure that drops table A and then creates table A
again. The table A has no constraints on any columns. When I execute
the stored procedure by saying: SELECT sp_myproc(); It gives me an
error saying : Relation 68428 does not exist.
When I remove the CREATE FUNCTIO
As far as I know, you always work with a ResultSet.
If you know your stored procedures will always return an Integer and you don't
wanna deal with the executeQuery and stuff every time, you could create a
class with methods explicitly for accesing your stored procedures, for
example:
assuming
Here is a full example of a java program showing the data from a set returning
function:
-
--IN YOUR DATABASE
CREATE TABLE people (name TEXT);
INSERT INTO people VALUES ('john');
INSERT INTO people VALUES ('peter');
INSERT INTO people VALUES ('joe');
CREATE FUNCTION getPe
[EMAIL PROTECTED] wrote:
> Ok, if this does not apply to versions prior to 7.3beta
> then what do I need to do if I am running 7.2.1? When I
> try to use the SETOF to retrun a row set, I only get
> one column.
First, prior to 7.3 there is no SCHEMA support in Postgres. Everything lives
in ess
Cc: david williams; [EMAIL PROTECTED] Subject: Re: [SQL] Stored Procedures Ok, if this does not apply to versions prior to 7.3beta then what do I need to do if I am running 7.2.1? When I try to use the SETOF to retrun a row set, I only get one column.Do I need to update Postgres to get things to
Ok, if this does not apply to versions prior to 7.3beta
then what do I need to do if I am running 7.2.1? When I
try to use the SETOF to retrun a row set, I only get
one column.
Do I need to update Postgres to get things to work?
Ben
> david williams wrote:
> > Also,
> >
> > the table defini
david williams wrote:
> Also,
>
> the table definition MUST be in the Public Schema. I use my own schema
> names but in order for the table to be found by the function it ( the
> table ) must be in the public schema. Although it can be empty.
(Note:
this discussion does not apply to Postgre
Also, the table definition MUST be in the Public Schema. I use my own schema names but in order for the table to be found by the function it ( the table ) must be in the public schema. Although it can be empty. DaveGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com
http://developer.postgresql.org/docs/postgres/xfunc-sql.html#AEN30400 See section 9.2.4. SQL Table Functions - Original Message - From: [EMAIL PROTECTED] Sent: Tuesday, October 01, 2002 4:25 PM To: [EMAIL PROTECTED] Subject: [SQL] Stored Procedures Hi all. I'm looking for a l
On Tue, Oct 01, 2002 at 06:16:57PM +, [EMAIL PROTECTED] wrote:
> Hi all. I'm looking for a little help here. I have a
> project where I have to write some stored proceedures
> and am having some problems. My main issue is, I cannot
> figure out how to return a record set containing
> multi
Hi all. I'm looking for a little help here. I have a
project where I have to write some stored proceedures
and am having some problems. My main issue is, I cannot
figure out how to return a record set containing
multipule columns. I am looking for a few examples on
how I can do this. Most of
On Mon, Sep 09, 2002 at 11:02:27PM +0200, Reinoud van Leeuwen wrote:
> On Mon, 9 Sep 2002 18:16:07 + (UTC), [EMAIL PROTECTED] (Charles
> Hauser) wrote:
>
> >I am trying to port a Sybase table create script to one usable for
> >postgreSQL.
> >
> >(note I am not a DBA)
> >
> >In particular I am
On Mon, 9 Sep 2002 18:16:07 + (UTC), [EMAIL PROTECTED] (Charles
Hauser) wrote:
>I am trying to port a Sybase table create script to one usable for
>postgreSQL.
>
>(note I am not a DBA)
>
>In particular I am not well versed on how to use/recode the stored
>procedures such as that in the exampl
I am trying to port a Sybase table create script to one usable for
postgreSQL.
(note I am not a DBA)
In particular I am not well versed on how to use/recode the stored
procedures such as that in the example below.
ALTER TABLE DnaFragment
ADD PRIMARY KEY (dna_fragment_id)
go
exec sp_p
> I read something about stored procedures in the Great Bridge User's Manual
> (Page 74 under "PG_LANGUAGE"). It is only mentioned briefly and there are no
> explanations of how it works.
>
> Can anybody let me know, how I can write a stored procedure and how to run
> it?
Postgres doesn't have st
I read something about stored procedures in the Great Bridge User's Manual
(Page 74 under "PG_LANGUAGE"). It is only mentioned briefly and there are no
explanations of how it works.
Can anybody let me know, how I can write a stored procedure and how to run
it?
Best regards,
Chris
oes not do it). So how do i declare and use arrays in SQL
stored procedures
so as to return arrays as OUT paramters and access the same in JDBC
kindly reply at [EMAIL PROTECTED]
thanks
nitin
39 matches
Mail list logo