ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor

From: Christof Petig <christof(at)petig-baender(dot)de>
To: Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>
Subject: ECPG: Missing in SQL standard? getting _one_ row out of a multirow descriptor
Date: 2001-10-23 08:08:43
Message-ID: 3BD5258B.E53D8E46@petig-baender.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2001-10-23 14:52:31 Re: ECPG error message
Previous Message Michael Meskes 2001-10-23 06:58:19 Re: ECPG error message