Re: [HACKERS] Updateable cursors

2007-01-29 Thread Richard Troy
On Wed, 24 Jan 2007, John Bartlett wrote: [regarding optional DBA/SysAdmin logging of Updateable Cursors] > > I can see where you are coming from but I am not sure if a new log entry > would be such a good idea. The result of creating such a low level log could > be to increase the amount of loggi

Re: [HACKERS] Updateable cursors

2007-01-24 Thread Simon Riggs
On Wed, 2007-01-24 at 14:27 +0100, Zeugswetter Andreas ADI SD wrote: > > That is also the safe thing to do, since PostgreSQL's implementation > of > > WITH HOLD cursors doesn't leave the rows locked. That can lead to the > > rows being deleted from under the cursor, for which the standard is > > un

Re: [HACKERS] Updateable cursors

2007-01-24 Thread Zeugswetter Andreas ADI SD
> That is also the safe thing to do, since PostgreSQL's implementation of > WITH HOLD cursors doesn't leave the rows locked. That can lead to the > rows being deleted from under the cursor, for which the standard is > unclear as to whether that is acceptable, or not. Um, the default use case is t

Re: [HACKERS] Updateable cursors

2007-01-24 Thread Simon Riggs
On Wed, 2007-01-24 at 14:54 +1100, John Bartlett wrote: > The reason for those 5 options is to consider different means to cover the > Prepared Stmt requirement where the different stages of processing are > actually in different transactions. John, Thanks for explaining. Wow! I've never come

Re: [HACKERS] Updateable cursors

2007-01-23 Thread John Bartlett
: FAST PostgreSQL Cc: PostgreSQL-development Subject: Re: [HACKERS] Updateable cursors On Wed, 2007-01-24 at 02:42 +1100, FAST PostgreSQL wrote: > In the UPDATE or DELETE statements the 'WHERE CURRENT OF ' > clause results in the cursor name being placed in the UpdateStmt

Re: [HACKERS] Updateable cursors

2007-01-23 Thread John Bartlett
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Troy Sent: Wednesday, 24 January 2007 4:37 AM To: FAST PostgreSQL Cc: PostgreSQL-development Subject: Re: [HACKERS] Updateable cursors On Wed, 24 Jan 2007, FAST PostgreSQL wrote: > > We are try

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Richard Troy
On Wed, 24 Jan 2007, FAST PostgreSQL wrote: > > We are trying to develop the updateable cursors functionality into > Postgresql. I have given below details of the design and also issues we are > facing. Looking forward to the advice on how to proceed with these issues. > > Rgds, > Arul Shaji > H

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Simon Riggs
On Tue, 2007-01-23 at 10:39 -0500, Tom Lane wrote: > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > On Tue, 2007-01-23 at 09:55 -0500, Tom Lane wrote: > >> This really isn't gonna work, because it assumes that the tuple that is > >> "current" at the instant of parsing is still going to be "current"

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Tom Lane
"Simon Riggs" <[EMAIL PROTECTED]> writes: > On Tue, 2007-01-23 at 09:55 -0500, Tom Lane wrote: >> This really isn't gonna work, because it assumes that the tuple that is >> "current" at the instant of parsing is still going to be "current" at >> execution time. > Of course thats true, but you've m

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Simon Riggs
On Tue, 2007-01-23 at 09:55 -0500, Tom Lane wrote: > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > On Wed, 2007-01-24 at 02:42 +1100, FAST PostgreSQL wrote: > >> In the UPDATE or DELETE statements the ‘WHERE CURRENT OF ’ > >> clause results in the cursor name being placed in the UpdateStmt or > >

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Tom Lane
"Simon Riggs" <[EMAIL PROTECTED]> writes: > On Wed, 2007-01-24 at 02:42 +1100, FAST PostgreSQL wrote: >> In the UPDATE or DELETE statements the ‘WHERE CURRENT OF ’ >> clause results in the cursor name being placed in the UpdateStmt or >> DeleteStmt structure. During the processing of the func

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Lukas Kahwe Smith
Joshua D. Drake wrote: Lukas Kahwe Smith wrote: Joshua D. Drake wrote: Great! I will put it on my, "Remember to bug Arul" list :) Hey Joshua, could you put this stuff here: http://developer.postgresql.org/index.php/Todo:WishlistFor83 Sure if you bother to unlock the page for me ;) hmm ..

