agora inbox for pgus-general@postgresql.org  
help / color / mirror / Atom feed
DECLARING THE CURSOR WITH HOLD
6+ messages / 3 participants
[nested] [flat]

* DECLARING THE CURSOR WITH HOLD
@ 2013-05-21 23:27  Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Sajeev Mayandi @ 2013-05-21 23:27 UTC (permalink / raw)
  To: pgus-general

Hi,

I am trying to declare a cursor with hold  along with NO SCROLL option.  I am getting syntax error. Just wondering if CURSOR WITH HOLD option supported. My code snip is.

DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from phostmapping;

NOTE: The code is in plpgsql.

Thanks,

Sajeev

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: DECLARING THE CURSOR WITH HOLD
@ 2013-05-22 00:57  Adrian Klaver <adrian.klaver@gmail.com>
  parent: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Adrian Klaver @ 2013-05-22 00:57 UTC (permalink / raw)
  To: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>; +Cc: pgus-general

On 05/21/2013 04:27 PM, Sajeev Mayandi wrote:
> Hi,
>
> I am trying to declare a cursor with hold  along with NO SCROLL option.
>   I am getting syntax error. Just wondering if CURSOR WITH HOLD option
> supported. My code snip is.
>
> DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from
> phostmapping;
>
> NOTE: The code is in plpgsql.

Two things.

1) The correct list for questions like this is:

pgsql-general

You can subscribe here:
http://www.postgresql.org/community/lists/subscribe/

2) When you resubmit this post the following information would be helpful:

Postgres version

The actual error message

The DECLARE statement in context, in other words show as much of the 
plpgsql code as possible.

>
> Thanks,
>
> Sajeev


-- 
Adrian Klaver
adrian.klaver@gmail.com


-- 
Sent via pgus-general mailing list (pgus-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgus-general



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* DECLARING THE CURSOR WITH HOLD
@ 2013-05-22 17:14  Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  parent: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Sajeev Mayandi @ 2013-05-22 17:14 UTC (permalink / raw)
  To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>



Hi,

I am trying to declare a cursor with hold  along with NO SCROLL option.  I am getting syntax error. Just wondering if CURSOR WITH HOLD option supported. My code snip is.

DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from phostmapping;

NOTE: The code is in plpgsql and postgresql version is 9.2.

Thanks,

Sajeev

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: DECLARING THE CURSOR WITH HOLD
@ 2013-05-22 17:19  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Pavel Stehule @ 2013-05-22 17:19 UTC (permalink / raw)
  To: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>; +Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>

Hello

2013/5/22 Sajeev Mayandi <Sajeev_Mayandi@symantec.com>:
>
>
> Hi,
>
> I am trying to declare a cursor with hold  along with NO SCROLL option.  I
> am getting syntax error. Just wondering if CURSOR WITH HOLD option
> supported. My code snip is.
>
> DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from
> phostmapping;
>
> NOTE: The code is in plpgsql and postgresql version is 9.2.
>

holdable cursors are not supported in plpgsql

Regards

Pavel Stehule

> Thanks,
>
> Sajeev


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: DECLARING THE CURSOR WITH HOLD
@ 2013-05-22 17:21  Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  parent: Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Sajeev Mayandi @ 2013-05-22 17:21 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>

Is there a work around to declare the cursor with hold?

Thanks,

Sajeev

On 5/22/13 10:19 AM, "Pavel Stehule" <pavel.stehule@gmail.com> wrote:

>Hello
>
>2013/5/22 Sajeev Mayandi <Sajeev_Mayandi@symantec.com>:
>>
>>
>> Hi,
>>
>> I am trying to declare a cursor with hold  along with NO SCROLL option.
>> I
>> am getting syntax error. Just wondering if CURSOR WITH HOLD option
>> supported. My code snip is.
>>
>> DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from
>> phostmapping;
>>
>> NOTE: The code is in plpgsql and postgresql version is 9.2.
>>
>
>holdable cursors are not supported in plpgsql
>
>Regards
>
>Pavel Stehule
>
>> Thanks,
>>
>> Sajeev



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: DECLARING THE CURSOR WITH HOLD
@ 2013-05-22 17:23  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Pavel Stehule @ 2013-05-22 17:23 UTC (permalink / raw)
  To: Sajeev Mayandi <Sajeev_Mayandi@symantec.com>; +Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>

Maybe refcursors ??

All what you can do with cursors is described in
http://www.postgresql.org/docs/9.3/static/plpgsql-cursors.html

Regards

Pavel

2013/5/22 Sajeev Mayandi <Sajeev_Mayandi@symantec.com>:
> Is there a work around to declare the cursor with hold?
>
> Thanks,
>
> Sajeev
>
> On 5/22/13 10:19 AM, "Pavel Stehule" <pavel.stehule@gmail.com> wrote:
>
>>Hello
>>
>>2013/5/22 Sajeev Mayandi <Sajeev_Mayandi@symantec.com>:
>>>
>>>
>>> Hi,
>>>
>>> I am trying to declare a cursor with hold  along with NO SCROLL option.
>>> I
>>> am getting syntax error. Just wondering if CURSOR WITH HOLD option
>>> supported. My code snip is.
>>>
>>> DECLARE noncontainer NO SCROLL CURSOR WITH HOLD FOR SELECT * from
>>> phostmapping;
>>>
>>> NOTE: The code is in plpgsql and postgresql version is 9.2.
>>>
>>
>>holdable cursors are not supported in plpgsql
>>
>>Regards
>>
>>Pavel Stehule
>>
>>> Thanks,
>>>
>>> Sajeev
>


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2013-05-22 17:23 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 23:27 DECLARING THE CURSOR WITH HOLD Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
2013-05-22 00:57 ` Adrian Klaver <adrian.klaver@gmail.com>
2013-05-22 17:14 ` Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
2013-05-22 17:19   ` Pavel Stehule <pavel.stehule@gmail.com>
2013-05-22 17:21     ` Sajeev Mayandi <Sajeev_Mayandi@symantec.com>
2013-05-22 17:23       ` Pavel Stehule <pavel.stehule@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox