Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedures etc., but does anybody have
any comment
On Thu, Jun 30, 2016 at 09:16:49AM -0500, Merlin Moncure wrote:
> It's not really necessary to create version down scripts. In five
> years of managing complex database environments we've never had to
> roll a version back and likely never will; in the event of a disaster
> it's probably better t
On 07/01/2016 06:17 PM, Jim Nasby wrote:
On 6/30/16 9:16 AM, Merlin Moncure wrote:
It's not really necessary to create version down scripts. In five
years of managing complex database environments we've never had to
roll a version back and likely never will; in the event of a disaster
it's pr
On 6/30/16 9:16 AM, Merlin Moncure wrote:
It's not really necessary to create version down scripts. In five
years of managing complex database environments we've never had to
roll a version back and likely never will; in the event of a disaster
it's probably better to restore from backup anyways
On Wed, Jun 29, 2016 at 1:46 PM, Neil Anderson wrote:
> On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
>>
>> Elsewhere, somebody was asking how people implemented version control
>> for stored procedures on (MS) SQL Server.
>>
>> The consensus was that this is probably best managed by using scri
Mike Sofen wrote:
-Original Message-
From: Mark Morgan Lloyd Sent: Thursday, June 30, 2016 2:41 AM
Neil Anderson wrote:
On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Serve
-Original Message-
>From: Mark Morgan Lloyd Sent: Thursday, June 30, 2016 2:41 AM
>Neil Anderson wrote:
>> On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
>>> Elsewhere, somebody was asking how people implemented version control
>>> for stored procedures on (MS) SQL Server.
>>>
>>
Neil Anderson wrote:
On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedu
On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedures etc., but does any
On 2016-06-29 12:37 PM, Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedures etc., but does any
>does anybody have any comment on that from the POV of PostgreSQL?
Might be overkill but you could deploy your procedure as an extension
because extensions come with version control:
https://www.postgresql.org/docs/current/static/sql-createextension.html
Another option might be to hack something
On Wed, Jun 29, 2016 at 12:00 PM, Adrian Klaver
wrote:
> On 06/29/2016 09:37 AM, Mark Morgan Lloyd wrote:
>>
>> Elsewhere, somebody was asking how people implemented version control
>> for stored procedures on (MS) SQL Server.
>>
>> The consensus was that this is probably best managed by using scr
On 06/29/2016 09:37 AM, Mark Morgan Lloyd wrote:
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedures etc., but does any
Elsewhere, somebody was asking how people implemented version control
for stored procedures on (MS) SQL Server.
The consensus was that this is probably best managed by using scripts or
command files to generate stored procedures etc., but does anybody have
any comment on that from the POV of P
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of inspector morse
Sent: Thursday, February 19, 2015 7:58 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] stored procedure variable names
In all other DBMS, the variable names have a
2015-02-20 1:57 GMT+01:00 inspector morse :
> In all other DBMS, the variable names have a distinctive character to
> differentiate between variables and column names:
>
> Example:
> SQL Server uses @
> MySql uses ?
> Oracle uses :
> Firebirdsql uses :
>
> It makes it easier to write and manage qu
Yeah, I'm using plpgsql.
Actually nevermind on this. I was able to patch my data access utility so
it adds a prefix when calling the stored function and then remove it again
before returning for front end processing.
On Thu, Feb 19, 2015 at 8:44 PM, Adrian Klaver
wrote:
> On 02/19/2015 04:57 PM
On 02/19/2015 04:57 PM, inspector morse wrote:
In all other DBMS, the variable names have a distinctive character to
differentiate between variables and column names:
Example:
SQL Server uses @
MySql uses ?
Oracle uses :
Firebirdsql uses :
It makes it easier to write and manage queries especial
inspector morse writes:
> Is there any plan to add a character to differentiate between variables?
No. You're free to use a naming convention yourself, of course, but
we're not going to break every stored procedure in sight in order
to impose one.
regards, tom lane
--
inspector morse writes:
> In all other DBMS, the variable names have a distinctive character to
> differentiate between variables and column names:
>
> Example:
> SQL Server uses @
> MySql uses ?
> Oracle uses :
> Firebirdsql uses :
>
> It makes it easier to write and manage queries especially i
In all other DBMS, the variable names have a distinctive character to
differentiate between variables and column names:
Example:
SQL Server uses @
MySql uses ?
Oracle uses :
Firebirdsql uses :
It makes it easier to write and manage queries especially in stored
procedures.
Just compare the below:
On 12/10/2014 6:53 PM, Israel Brewster wrote:
Currently, when I need to create/edit a stored procedure in Postgresql,
my workflow goes like the following:
- Create/edit the desired function in my "DB Commands" text file
- Copy and paste function into my development database
- Test
- repeat above
I suggest you download and install PgAdmin.
http://www.pgadmin.org/index.php
It makes review of functions and other database objects, as well as
maintenance, a lot easier.
Otherwise, you can just use psql
eg:
psql
\o /some_dir/your_proc_filename
\sf+
\q
Your function definition will now be i
How do you handle DDL changes in general? I would treat stored
procedures the same way. For instance Ruby on Rails has "database
migrations" where you write one method to apply the DDL change and
another to revert it, like this:
def up
add_column :employees, :manager_id, :integer
a
On 12/10/2014 05:03 PM, Gavin Flower wrote:
On 11/12/14 13:53, Israel Brewster wrote:
Currently, when I need to create/edit a stored procedure in
Postgresql, my workflow goes like the following:
- Create/edit the desired function in my "DB Commands" text file
- Copy and paste function into my d
On 12/10/2014 05:53 PM, Israel Brewster wrote:
Currently, when I need to create/edit a stored procedure in
Postgresql, my workflow goes like the following:
- Create/edit the desired function in my "DB Commands" text file
- Copy and paste function into my development database
- Test
- repeat abo
On 12/10/2014 04:53 PM, Israel Brewster wrote:
Currently, when I need to create/edit a stored procedure in Postgresql,
my workflow goes like the following:
- Create/edit the desired function in my "DB Commands" text file
- Copy and paste function into my development database
- Test
- repeat abov
On 11/12/14 13:53, Israel Brewster wrote:
Currently, when I need to create/edit a stored procedure in
Postgresql, my workflow goes like the following:
- Create/edit the desired function in my "DB Commands" text file
- Copy and paste function into my development database
- Test
- repeat above un
Currently, when I need to create/edit a stored procedure in Postgresql, my workflow goes like the following:- Create/edit the desired function in my "DB Commands" text file- Copy and paste function into my development database- Test- repeat above until it works as desired- Copy and paste function i
Hello,
Create a view as described @
http://www.postgresql.org/message-id/flat/3c055b7e.bb52f...@but.auc.dk#3c055b7e.bb52f...@but.auc.dk
create view my_tbldescription as
select
u.usename, t.typname AS tblname,
a.attname, a.atttypid, n.typname AS atttypname,
int4larger(a.attlen, a.atttypmod
On Mon, 2013-09-02 at 18:20 -0700, Adrian Klaver wrote:
> On 09/02/2013 06:06 PM, Bret Stern wrote:
> > 'psuedo
> >
> > Can you create stored procedures that are built from parameters as
> > below, or does this defeat the pre-compiled purpose of an SP?
> >
> > create function item_exists (tbl chara
On 09/02/2013 06:06 PM, Bret Stern wrote:
'psuedo
Can you create stored procedures that are built from parameters as
below, or does this defeat the pre-compiled purpose of an SP?
create function item_exists (tbl character varying, col character
varying, col_val character varying)
DECLARE
x i
'psuedo
Can you create stored procedures that are built from parameters as
below, or does this defeat the pre-compiled purpose of an SP?
create function item_exists (tbl character varying, col character
varying, col_val character varying)
DECLARE
x integer;
PERFORM col FROM tbl
WHERE co
, March 08, 2013 11:09 AM
To: Bradley Russell
Cc: PostgreSQL General (pgsql-general@postgresql.org)
Subject: Re: [GENERAL] stored procedure slower when called through c client
than pgadmin
2013/3/8 Bradley Russell :
> I will see if I can strip the code down more to a smaller sample. It is part
Message-
> From: Pavel Stehule [mailto:pavel.steh...@gmail.com]
> Sent: Friday, March 08, 2013 10:56 AM
> To: Bradley Russell
> Cc: PostgreSQL General (pgsql-general@postgresql.org)
> Subject: Re: [GENERAL] stored procedure slower when called through c client
> than pgadmin
>
>
.steh...@gmail.com]
Sent: Friday, March 08, 2013 10:56 AM
To: Bradley Russell
Cc: PostgreSQL General (pgsql-general@postgresql.org)
Subject: Re: [GENERAL] stored procedure slower when called through c client
than pgadmin
Hello
2013/3/8 Bradley Russell :
> We have a stored procedure that takes two int
Hello
2013/3/8 Bradley Russell :
> We have a stored procedure that takes two integers as parameters, a start
> date and a stop date.
>
>
>
> It runs some calculations on a table and updates some columns in the same
> table.
>
>
>
> The table being updated is partitioned.
>
>
>
> The server version
We have a stored procedure that takes two integers as parameters, a start date
and a stop date.
It runs some calculations on a table and updates some columns in the same table.
The table being updated is partitioned.
The server version is 9.1.8.
When we run this stored procedure through pgadmi
On 02/23/2013 02:49 PM, Derek Perak wrote:
Hi, I would like to learn about how stored procedures are handled in
postgres. In particular, I'd like to learn how plpgsql procedures are
compiled and stored, and how they (both plpgsql and C procedures)
interact with the optimizer during planning. Woul
Hi, I would like to learn about how stored procedures are handled in postgres.
In particular, I'd like to learn how plpgsql procedures are compiled and
stored, and how they (both plpgsql and C procedures) interact with the
optimizer during planning. Would appreciate if someone can point out so
On 2012-10-02, Chris McDonald wrote:
> Hi,
>
>
> If I had a single table targ to insert into I would do an
>
> INSERT INTO targ SELECT thiscol, thatcol, theothercol FROM FOO.
>
> The problem is that I have tables targ1, targ2, targn to insert things into
> and a nice stored procedure myproc whi
Thanks very much for that David - really appreciate your response - it works
like a dream
c
On Tuesday, 2 October 2012 19:42:59 UTC+1, Chris McDonald wrote:
> Hi,
>
>
>
>
>
> If I had a single table targ to insert into I would do an
>
>
>
> INSERT INTO targ SELECT thiscol, thatcol, th
> If I had a single table targ to insert into I would do an
>
> INSERT INTO targ SELECT thiscol, thatcol, theothercol FROM FOO.
>
> The problem is that I have tables targ1, targ2, targn to insert things
into and a
> nice stored procedure myproc which does the insertion into all 3 tables -
> pro
my apologies - forgot to say I am on postgresql 8.4.9 on Fedora Linux x86_64
c
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi,
If I had a single table targ to insert into I would do an
INSERT INTO targ SELECT thiscol, thatcol, theothercol FROM FOO.
The problem is that I have tables targ1, targ2, targn to insert things into and
a nice stored procedure myproc which does the insertion into all 3 tables -
problem i
Indeed there is an id field. That's the ticket!
And thanks much.
-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com]
Sent: Tuesday, February 28, 2012 12:48 PM
To: pgsql-general@postgresql.org
Cc: Lummis, Patrick J; Bartosz Dmytrak
Subject: Re: [GENERAL] S
On Tuesday, February 28, 2012 12:35:58 pm Lummis, Patrick J wrote:
> Hi Bartek,
>
> Thanks for the quick response.
>
> Syntax error cleared up and loads fine but executing the stored
> procedure fails to update the row.
>From the usage I guessing this function is not being used in a trigger. As
> Dmytrak
> *Sent:* Tuesday, February 28, 2012 12:24 PM
> *To:* Lummis, Patrick J
> *Cc:* pgsql-general@postgresql.org
> *Subject:* Re: [GENERAL] Stored Procedure Record Updates using For Loops
> - Postgres 8.1
>
> Hi,
> instead of
> *update workorderRecord set wfs
, February 28, 2012 12:24 PM
To: Lummis, Patrick J
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Stored Procedure Record Updates using For Loops -
Postgres 8.1
Hi,
instead of
update workorderRecord set wfstatus='failed';
try:
workorderRecord.wfstatus := 'failed';
Hi,
instead of
*update workorderRecord set wfstatus='failed'; *
try:
workorderRecord.wfstatus := 'failed';
I haven't tested, but workorderRecord is ROWTYPE, so shouldn't be updated
like a table.
I'm sticked to 9.1, hope the same is for 8.1
http://www.postgresql.org/docs/9.1/static/plpgsql-declara
Hi,
I'm trying to update a record within a for loop and at the point of
updating I get the following syntax error:
ERROR: syntax error at or near "$1"
LINE 1: update $1 set wfstatus='failed'
^
QUERY: update $1 set wfstatus='failed'
CONTEXT: SQL statement in PL/PgSQL functi
Hi,
Is there any way to get current stored procedure name?
Best Regards,
Thank you for your response; I understand the information provided was
somewhat limited; I am happy to provide a bit more though: I notice you guys
have quite experience modeling data...
What I am trying to do is: building views on a base table, extended by one
or more columns, extracted (hence the
Thank you for your response; I understand the information provided was
somewhat limited; I am happy to provide a bit more though: I notice you guys
have quite experience modeling data...
What I am trying to do is: building views on a base table, extended by one
or more columns, extracted (hence the
On Fri, Sep 25, 2009 at 2:40 PM, Rob Marjot wrote:
> Still no luck... To clarify a bit, take this example:
> CREATE OR REPLACE FUNCTION transpose()
> RETURNS record AS
> $BODY$ DECLARE
> output RECORD;
> BEGIN
> SELECT * INTO output FROM (VALUES(1,2)) as tbl(first,second);
> RETURN out
Rob Marjot writes:
> Any thoughts on how to make sure multiple columns are returned; without
> specifying this in the function's prototype return clause?
If you want "SELECT * FROM" to expand to multiple columns, the names
and types of those columns *must* be available at parse time. You
can eit
Still no luck... To clarify a bit, take this example:
CREATE OR REPLACE FUNCTION transpose()
RETURNS record AS
$BODY$ DECLARE
output RECORD;
BEGIN
SELECT * INTO output FROM (VALUES(1,2)) as tbl(first,second);
RETURN output;
END;$BODY$
LANGUAGE 'plpgsql' STABLE
COST 100;
Now, I e
On 25 Sep 2009, at 18:34, InterRob wrote:
Unfortunately, this results in ONE row, with ONE column. E.g.:
MYDB=# select * from (SELECT deserialize(kvp) FROM kvp) ss;
deserialize
---
(1,2)
(1 row)
I guess I am seeking to prototype the anonymous row layout in the
above SQL statement?
Dear list,
I am trying to find out whether I can use the "record" type as a polymorphic
return type to return multiple columns, to be determined at runtime. In
fact, I'm trying to write a function that provides a generic implementation
of some deserialization of a certain field.
The prototype of t
On Monday 11 August 2008 20:15:37 Mani, Arun wrote:
> Is there a configuration setting to increase the error checking level or
> any tool available to do the same.
No
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql
I am fairly new to Postgres. I noticed that the stored procedures
written in pgplsql are checked only for syntax errors and nothing more
at compile time. It does not even do that basic error checking like if
the table/field names or variable names used in the procedure are even
valid. This cause
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 12/01/07 20:40, Dragan Zubac wrote:
> Hello
>
> I have a stored procedure which does the billing stuff
> in our system,it works ok,but if I put in
> production,where there is some 5-10 billing events per
> second,the whole database slows down. It w
Hello
I have a stored procedure which does the billing stuff
in our system,it works ok,but if I put in
production,where there is some 5-10 billing events per
second,the whole database slows down. It won't even
drop some test table,reindex,vacuum,things which were
done before in the blink of an eye
On Oct 29, 2007, at 18:59 , Frank Church wrote:
Is there a built in function for retrieving the next value of a
sequence and updating the sequence counter?
http://www.postgresql.org/docs/faqs.FAQ.html#item4.11.2
http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html
Michael G
On Mon, 29 Oct 2007 23:59:59 +
"Frank Church" <[EMAIL PROTECTED]> wrote:
> Is there a built in function for retrieving the next value of a
> sequence and updating the sequence counter?
>
The docs are amazing:
http://www.postgresql.org/docs/current/static/functions-sequence.html
Sincerely,
Is there a built in function for retrieving the next value of a
sequence and updating the sequence counter?
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
On 9/7/07, genesis <[EMAIL PROTECTED]> wrote:
> appreciate any help, links etc...
See:
http://www.postgresql.org/docs/8.2/static/xfunc-sql.html#AEN36437
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
Im newbie with postgresql i want to know how to create a stored
procedure that retrieve records something like
SELECT * FROM TABLE1 WHERE TABLE1.ID = 'PARAMETER'
appreciate any help, links etc...
thanks
Germán Fonseca P.
---(end of broadcast)--
Richard Huxton wrote:
> Dave Page wrote:
>> Richard Huxton wrote:
>>> Charles Pare wrote:
Wow, it works great
Thank's for the quick answer
>>> 12 minutes? I've seen bug-patches turned around quicker than that by Tom
>>> ;-)
>>
>> Yeah, that's really quite disappointing Richard - you need
Hi, in a stored procedure, if I do COPY table FROM 'mypath' DELIMITERS '\t'; it
works but if my path is a text variable, i.e.COPY table FROM mytextvar
DELIMITERS '\t'; it doesn't work, I get ERROR: syntax error at or near "$1"SQL
state: 42601Context: SQL statement in PL/PgSQL function "parseinse
Dave Page wrote:
Richard Huxton wrote:
Charles Pare wrote:
Wow, it works great
Thank's for the quick answer
12 minutes? I've seen bug-patches turned around quicker than that by Tom
;-)
Yeah, that's really quite disappointing Richard - you need to pull your
socks up :-)
Would have been und
Richard Huxton wrote:
> Charles Pare wrote:
>> Wow, it works great
>> Thank's for the quick answer
>
> 12 minutes? I've seen bug-patches turned around quicker than that by Tom
> ;-)
Yeah, that's really quite disappointing Richard - you need to pull your
socks up :-)
/D
Charles Pare wrote:
Wow, it works great
> Thank's for the quick answer
12 minutes? I've seen bug-patches turned around quicker than that by Tom
;-)
> The Postgres community is amazing!
Mostly by volunteers helping out on lists :-)
There's always someone out there you can lend a helping han
Wow, it works greatThank's for the quick answerThe Postgres community is
amazing!Charles> Date: Tue, 3 Jul 2007 20:01:03 +0100> From: [EMAIL PROTECTED]>
To: [EMAIL PROTECTED]> CC: pgsql-general@postgresql.org> Subject: Re: [GENERAL]
Stored Procedure: Copy table from;
Charles Pare wrote:
Hi, in a stored procedure, if I do COPY table FROM 'mypath'
DELIMITERS '\t'; it works but if my path is a text variable which
contain my path, i.e.COPY table FROM mytextvar DELIMITERS '\t'; it
doesn't work, I get ERROR: syntax error at or near "$1"SQL state:
42601Context: SQL
Hi, in a stored procedure, if I do COPY table FROM 'mypath' DELIMITERS '\t'; it
works but if my path is a text variable which contain my path, i.e.COPY table
FROM mytextvar DELIMITERS '\t'; it doesn't work, I get ERROR: syntax error at
or near "$1"SQL state: 42601Context: SQL statement in PL/PgS
co de Gast
From: Thorsten Kraus [mailto:[EMAIL PROTECTED]
Sent: Friday, May 04, 2007 5:36 PM
To: Hakan Kocaman; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Stored procedure
Hi,
tha
öln, HRB 32349
Geschäftsführung: Werner Klötsch, Marco de Gast
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Thorsten Kraus
Sent: Thursday, May 03, 2007 5:27 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Stored procedure
Hi,
TECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Thorsten Kraus
> Sent: Thursday, May 03, 2007 5:27 PM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Stored procedure
>
> Hi,
>
> thanks for your answer, but I don't get the point. Perhaps
> you
erner Klötsch, Marco de Gast
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thorsten
Kraus
Sent: Thursday, May 03, 2007 5:00 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Stored proc
, 2007 5:00 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Stored procedure
Hi NG,
I want to write a stored procedure which creates a table in my
PostgreSQL database. The procedure has one input parameter: the table name.
Here
Hi NG,
I want to write a stored procedure which creates a table in my
PostgreSQL database. The procedure has one input parameter: the table name.
Here is my first try, but that does not work:
--
Richard Huxton <[EMAIL PROTECTED]> writes:
> Ah, fair enough. I *am* right in thinking that trivial SQL functions
> will have their expressions inlined though?
Yes.
regards, tom lane
---(end of broadcast)---
TIP 5: don't fo
Tom Lane wrote:
Richard Huxton <[EMAIL PROTECTED]> writes:
I must say I thought recent versions of PG delayed planning the query
until first call though.
No, you're thinking of parameterized queries sent through the FE/BE
protocol. Functions still plan without any assumptions about parameter
Richard Huxton <[EMAIL PROTECTED]> writes:
> I must say I thought recent versions of PG delayed planning the query
> until first call though.
No, you're thinking of parameterized queries sent through the FE/BE
protocol. Functions still plan without any assumptions about parameter
values.
Scott Schulthess wrote:
Hey Ya'll,
I'm a little puzzled by the speed of the stored procedures I am writing.
Here is the query alone in pgAdmin
select distinct featuretype from gnis_placenames where state='CT'
TIME: 312+16ms
Here is a stored procedure
create or replace function getfeature
Hey Ya'll,
I'm a little puzzled by the speed of the stored procedures I am writing.
Here is the query alone in pgAdmin
select distinct featuretype from gnis_placenames where state='CT'
TIME: 312+16ms
Here is a stored procedure
create or replace function getfeaturetypes(text) r
Alain Roger wrote:
> I would like to know if there is a better way how to retrieve
> result from a stored procedure (function) than to use 'AS
> res(col1 varchar, col2 timestamp,..)'
>
> for example, here is a stored procedure :
> CREATE OR REPLACE FUNCTION SP_A_003(username VARCHAR)
> RETURN
On Mon, Mar 19, 2007 at 01:54:14PM +0100, Alain Roger wrote:
> Hi,
>
> I would like to know if there is a better way how to retrieve result from a
> stored procedure (function) than to use 'AS res(col1 varchar, col2
> timestamp,..)'
Sure, create a type with the relevent field name and use that in
Hi,
I would like to know if there is a better way how to retrieve result from a
stored procedure (function) than to use 'AS res(col1 varchar, col2
timestamp,..)'
for example, here is a stored procedure :
CREATE OR REPLACE FUNCTION SP_A_003(username VARCHAR)
RETURNS SETOF RECORD AS
$BODY$
DECLAR
# [EMAIL PROTECTED] / 2007-03-13 18:29:36 +0100:
> Hi,
>
> I have a stored procedure which returns a SETOF RECORD.
> so basically a partial rowtype from a table.
>
> to execute the query in PHP, i must write :
> select * from myschema.sp_a_002('username') as result(Column1 varchar);
>
> to get t
On 3/13/07, Alain Roger <[EMAIL PROTECTED]> wrote:
Hi,
I have a stored procedure which returns a SETOF RECORD.
so basically a partial rowtype from a table.
to execute the query in PHP, i must write :
select * from myschema.sp_a_002('username') as result(Column1 varchar);
to get the result.
H
Hi,
I have a stored procedure which returns a SETOF RECORD.
so basically a partial rowtype from a table.
to execute the query in PHP, i must write :
select * from myschema.sp_a_002('username') as result(Column1 varchar);
to get the result.
However, is there another to get the result without us
RAISE NOTICE 'I am here, and myvar = % and thatvar = %', myvar, thatvar;
Thanks... it is indeed a gem that little instruction!!!
Cheers
Anton
---(end of broadcast)---
TIP 6: explain analyze is your friend
Anton Melser wrote:
> I need to analyse some html to get some links out, and with only 25
> lines in exports_tmp_links (and text_to_parse no more than around
> 10KB) this function has taken 10 minutes and counting. Something
> horribly wrong is going on here! Can someone give me any pointers?
I be
Hi,
I need to analyse some html to get some links out, and with only 25
lines in exports_tmp_links (and text_to_parse no more than around
10KB) this function has taken 10 minutes and counting. Something
horribly wrong is going on here! Can someone give me any pointers?
Cheers
Anton
delete from tm
Tom Lane wrote:
> Dave Page <[EMAIL PROTECTED]> writes:
>> ... I doubt it's likely to be anything like as much work as the
>> operator family reshuffle has been.
>
> [ blink... ] I would not have thought that the opfamily stuff would
> affect pgAdmin at all. Would you mind clarifying what proble
Merlin Moncure wrote:
> I thought stored procedures did not run implicitly in transactions
> like functions do.
That has nothing to do with the reality in PostgreSQL.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end of broadcast)--
On 2/14/07, Martijn van Oosterhout wrote:
On Wed, Feb 14, 2007 at 05:18:10PM -0500, Walter Vaughan wrote:
> This may not help, but I noticed using pgAdminIII, you can create a
> procedure or a function, but they seem to have the same creation interface
> and use the same icon.
Way back when I l
> I searched on postgreSql site and found
> a topic "Stored Procedure Example". But actually, they
> showed how to write a function on postgreSql database.
A procedure is a function with a return type of void.
---(end of broadcast)---
TIP 4: Have y
1 - 100 of 175 matches
Mail list logo