Re: streaming result sets: progress

Поиск
Список
Период
Сортировка
От snpe
Тема Re: streaming result sets: progress
Дата
Msg-id 200211150212.35765.snpe@snpe.co.yu
обсуждение исходный текст
Ответ на Re: streaming result sets: progress  (Nic Ferrier <nferrier@tapsellferrier.co.uk>)
Ответы Re: streaming result sets: progress
Re: streaming result sets: progress
Список pgsql-jdbc
On Thursday 14 November 2002 07:31 pm, Nic Ferrier wrote:
> Barry Lind <blind@xythos.com> writes:
> > nferrier@tapsellferrier.co.uk wrote:
> > > snpe <snpe@snpe.co.yu> writes:
> > >
> > > Yes. But the reason I send:
> > >
> > > DECLARE JDBC_CURS_1 CURSOR FOR select * from tab FETCH FORWARD 100 FROM
> > > JDBC_CURS_1;
> > >
> > > is because the SQL statement you supply is _supposed_ to end with a
> > > ";". The code for the above is actually doing:
> > >
> > >    DECLARE JDBC_CURS_1 CURSOR FOR $userquery  FETCH FORWARD 100 FROM
> > > JDBC_CURS_1;
> > >
> > > where $userquery is what comes in from the client code, eg:
> > >
> > >    Statement st = con.createStatement();
> > >    ResultSet rs = con.executeQuery("select * from tab;");
> > >
> > > then "select * from tab;" is inserted as $userquery. It must always
> > > end with ";" because that's how PGSQL's normal query processing works.
> >
> > The the ; is not required for the rest of the jdbc driver.  In fact in
> > other areas of the code (like server prepared statements, batch updates)
> > the requirement is that the user supplied sql statement does *not* end
> > in a ;.
> >
> > This is also consistent with other jdbc drivers.  In fact oracle gives
> > you an error if a sql statement ends with a ;.
>
> Apologies to everyone paying attention to this thread... in my
> experience postgres has always complained when I haven't supplied the
> ";".
>
> I will investigate and fix the patch.
>

I work with patch and I have any problem yet

1) ResultSet.setFetchSize, Statement.getFetchSize and ResultSet.getFetchSize
don't work
2) any methods in DataBaseMetaData don't work
example, getBestRowIdentifier
getBestRowIdentifier create ResultSet without execSQL (direct) and
when we call ResultSet.next, after last row driverreturn error
(driver send command 'FETCH FORWARD 0 FROM ;'
3) if I have two or more query pgsql return warning 'BEGIN : already a
transaction in progress'
4) This is greatest problem :
If I create query and then want transaction without close query, I break
query.
example :
  a) create statement for 'select ..' and fetch any rows
  b) do any update,delete or update and commit or rollback
query is lost
  I think that problem 4) can be make only with cursor outre of transaction

regards
Haris Peco

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Nic Ferrier
Дата:
Сообщение: Re: streaming result sets: progress
Следующее
От: nferrier@tapsellferrier.co.uk
Дата:
Сообщение: Re: streaming result sets: progress