Unix Technical Forum

Move cursor support for pl/pgsql

This is a discussion on Move cursor support for pl/pgsql within the Pgsql Patches forums, part of the PostgreSQL category; --> Hi! I took a stab at implementing MOVE support for cursors in PL/pgsql, because I wanted it for a ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:31 AM
Magnus Hagander
 
Posts: n/a
Default Move cursor support for pl/pgsql

Hi!

I took a stab at implementing MOVE support for cursors in PL/pgsql,
because I wanted it for a project. Attached patch *seems* to work. But..
Given that this is my first venture into touching bison/flex files, I
may be completely off-target in how it's done.

Could somebody take a look at it and comment on if I'm completelyi off
or only slightly off?
(And if there are good arguments not to include MOVE support at all in
pl/pgsql, I'd still be interested in comments on the rest of it, in
order to learn..)

Thanks!

//Magnus



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:38 AM
Tom Lane
 
Posts: n/a
Default Re: Move cursor support for pl/pgsql

Magnus Hagander <magnus@hagander.net> writes:
> I took a stab at implementing MOVE support for cursors in PL/pgsql,
> because I wanted it for a project. Attached patch *seems* to work. But..
> Given that this is my first venture into touching bison/flex files, I
> may be completely off-target in how it's done.


I disapprove of hard-wiring the fetch count as an integer constant;
there's no good reason not to treat it as an expression. So you should
drop the T_NUMBER thing.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 10:38 AM
Magnus Hagander
 
Posts: n/a
Default Re: Move cursor support for pl/pgsql

Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> I took a stab at implementing MOVE support for cursors in PL/pgsql,
>> because I wanted it for a project. Attached patch *seems* to work. But..
>> Given that this is my first venture into touching bison/flex files, I
>> may be completely off-target in how it's done.

>
> I disapprove of hard-wiring the fetch count as an integer constant;
> there's no good reason not to treat it as an expression. So you should
> drop the T_NUMBER thing.


Will do, thanks for commenting. I'm also going to merge it with Pavels
work that I had completely missed earlier.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com