Обсуждение: PostgreSQL ODBC: Bug with Insert when using parameters arrays ??

Поиск
Список
Период
Сортировка

PostgreSQL ODBC: Bug with Insert when using parameters arrays ??

От
"Jol Valentine"
Дата:
Hi,

as a follow up to my previous note I have since download the PostgreSQL ODBC
source code
and compiled it under Visual Studio .NET 2003. It's all up and running OK.

It looks like the problem is in PGAPI_Execute(...) in execute.c.

In the for loop at line 558
for (i = 0; i < apdopts->allocated; i++)
the data_at_exec parameters are being counted, but this is only looping
through the columns,
the fact that there are multiple rows of data is not being taken account of.
In my case apdopts->paramset_size is 3.

Looking at the code in more detail it looks like you simply don't support
the inserting of multiple
"data at execution" parameters per column. Do you know if anyone is working
on this at the moment
or is it a known deficiency ? Is it worth me taking a look at it ?

regards,
Jol Valentine.



Re: PostgreSQL ODBC: Bug with Insert when using parameters arrays ??

От
Jeff Eckermann
Дата:
--- Jol Valentine <jolv@genaware.com> wrote:
> Hi,
>
> as a follow up to my previous note I have since
> download the PostgreSQL ODBC
> source code
> and compiled it under Visual Studio .NET 2003. It's
> all up and running OK.
>
> It looks like the problem is in PGAPI_Execute(...)
> in execute.c.
>
> In the for loop at line 558
> for (i = 0; i < apdopts->allocated; i++)
> the data_at_exec parameters are being counted, but
> this is only looping
> through the columns,
> the fact that there are multiple rows of data is not
> being taken account of.
> In my case apdopts->paramset_size is 3.
>
> Looking at the code in more detail it looks like you
> simply don't support
> the inserting of multiple
> "data at execution" parameters per column. Do you
> know if anyone is working
> on this at the moment
> or is it a known deficiency ? Is it worth me taking
> a look at it ?
>

AFAIK the only effort going on is maintenance, rather
than development.  We have far too few ODBC driver
developers, so if you want to do something, have at
it.  If you are planning to make any significant
changes, I would suggest that you subscribe to the
pgsql-hackers list, where you can get knowledgable
critiques of any proposal.

> regards,
> Jol Valentine.
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: PostgreSQL ODBC: Bug with Insert when using parameters arrays

От
Hiroshi Inoue
Дата:
Jol Valentine wrote:
>
> Hi,
>
> as a follow up to my previous note I have since download the PostgreSQL ODBC
> source code
> and compiled it under Visual Studio .NET 2003. It's all up and running OK.
>
> It looks like the problem is in PGAPI_Execute(...) in execute.c.
>
> In the for loop at line 558
> for (i = 0; i < apdopts->allocated; i++)
> the data_at_exec parameters are being counted, but this is only looping
> through the columns,

I'm taking account of current_row in the code.

> the fact that there are multiple rows of data is not being taken account of.
> In my case apdopts->paramset_size is 3.

Do you have concrete examples ?

regards,
Hiroshi Inoue
    http://www.geocities.jp/inocchichichi/psqlodbc/

Re: PostgreSQL ODBC: Bug with Insert when using parameters arrays ??

От
"Jol Valentine"
Дата:
Hi Hiroshi !

----- Original Message -----
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Jol Valentine" <jolv@genaware.com>
Cc: <pgsql-odbc@postgresql.org>
Sent: Wednesday, August 27, 2003 8:13 PM
Subject: Re: [ODBC] PostgreSQL ODBC: Bug with Insert when using parameters
arrays ??


> Jol Valentine wrote:
> >
> > Hi,
> >
> > as a follow up to my previous note I have since download the PostgreSQL
ODBC
> > source code
> > and compiled it under Visual Studio .NET 2003. It's all up and running
OK.
> >
> > It looks like the problem is in PGAPI_Execute(...) in execute.c.
> >
> > In the for loop at line 558
> > for (i = 0; i < apdopts->allocated; i++)
> > the data_at_exec parameters are being counted, but this is only looping
> > through the columns,
>
> I'm taking account of current_row in the code.

yes, but I'm only taking about data_at_exec or 'late' bound parameters.
(which wouldn't have been clear from my comments above, but my
previous emails were rejected.)
The processing for these is not correct, only the first row of data is being
processed.

>
> > the fact that there are multiple rows of data is not being taken account
of.
> > In my case apdopts->paramset_size is 3.
>
> Do you have concrete examples ?

Yes I have some LONGVARCHAR data that is not being inserted correctly.
I tried to send all the details (twice) including log files etc to
pgsql-odbc@postgresql.org but it was rejected as being too large.
Do you want me to send you these ?

In any case I've fixed the problem, I'm just currently doing some testing.

regards,
Jol.

>
> regards,
> Hiroshi Inoue
> http://www.geocities.jp/inocchichichi/psqlodbc/
>