public inbox for [email protected]
help / color / mirror / Atom feedRe: How to properly use TRIM()?
8+ messages / 4 participants
[nested] [flat]
* Re: How to properly use TRIM()?
@ 2026-03-07 19:19 Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Rob Sargent @ 2026-03-07 19:19 UTC (permalink / raw)
To: Igor Korot <[email protected]>; +Cc: Adrian Klaver <[email protected]>; David G. Johnston <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
--Apple-Mail-7605932D-B951-446A-AA0B-EFEBB6F1B4D3
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html class=3D"apple-mail-supports-explicit-dark-mode"><head><meta http-equi=
v=3D"content-type" content=3D"text/html; charset=3Dutf-8"></head><body dir=3D=
"auto"><div dir=3D"ltr"></div><div dir=3D"ltr"><br></div><blockquote type=3D=
"cite"><div dir=3D"ltr"><div><div class=3D"gmail_quote gmail_quote_container=
"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">reloptions text[]</blockquote><div dir=3D"au=
to"><br></div><div dir=3D"auto">Then why it=E2=80=99s not showing {} as in t=
he =E2=80=9Cincluded=E2=80=9D columns?</div><div dir=3D"auto"><br></div><div=
dir=3D"auto">Or it=E2=80=99s an ARRAY() implementation?</div><div dir=3D"au=
to"><br></div><div dir=3D"auto">Thank you.</div><div dir=3D"auto"><br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
#ccc solid;padding-left:1ex" dir=3D"auto"><br></blockquote></div></div></di=
v></blockquote><div><br></div>One is an empty array, the other is null. Thos=
e are not the same thing. <div><br><blockquote type=3D"cite"><div dir=3D=
"ltr"><div><div class=3D"gmail_quote gmail_quote_container"><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex" dir=3D"auto">
<br>
<br>
> Included is one, storage is not.<br>
> <br>
> Thank you.<br>
> <br>
>><br>
>> Given that error message, an array of text is the correct type.<br>=
>><br>
>> Array[]::text[]<br>
>><br>
>> David J.<br>
>><br>
> <br>
> <br>
<br>
<br>
-- <br>
Adrian Klaver<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">adrian.klaver=
@aklaver.com</a><br>
</blockquote></div></div>
</div></blockquote></div></body></html>=
--Apple-Mail-7605932D-B951-446A-AA0B-EFEBB6F1B4D3--
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
@ 2026-03-07 19:58 ` Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Igor Korot @ 2026-03-07 19:58 UTC (permalink / raw)
To: Rob Sargent <[email protected]>; +Cc: Adrian Klaver <[email protected]>; David G. Johnston <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
Hi, Rob,
On Sat, Mar 7, 2026 at 1:20 PM Rob Sargent <[email protected]> wrote:
>
>
>> reloptions text[]
>
>
> Then why it’s not showing {} as in the “included” columns?
>
> Or it’s an ARRAY() implementation?
>
> Thank you.
>
>>
>
> One is an empty array, the other is null. Those are not the same thing.
Following code successfully retrieves column 3 and exits, but keep
looping for column 4.
while( ( ret = SQLGetData( m_hstmt, 3, SQL_C_WCHAR,
included.get(), 255, &ind[2] ) ) != SQL_NO_DATA )
{
if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO )
{
auto numBytes = ind[2];
if( ind[2] == SQL_NO_TOTAL )
numBytes = 255;
else if( ind[2] > 255 )
numBytes = 255;
str_to_uc_cpy( includedCol, included.get() );
}
else
{
GetErrorMessage( errorMsg, STMT_ERROR );
result = 1;
}
}
includedCol.erase( 0, 1 );
includedCol.pop_back();
}
while( ( ret = SQLGetData( m_hstmt, 4, SQL_C_WCHAR,
index_param.get(), 255, &ind[3] ) ) != SQL_NO_DATA )
{
if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO )
{
auto numBytes = ind[3];
if( ind[3] == SQL_NO_TOTAL )
numBytes = 255;
else if( ind[3] > 255 )
numBytes = 255;
str_to_uc_cpy( options, index_param.get() );
}
else
{
GetErrorMessage( errorMsg, STMT_ERROR );
result = 1;
}
}
when I tried to run it without nullif() and trim().
So I started looking for a way to return SQL_NO_DATA
on that 4th column...
Thank you.
P.S.: Sorry for kind of throwing ODBC code here. You have ODBC
related list, but this is where things get in the cross.
>
>>
>>
>> > Included is one, storage is not.
>> >
>> > Thank you.
>> >
>> >>
>> >> Given that error message, an array of text is the correct type.
>> >>
>> >> Array[]::text[]
>> >>
>> >> David J.
>> >>
>> >
>> >
>>
>>
>> --
>> Adrian Klaver
>> [email protected]
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
@ 2026-03-07 20:03 ` David G. Johnston <[email protected]>
2026-03-07 20:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2026-03-07 20:03 UTC (permalink / raw)
To: Igor Korot <[email protected]>; +Cc: Rob Sargent <[email protected]>; Adrian Klaver <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]> wrote:
> So I started looking for a way to return SQL_NO_DATA
> on that 4th column...
>
Doesn't "No Data" refer to the result set as a whole, not individual
columns? I'd assume NULL is detected some other way.
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
@ 2026-03-07 20:46 ` Igor Korot <[email protected]>
2026-03-07 21:29 ` Re: How to properly use TRIM()? Adrian Klaver <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Igor Korot @ 2026-03-07 20:46 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: Rob Sargent <[email protected]>; Adrian Klaver <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
Hi, David,
On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston <
[email protected]> wrote:
> On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]> wrote:
>
>> So I started looking for a way to return SQL_NO_DATA
>> on that 4th column...
>>
>
> Doesn't "No Data" refer to the result set as a whole, not individual
> columns? I'd assume NULL is detected some other way.
>
No, I think it’s column based.
The call to SQLGetData() returns data in one column.
And as stated it successfully retrieves empty array for column 3 and moves
on.
Thank you.
> David J.
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
2026-03-07 20:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
@ 2026-03-07 21:29 ` Adrian Klaver <[email protected]>
2026-03-07 21:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Adrian Klaver @ 2026-03-07 21:29 UTC (permalink / raw)
To: Igor Korot <[email protected]>; David G. Johnston <[email protected]>; +Cc: Rob Sargent <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
On 3/7/26 12:46 PM, Igor Korot wrote:
> Hi, David,
>
> On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston
> <[email protected] <mailto:[email protected]>> wrote:
>
> On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]
> <mailto:[email protected]>> wrote:
>
> So I started looking for a way to return SQL_NO_DATA
> on that 4th column...
>
>
> Doesn't "No Data" refer to the result set as a whole, not individual
> columns? I'd assume NULL is detected some other way.
>
>
> No, I think it’s column based.
1) My knowledge of ODBC is limited.
2) This:
https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc?view=sql-server-v...
"SQL_NO_DATA No more data was available. The application calls
SQLGetDiagRec or SQLGetDiagField to retrieve additional information. One
or more driver-defined status records in class 02xxx may be returned.
Note: In ODBC 2.x, this return code was named SQL_NO_DATA_FOUND."
would seem to indicate that David Johnston is correct:
'Doesn't "No Data" refer to the result set as a whole, not individual
columns? I'd assume NULL is detected some other way.'
> The call to SQLGetData() returns data in one column.
>
> And as stated it successfully retrieves empty array for column 3 and
> moves on.
>
> Thank you.
>
>
> David J.
>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
2026-03-07 20:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 21:29 ` Re: How to properly use TRIM()? Adrian Klaver <[email protected]>
@ 2026-03-07 21:46 ` Igor Korot <[email protected]>
2026-03-07 22:26 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Igor Korot @ 2026-03-07 21:46 UTC (permalink / raw)
To: Adrian Klaver <[email protected]>; +Cc: David G. Johnston <[email protected]>; Rob Sargent <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
Hi, Adrian,
On Sat, Mar 7, 2026 at 3:29 PM Adrian Klaver <[email protected]> wrote:
>
> On 3/7/26 12:46 PM, Igor Korot wrote:
> > Hi, David,
> >
> > On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston
> > <[email protected] <mailto:[email protected]>> wrote:
> >
> > On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > So I started looking for a way to return SQL_NO_DATA
> > on that 4th column...
> >
> >
> > Doesn't "No Data" refer to the result set as a whole, not individual
> > columns? I'd assume NULL is detected some other way.
> >
> >
> > No, I think it’s column based.
>
> 1) My knowledge of ODBC is limited.
>
> 2) This:
>
> https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc?view=sql-server-v...
>
> "SQL_NO_DATA No more data was available. The application calls
> SQLGetDiagRec or SQLGetDiagField to retrieve additional information. One
> or more driver-defined status records in class 02xxx may be returned.
> Note: In ODBC 2.x, this return code was named SQL_NO_DATA_FOUND."
>
> would seem to indicate that David Johnston is correct:
From the SQLGetData() ODBC documentation
(https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver1...):
[quote]
When it returns the last part of the data, SQLGetData returns
SQL_SUCCESS. Neither SQL_NO_TOTAL nor zero can be returned on the last
valid call to retrieve data from a column, because the application
would then have no way of knowing how much of the data in the
application buffer is valid. If SQLGetData is called after this, it
returns SQL_NO_DATA. For more information, see the next section,
"Retrieving Data with SQLGetData."
[/quote]
However it looks like the driver does not behave as expected.
It keeps returning SQL_SUCCESS continuously...
Or am I misinterpreting the docs?
Thank you.
>
> 'Doesn't "No Data" refer to the result set as a whole, not individual
> columns? I'd assume NULL is detected some other way.'
>
> > The call to SQLGetData() returns data in one column.
> >
> > And as stated it successfully retrieves empty array for column 3 and
> > moves on.
> >
> > Thank you.
> >
> >
> > David J.
> >
>
>
> --
> Adrian Klaver
> [email protected]
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
2026-03-07 20:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 21:29 ` Re: How to properly use TRIM()? Adrian Klaver <[email protected]>
2026-03-07 21:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
@ 2026-03-07 22:26 ` David G. Johnston <[email protected]>
2026-03-07 23:08 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2026-03-07 22:26 UTC (permalink / raw)
To: Igor Korot <[email protected]>; +Cc: Adrian Klaver <[email protected]>; Rob Sargent <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
On Sat, Mar 7, 2026 at 2:46 PM Igor Korot <[email protected]> wrote:
> Hi, Adrian,
>
> On Sat, Mar 7, 2026 at 3:29 PM Adrian Klaver <[email protected]>
> wrote:
> >
> > On 3/7/26 12:46 PM, Igor Korot wrote:
> > > Hi, David,
> > >
> > > On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston
> > > <[email protected] <mailto:[email protected]>>
> wrote:
> > >
> > > On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]
> > > <mailto:[email protected]>> wrote:
> > >
> > > So I started looking for a way to return SQL_NO_DATA
> > > on that 4th column...
> > >
> > >
> > > Doesn't "No Data" refer to the result set as a whole, not
> individual
> > > columns? I'd assume NULL is detected some other way.
> > >
> > >
> > > No, I think it’s column based.
> >
> > 1) My knowledge of ODBC is limited.
> >
> > 2) This:
> >
> >
> https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc?view=sql-server-v...
> >
> > "SQL_NO_DATA No more data was available. The application calls
> > SQLGetDiagRec or SQLGetDiagField to retrieve additional information. One
> > or more driver-defined status records in class 02xxx may be returned.
> > Note: In ODBC 2.x, this return code was named SQL_NO_DATA_FOUND."
> >
> > would seem to indicate that David Johnston is correct:
>
> From the SQLGetData() ODBC documentation
> (
> https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver1...
> ):
>
> [quote]
> When it returns the last part of the data, SQLGetData returns
> SQL_SUCCESS. Neither SQL_NO_TOTAL nor zero can be returned on the last
> valid call to retrieve data from a column, because the application
> would then have no way of knowing how much of the data in the
> application buffer is valid. If SQLGetData is called after this, it
> returns SQL_NO_DATA. For more information, see the next section,
> "Retrieving Data with SQLGetData."
> [/quote]
>
> However it looks like the driver does not behave as expected.
>
> It keeps returning SQL_SUCCESS continuously...
>
> Or am I misinterpreting the docs?
>
>
Ok, you are indeed performing an iteration of SQLGetData that does return
SQL_NO_DATA when you've exhausted the contents of the field being retrieved.
You still need to check ind[3] for:
https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver1...
Step 2
I have no idea why you would end up in an infinite loop there though. I
suppose maybe step 2's lack of describing the flow when the data is null
means you need to break out of the loop manually after dealing with the
null value in some manner.
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: How to properly use TRIM()?
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 20:03 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
2026-03-07 20:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 21:29 ` Re: How to properly use TRIM()? Adrian Klaver <[email protected]>
2026-03-07 21:46 ` Re: How to properly use TRIM()? Igor Korot <[email protected]>
2026-03-07 22:26 ` Re: How to properly use TRIM()? David G. Johnston <[email protected]>
@ 2026-03-07 23:08 ` Igor Korot <[email protected]>
0 siblings, 0 replies; 8+ messages in thread
From: Igor Korot @ 2026-03-07 23:08 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: Adrian Klaver <[email protected]>; Rob Sargent <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
Hi, David,
On Sat, Mar 7, 2026 at 2:27 PM David G. Johnston <[email protected]>
wrote:
> On Sat, Mar 7, 2026 at 2:46 PM Igor Korot <[email protected]> wrote:
>
>> Hi, Adrian,
>>
>> On Sat, Mar 7, 2026 at 3:29 PM Adrian Klaver <[email protected]>
>> wrote:
>> >
>> > On 3/7/26 12:46 PM, Igor Korot wrote:
>> > > Hi, David,
>> > >
>> > > On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston
>> > > <[email protected] <mailto:[email protected]>>
>> wrote:
>> > >
>> > > On Sat, Mar 7, 2026 at 12:58 PM Igor Korot <[email protected]
>> > > <mailto:[email protected]>> wrote:
>> > >
>> > > So I started looking for a way to return SQL_NO_DATA
>> > > on that 4th column...
>> > >
>> > >
>> > > Doesn't "No Data" refer to the result set as a whole, not
>> individual
>> > > columns? I'd assume NULL is detected some other way.
>> > >
>> > >
>> > > No, I think it’s column based.
>> >
>> > 1) My knowledge of ODBC is limited.
>> >
>> > 2) This:
>> >
>> >
>> https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc?view=sql-server-v...
>> >
>> > "SQL_NO_DATA No more data was available. The application calls
>> > SQLGetDiagRec or SQLGetDiagField to retrieve additional information. One
>> > or more driver-defined status records in class 02xxx may be returned.
>> > Note: In ODBC 2.x, this return code was named SQL_NO_DATA_FOUND."
>> >
>> > would seem to indicate that David Johnston is correct:
>>
>> From the SQLGetData() ODBC documentation
>> (
>> https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver1...
>> ):
>>
>> [quote]
>> When it returns the last part of the data, SQLGetData returns
>> SQL_SUCCESS. Neither SQL_NO_TOTAL nor zero can be returned on the last
>> valid call to retrieve data from a column, because the application
>> would then have no way of knowing how much of the data in the
>> application buffer is valid. If SQLGetData is called after this, it
>> returns SQL_NO_DATA. For more information, see the next section,
>> "Retrieving Data with SQLGetData."
>> [/quote]
>>
>> However it looks like the driver does not behave as expected.
>>
>> It keeps returning SQL_SUCCESS continuously...
>>
>> Or am I misinterpreting the docs?
>>
>>
> Ok, you are indeed performing an iteration of SQLGetData that does return
> SQL_NO_DATA when you've exhausted the contents of the field being retrieved.
>
> You still need to check ind[3] for:
>
> https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver1...
> Step 2
>
> I have no idea why you would end up in an infinite loop there though. I
> suppose maybe step 2's lack of describing the flow when the data is null
> means you need to break out of the loop manually
>
3754 while( ( ret = SQLGetData( m_hstmt, 3, SQL_C_WCHAR,
included.get(), 255, &ind[2] ) ) != SQL_NO_DATA )
(gdb) n
3756 if( ret == SQL_SUCCESS || ret ==
SQL_SUCCESS_WITH_INFO )
(gdb) p ind[2]
$1 = 4
(gdb) n
3758 auto numBytes = ind[2];
(gdb)
3759 if( ind[2] == SQL_NO_TOTAL )
(gdb)
3761 else if( ind[2] > 255 )
(gdb)
3763 str_to_uc_cpy( includedCol, included.get() );
(gdb)
3764 }
(gdb)
3754 while( ( ret = SQLGetData( m_hstmt, 3, SQL_C_WCHAR,
included.get(), 255, &ind[2] ) ) != SQL_NO_DATA )
(gdb)
3771 includedCol.erase( 0, 1 );
(gdb) p ind[2]
$2 = 4
(gdb) p ret
$3 = 100
(gdb) n
This is what happens with column 3 when the array is empty.
3779 while( ( ret = SQLGetData( m_hstmt, pos, SQL_C_WCHAR,
index_param.get(), 255, &ind[3] ) ) != SQL_NO_DATA )
(gdb)
3781 if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO )
(gdb) p ind[3]
$4 = -1
(gdb) p ret
$5 = 0
(gdb) n
3783 auto numBytes = ind[3];
(gdb)
3784 if( ind[3] == SQL_NO_TOTAL )
(gdb)
3786 else if( ind[3] > 255 )
(gdb)
3788 str_to_uc_cpy( options, index_param.get() );
(gdb)
3789 }
(gdb)
3779 while( ( ret = SQLGetData( m_hstmt, pos, SQL_C_WCHAR,
index_param.get(), 255, &ind[3] ) ) != SQL_NO_DATA )
(gdb)
3781 if( ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO )
(gdb) p ind[3]
$6 = -1
(gdb) p ret
$7 = 0
(gdb)
And this one is for column 4 of the query.
As you can see both calls return SQL_SUCCESS, but the
indicator does contain SQL_NULL_DATA (-1).
I think this is the bug in the driver, as it should return SQL_NO_DATA.
I'll confirm with the ODBC list.
Thx.
after dealing with the null value in some manner.
>
> David J.
>
>
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2026-03-07 23:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-07 19:19 Re: How to properly use TRIM()? Rob Sargent <[email protected]>
2026-03-07 19:58 ` Igor Korot <[email protected]>
2026-03-07 20:03 ` David G. Johnston <[email protected]>
2026-03-07 20:46 ` Igor Korot <[email protected]>
2026-03-07 21:29 ` Adrian Klaver <[email protected]>
2026-03-07 21:46 ` Igor Korot <[email protected]>
2026-03-07 22:26 ` David G. Johnston <[email protected]>
2026-03-07 23:08 ` Igor Korot <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox