Take a look at
http://www.postgresql.org/docs/8.3/interactive/plpgsql-cursors.html
and you'll find answer you need.
> I need to convert this cursor of Oracle to Postgres...
> I wait for your help!!
--
Best regards, Yuri.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make ch
On Thu, Mar 13, 2008 at 5:54 PM, chester c young <[EMAIL PROTECTED]>
wrote:
> is there any way to share a cursor between sessions?
>
> I have a costly query whose records need to be visited by in order by n
> number of concurrent sessions, and am unable to find the best way of
> doing this.
>
> I'
On Wed, Dec 28, 2005 at 04:37:21PM -0300, Don Croata wrote:
> Please, if someone recalls a link, book, piece of code or anything with info
> about this technique for PL/PgSQL (8.1), please let us know. We've been
> searching into google, groups.google, http://archives.postgresql.org and
> http://ww
Please, if someone recalls a link, book, piece of code or anything with info about this technique for PL/PgSQL (8.1), please let us know. We've been searching into google, groups.google,
http://archives.postgresql.org and http://www.postgresql.org/docs/8.1/interactive with no results. Most of the
On Wed, Dec 28, 2005 at 10:48:25AM -0500, Tom Lane wrote:
> Don Croata <[EMAIL PROTECTED]> writes:
> > It's a function who has a cursor and calls itself, but the problem raises
> > after the first recursion, when PgSQL complains:
>
> > ERROR: cursor "cur" already in use
>
> > Are the cursors kep
Don Croata <[EMAIL PROTECTED]> writes:
> It's a function who has a cursor and calls itself, but the problem raises
> after the first recursion, when PgSQL complains:
> ERROR: cursor "cur" already in use
> Are the cursors kept globally? or cached like TEMP TABLE?
Cursor names are global within a
Just FYI, recent versions of PG use cursors internally for PL/pgSQL FOR
loops. So there is no danger for a procedure to run out of memory when
looping over a huge result set ... at least not because of that.
Jan
Dennis wrote:
Tom Lane writes:
Something like
LOOP
FET
On Sunday 11 April 2004 19:46, Dennis wrote:
> Tom Lane writes:
> > Something like
> >
> > LOOP
> > FETCH ...;
> > EXIT WHEN NOT found;
> > ...
> > END LOOP;
>
> Thank you! I tried finding documentation on "found" in this context and
> didn't come up with
Tom Lane writes:
Something like
LOOP
FETCH ...;
EXIT WHEN NOT found;
...
END LOOP;
Thank you! I tried finding documentation on "found" in this context and
didn't come up with anything. Can you point me to where it is documented?
"Dennis" <[EMAIL PROTECTED]> writes:
> I am wondering if I can use a cursor in a for loop.
Something like
LOOP
FETCH ...;
EXIT WHEN NOT found;
...
END LOOP;
should do it.
regards, tom lane
-
Releases before 7.4 are spotty about supporting backwards scan of
complex queries --- if you have a join or aggregate in the query,
it likely won't work, yielding either strange errors or wrong answers.
It will work if the top plan node in the query is a SORT, though, so
a possible workaround is to
Tomasz Myrta <[EMAIL PROTECTED]> writes:
> I wanted to use some select result several times in pl/pgsql function.
> Neither move backward 1 in test;
> nor
> execute ''move backward 1 in test'';
> doesn't work.
Releases before 7.4 are spotty about supporting backwards scan of
complex queri
Rod Taylor <[EMAIL PROTECTED]> writes:
> Enforcing spec seems like the least confusing mode to operate under,
> especially given it could break simply by changing the plan -- which
> happens automagically (seemingly random).
Keep in mind though that complaints about the current bugs have been
fair
> I'm presently leaning to #2, even though it exposes implementation
> details. I'm open to discussion though. Any preferences? Other ideas?
How about a variable that turns on or off spec enforcement (case #1 or
#2). On for 7.4, off for 7.5 the next release, and make it disappear
after that.
E
Tom,
> Postgres' implementation of cursors has always had a problem with doing
> MOVE or FETCH backwards on complex queries.
Coincidnetally enough, I was just chatting with one of my contractors
yesterday about how the one thing that Transact-SQL has to offer is a really
good cursor implementa
Preeti,
> Is there a command in plpgsql similar to %NOTFOUND of oracle?
Cursors are not currently supported for PL/pgSQL. There are plans to
include them for and upcoming version of Postgres. But dont' wait your
application on it.
> i want to write a load script which takes each row from the
16 matches
Mail list logo