Re: [HACKERS] Updateable cursors

2007-01-23 Thread Simon Riggs
On Wed, 2007-01-24 at 02:42 +1100, FAST PostgreSQL wrote: > In the UPDATE or DELETE statements the ‘WHERE CURRENT OF ’ > clause results in the cursor name being placed in the UpdateStmt or > DeleteStmt structure. During the processing of the functions - > transformDeleteStmt() and transformUpda

Re: [HACKERS] Updateable cursors

2007-01-22 Thread Joshua D. Drake
Lukas Kahwe Smith wrote: > Joshua D. Drake wrote: > >> Great! I will put it on my, "Remember to bug Arul" list :) > > Hey Joshua, > > could you put this stuff here: > http://developer.postgresql.org/index.php/Todo:WishlistFor83 Sure if you bother to unlock the page for me ;) > > I will try to

Re: [HACKERS] Updateable cursors

2007-01-22 Thread Lukas Kahwe Smith
Joshua D. Drake wrote: Great! I will put it on my, "Remember to bug Arul" list :) Hey Joshua, could you put this stuff here: http://developer.postgresql.org/index.php/Todo:WishlistFor83 I will try to find some time during this week (likely on the weekend) to also try and figure out if these

Re: [HACKERS] Updateable cursors

2007-01-22 Thread Joshua D. Drake
FAST PostgreSQL wrote: > On Tue, 23 Jan 2007 15:48, Joshua D. Drake wrote: >> FAST PostgreSQL wrote: >>> We are trying to develop the updateable cursors functionality into >>> Postgresql. I have given below details of the design and also issues we >>> are facing. Looking forward to the advice on h

Re: [HACKERS] Updateable cursors

2007-01-22 Thread FAST PostgreSQL
On Tue, 23 Jan 2007 15:48, Joshua D. Drake wrote: > FAST PostgreSQL wrote: > > We are trying to develop the updateable cursors functionality into > > Postgresql. I have given below details of the design and also issues we > > are facing. Looking forward to the advice on how to proceed with these >

Re: [HACKERS] Updateable cursors

2007-01-22 Thread Joshua D. Drake
FAST PostgreSQL wrote: > We are trying to develop the updateable cursors functionality into > Postgresql. I have given below details of the design and also issues we are > facing. Looking forward to the advice on how to proceed with these issues. > > Rgds, > Arul Shaji Would this be something

[HACKERS] Updateable cursors

2007-01-22 Thread FAST PostgreSQL
We are trying to develop the updateable cursors functionality into Postgresql. I have given below details of the design and also issues we are facing. Looking forward to the advice on how to proceed with these issues. Rgds, Arul Shaji 1. Introduction -- This is a combined prop

Re: [HACKERS] updateable cursors & visibility

2003-04-02 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > Regardless of which, we could insert a special case in ExecutePlan() (or > somewhere more appropriate?) to test that the tuple returned from the > lower level ExecTidScan() still satisifies the cursor query. It should be > sufficient to use HeapTupleSatisf

Re: [HACKERS] updateable cursors & visibility

2003-04-02 Thread Gavin Sherry
On Mon, 31 Mar 2003, Peter Eisentraut wrote: > Tom Lane writes: > > > Serializable or not, there is a good case for saying that cursors don't > > see changes made after they are opened, period. > > No one disputes that insensitive cursors are a valid concept. But this > discussion is about upda

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hannu Krosing
Hiroshi Inoue kirjutas E, 31.03.2003 kell 19:08: > > -Original Message- > > From: Hannu Krosing [mailto:[EMAIL PROTECTED] > > > > Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > > > > > 2) dynamic > > >It can detect any changes made to the membership, order, > > >and values of

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hannu Krosing
Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > Tom Lane wrote: > > > > Serializable or not, there is a good case for saying that cursors don't > > see changes made after they are opened, period. The current > > implementation locks down the cursor's snapshot at DECLARE time. > > It's only b

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hiroshi Inoue
> -Original Message- > From: Hannu Krosing [mailto:[EMAIL PROTECTED] > > Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > > > 2) dynamic > >It can detect any changes made to the membership, order, > >and values of the result set after the cursor is opened. > > What would it me

