pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PGAPI_ProcedureColumns and no support for table output arguments
4+ messages / 2 participants
[nested] [flat]

* PGAPI_ProcedureColumns and no support for table output arguments
@ 2017-04-13 03:08  Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
  0 siblings, 1 reply; 4+ messages in thread

From: Matej.PgODBC@Neosys @ 2017-04-13 03:08 UTC (permalink / raw)
  To: pgsql-odbc

Hi Everyone,

While debugging the driver, I've noticed that there is no support for table output arguments (proargmodes = 't').

Is this intentional or is it a simple omission or even a bug?

Regards,
   Matej Mihelič.


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



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

* Re: PGAPI_ProcedureColumns and no support for table output arguments
@ 2017-04-19 06:35  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
  0 siblings, 1 reply; 4+ messages in thread

From: Inoue, Hiroshi @ 2017-04-19 06:35 UTC (permalink / raw)
  To: Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>; +Cc: pgsql-odbc

Hi,

On 2017/04/13 12:08, Matej.PgODBC@Neosys wrote:
> Hi Everyone,
>
> While debugging the driver, I've noticed that there is no support for table output arguments (proargmodes = 't').
>
> Is this intentional or is it a simple omission or even a bug?

When SQLProcedureColumns() was implemented, table output arguments did 
not exist.
Unfortunately I've not known table output arguments.
Is it OK to interpret them as OUT parameters?

regards,
Hiroshi Inoue


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



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

* Re: PGAPI_ProcedureColumns and no support for table output arguments
@ 2017-04-21 06:53  Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Matej.PgODBC@Neosys @ 2017-04-21 06:53 UTC (permalink / raw)
  To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-odbc

On Wed, 19 Apr 2017 15:35:23 +0900
"Inoue, Hiroshi" <h-inoue@dream.email.ne.jp> wrote:

> Hi,
> 
> On 2017/04/13 12:08, Matej.PgODBC@Neosys wrote:
> > Hi Everyone,
> >
> > While debugging the driver, I've noticed that there is no support for table output arguments (proargmodes = 't').
> >
> > Is this intentional or is it a simple omission or even a bug?
> 
> When SQLProcedureColumns() was implemented, table output arguments did 
> not exist.
> Unfortunately I've not known table output arguments.
> Is it OK to interpret them as OUT parameters?

Good morning Hiroshi,

I think the appropriate mapping for the table output columns is SQL_RESULT_COL.

I am slightly confused why an additional column with no name and type SQL_RESULT_COL is being reported with procedures returning table results. I would expect an additional SQL_RETURN_VALUE field, but what I am seeing is like a duplication of one, perhaps the last one, of the output table's columns.

We are still in the process of validating this change. The first results with our application are positive, but we haven't made any systematic tests.

Regards,
   Matej.
> 
> regards,
> Hiroshi Inoue


-- 
Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>


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



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

* Re: PGAPI_ProcedureColumns and no support for table output arguments
@ 2017-04-21 13:30  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
  0 siblings, 0 replies; 4+ messages in thread

From: Inoue, Hiroshi @ 2017-04-21 13:30 UTC (permalink / raw)
  To: Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>; +Cc: pgsql-odbc

Hi Matej,

On 2017/04/21 15:53, Matej.PgODBC@Neosys wrote:
> On Wed, 19 Apr 2017 15:35:23 +0900
> "Inoue, Hiroshi" <h-inoue@dream.email.ne.jp> wrote:
>
>> Hi,
>>
>> On 2017/04/13 12:08, Matej.PgODBC@Neosys wrote:
>>> Hi Everyone,
>>>
>>> While debugging the driver, I've noticed that there is no support for table output arguments (proargmodes = 't').
>>>
>>> Is this intentional or is it a simple omission or even a bug?
>> When SQLProcedureColumns() was implemented, table output arguments did
>> not exist.
>> Unfortunately I've not known table output arguments.
>> Is it OK to interpret them as OUT parameters?
> Good morning Hiroshi,
>
> I think the appropriate mapping for the table output columns is SQL_RESULT_COL.
>
> I am slightly confused why an additional column with no name and type SQL_RESULT_COL is being reported with procedures returning table results. I would expect an additional SQL_RETURN_VALUE field, but what I am seeing is like a duplication of one, perhaps the last one, of the output table's columns.

OK, how about the attached patch?

regards,
Hiroshi Inoue

> We are still in the process of validating this change. The first results with our application are positive, but we haven't made any systematic tests.
>
> Regards,
>     Matej.
>> regards,
>> Hiroshi Inoue

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

Attachments:

info.patch (text/x-diff, 1.0K) download diff --git a/info.c b/info.c index 76bcedd..1b87665 100644 --- a/info.c +++ b/info.c @@ -5106,7 +5106,8 @@ mylog("atttypid=%s\n", atttypid ? atttypid : "(null)"); switch (*proargmodes) { case 'o': - ptype = SQL_PARAM_OUTPUT; + case 't': + ptype = bRetset ? SQL_RESULT_COL : SQL_PARAM_OUTPUT; break; case 'b': ptype = SQL_PARAM_INPUT_OUTPUT; @@ -5138,20 +5139,12 @@ mylog("atttypid=%s\n", atttypid ? atttypid : "(null)"); } } /* RESULT Columns info */ - if (NULL != atttypid || bRetset) + if (NULL != atttypid && !bRetset) { int typid; - if (bRetset) - { - typid = pgtype; - attname = NULL; - } - else - { - typid = atoi(atttypid); - attname = QR_get_value_backend_text(tres, i, attname_pos); - } + typid = atoi(atttypid); + attname = QR_get_value_backend_text(tres, i, attname_pos); tuple = QR_AddNew(res); set_tuplefield_string(&tuple[PROCOLS_PROCEDURE_CAT], CurrCat(conn)); set_nullfield_string(&tuple[PROCOLS_PROCEDURE_SCHEM], schema_name);
^ permalink raw reply [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-04-21 13:30 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 03:08 PGAPI_ProcedureColumns and no support for table output arguments Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
2017-04-19 06:35 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2017-04-21 06:53   ` Matej.PgODBC@Neosys <pgodbc@matej.neosys.si>
2017-04-21 13:30     ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>

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