ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor - Mailing list pgsql-interfaces

From Christof Petig
Subject ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor
Date
Msg-id 3BD5258B.E53D8E46@petig-baender.de
Whole thread Raw
List pgsql-interfaces
Hi all,

You might know that 7.2 supports multirow descriptors (select ... into
descriptor ...). You can get the number of rows in a descriptor with a
call to  get descriptor ... :VAR=cardinality  .

But as I read the standard there is no way of reading exactly one row
(or to get the data row by row). Does anybody have an opinion on how to
name it? (I didn't invent this strange 'value' syntax)

get descriptor  name  :VAR = count;    is the number of columns
get descriptor  name  value :N  :VAR = cardinality;    gets the number
of rows of column N
get descriptor  name  value :N  :VAR = data;    gets all rows of column
N (starting by 1)

what about

get descriptor  name  value :N  :VAR = data[:M];     to get element
(column,row)=(N,M)

Any other ideas on how to name it?

Or does anybody know the standard better than I? redesigning
ECPGget_descriptor is just another issue but solveable.

Remember this is about extending the standard. But this standard is at
most worth the paper it is written on. Oracle never mentions this method
of dynamic SQL, they use SQLDA (which I strongly dislike compared to
this clean way of accessing dynamic data).

Yours   Christof




pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ECPG - connection name in "EXEC SQL AT ... " statement
Next
From: Michael Meskes
Date:
Subject: Re: ECPG error message