Re: [HACKERS] updateable cursors & visibility

2003-03-30 Thread Hiroshi Inoue
Tom Lane wrote: (B> (B> Peter Eisentraut <[EMAIL PROTECTED]> writes: (B> > Hiroshi Inoue writes: (B> >> Must a SENSITIVE cursor see other applications' changes made (B> >> while the cursor is open ? (B> > Yes. It is immaterial whether the change came from a different (B> > application or t

Re: [HACKERS] updateable cursors & visibility

2003-03-30 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Hiroshi Inoue writes: >> Must a SENSITIVE cursor see other applications' changes made >> while the cursor is open ? > Yes. It is immaterial whether the change came from a different > application or the same one. > Nevertheless, the cursor sensitivity

Re: [HACKERS] updateable cursors & visibility

2003-03-29 Thread Peter Eisentraut
Hiroshi Inoue writes: > Must a SENSITIVE cursor see other applications' changes made > while the cursor is open ? Yes. It is immaterial whether the change came from a different application or the same one. Nevertheless, the cursor sensitivity does not excuse you from observing the transaction i

Re: [HACKERS] updateable cursors & visibility

2003-03-28 Thread Bruce Momjian
Hiroshi Inoue wrote: > > -Original Message- > > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > > > > Hiroshi Inoue wrote: > > > > > If the cursor is INSENSITIVE, it mustn't see the row ? > > > > > > > > Right. > > > > > > If so, isn't the difference between SENSITIVE and INSENSITIVE ext

Re: [HACKERS] updateable cursors & visibility

2003-03-28 Thread Hiroshi Inoue
> -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > > Hiroshi Inoue wrote: > > > > If the cursor is INSENSITIVE, it mustn't see the row ? > > > > > > Right. > > > > If so, isn't the difference between SENSITIVE and INSENSITIVE extreme ? > > Yes. > > > Why do you or P

Re: [HACKERS] updateable cursors & visibility

2003-03-28 Thread Bruce Momjian
Hiroshi Inoue wrote: > > > If the cursor is INSENSITIVE, it mustn't see the row ? > > > > Right. > > If so, isn't the difference between SENSITIVE and INSENSITIVE extreme ? Yes. > Why do you or Peter refer to ASENSITIVE little ? Not sure --- ASENSITIVE seems to be "do whatever you want", which

Re: [HACKERS] updateable cursors & visibility

2003-03-28 Thread Hiroshi Inoue
> -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > > Hiroshi Inoue wrote: > > > > I don't understand what you two are discussing. > > > > What's is SENSITIVE, INSENSITIVE or ASESNSITIVE ? > > > > > > In SQL99 standard, I see: > > > > > > - If the cursor is i

Re: [HACKERS] updateable cursors & visibility

2003-03-28 Thread Bruce Momjian
Hiroshi Inoue wrote: > > > I don't understand what you two are discussing. > > > What's is SENSITIVE, INSENSITIVE or ASESNSITIVE ? > > > > In SQL99 standard, I see: > > > > - If the cursor is insensitive, then significant changes are not > > visible. > > > > - If

Re: [HACKERS] updateable cursors & visibility

2003-03-27 Thread Hiroshi Inoue
Bruce Momjian wrote: (B> (B> Hiroshi Inoue wrote: (B> > Bruce Momjian wrote: (B> > > (B> > > Peter Eisentraut wrote: (B> > > > Bruce Momjian writes: (B> > > > (B> > (B> > I don't understand what you two are discussing. (B> > What's is SENSITIVE, INSENSITIVE or ASESNSITIVE ? (B> (B> In

Re: [HACKERS] updateable cursors & visibility

2003-03-27 Thread Han
Hiroshi Inoue, But still can't explain this: SENSITIVE => not READ_ONLY It's in the ODBC Spec. >Bruce Momjian wrote: >> >> Sorry, no idea. Peter's idea is that FOR UPDATE requires SENSITIVE, so >> INSENSITIVE has to be READONLY because the update has to

Re: [HACKERS] updateable cursors & visibility

2003-03-27 Thread Bruce Momjian
Hiroshi Inoue wrote: > Bruce Momjian wrote: > > > > Peter Eisentraut wrote: > > > Bruce Momjian writes: > > > > > > > One idea is to require FOR UPDATE on the cursor --- while that prevents > > > > other transactions from changing the cursor, it doesn't deal with the > > > > current transaction mo

Re: [HACKERS] updateable cursors & visibility

2003-03-27 Thread Hiroshi Inoue
Bruce Momjian wrote: (B> (B> Peter Eisentraut wrote: (B> > Bruce Momjian writes: (B> > (B> > > One idea is to require FOR UPDATE on the cursor --- while that prevents (B> > > other transactions from changing the cursor, it doesn't deal with the (B> > > current transaction modifying the tabl

Re: [HACKERS] updateable cursors & visibility

2003-03-27 Thread Hiroshi Inoue
Bruce Momjian wrote: (B> (B> Sorry, no idea. Peter's idea is that FOR UPDATE requires SENSITIVE, so (B> INSENSITIVE has to be READONLY because the update has to see other (B> changes to be accurate. (B> (B> I think clearly SENSITIVE/READONLY should be possible, so: (B> (B> READO

Re: [HACKERS] updateable cursors & visibility

2003-03-26 Thread Bruce Momjian
Sorry, no idea. Peter's idea is that FOR UPDATE requires SENSITIVE, so INSENSITIVE has to be READONLY because the update has to see other changes to be accurate. I think clearly SENSITIVE/READONLY should be possible, so: READONLY/SENSITIVE possible READONLY/INSENSITIVEp

Re: [HACKERS] updateable cursors & visibility

2003-03-25 Thread snpe
Hello Neil, I try example for Oracle jdbc 1.4 driver This is sample and results. I hope that is helps. If you want yet another example, please tell me. regards Haris Peco /** * A simple sample to check the availability of scrollable result sets. * * Please use jdk1.2 or later version

Re: [HACKERS] updateable cursors & visibility

2003-03-24 Thread Bruce Momjian
Neil Conway wrote: > On Mon, 2003-03-24 at 22:50, Hiroshi Inoue wrote: > > Does the SQL standard allow INSENSITIVE updatable cursors ? > > Hmmm... apparently not: > > (Subsection 14.1, Syntax Rules of DECLARE CURSOR) > > 11) If an of FOR UPDATE with or without a name list> is specified, then I

Re: [HACKERS] updateable cursors & visibility

2003-03-24 Thread Neil Conway
On Mon, 2003-03-24 at 22:50, Hiroshi Inoue wrote: > Does the SQL standard allow INSENSITIVE updatable cursors ? Hmmm... apparently not: (Subsection 14.1, Syntax Rules of DECLARE CURSOR) 11) If an of FOR UPDATE with or without a is specified, then INSENSITIVE shall not be specified and QE shall

Re: [HACKERS] updateable cursors & visibility

2003-03-24 Thread Hiroshi Inoue
Neil Conway wrote: (B> (B> Folks, (B> (B> I'd like to implement updateable cursors. I'll be working on just (B> getting updateable cursors working for relatively simple SELECT queries (B> (e.g. no joins, aggregates, grouping, user-defined function calls, (B> etc.). BTW, I believe that's al

Re: [HACKERS] updateable cursors & visibility

2003-03-24 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > - if the user updates a row X in the cursor, then rewinds the cursor and > fetches X again, should they see the new X or the old X? If it's considered an insensitive cursor, I'd think it should see the old X. You would have a hard time making the code do

[HACKERS] updateable cursors & visibility

2003-03-24 Thread Neil Conway
Folks, I'd like to implement updateable cursors. I'll be working on just getting updateable cursors working for relatively simple SELECT queries (e.g. no joins, aggregates, grouping, user-defined function calls, etc.). BTW, I believe that's all the SQL spec requires, but I need to double check tha