Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRtK4-001rvF-Jl for pgsql-odbc@arkaria.postgresql.org; Thu, 11 Jul 2024 12:54:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sRtK3-00E0HO-4G for pgsql-odbc@arkaria.postgresql.org; Thu, 11 Jul 2024 12:54:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sRtK2-00E0HG-TO for pgsql-odbc@lists.postgresql.org; Thu, 11 Jul 2024 12:54:54 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sRtJy-001XEB-Mw for pgsql-odbc@lists.postgresql.org; Thu, 11 Jul 2024 12:54:51 +0000 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 0662B205E3 for ; Thu, 11 Jul 2024 08:54:49 -0400 (EDT) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a689ad8d1f6so100658366b.2 for ; Thu, 11 Jul 2024 05:54:49 -0700 (PDT) X-Gm-Message-State: AOJu0YyOm2OLcFGk1tCYpx8AFn0U60f6dVWwZlY3EHRmO1ZzJjO8g/Th AoRSSyGWDdSJfqPGzGMSoCH+E/PhcQq6pgw98RjeP+tNBa5SjdaQKA/d1wkYnVe+EZG5t8w6eF9 GaemYXy2nc3rtzC6Qe0hoiIxRmRo= X-Google-Smtp-Source: AGHT+IE0+1sueKTW/RJIcEsQqRuXj7WeOjuj7t+68Q4CYuwGxaS66OsdNkG+uulh3xjAz23c3Lyr1vQqLvaKnpqlPXI= X-Received: by 2002:a17:907:724a:b0:a77:dd5c:d7f4 with SMTP id a640c23a62f3a-a780b6883f4mr678021966b.15.1720702488938; Thu, 11 Jul 2024 05:54:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Cramer Date: Thu, 11 Jul 2024 08:54:31 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: DataType bytea Precision returning a negative value To: Abhishek Kumar Cc: pgsql-odbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009e137d061cf844c5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009e137d061cf844c5 Content-Type: text/plain; charset="UTF-8" On Thu, 11 Jul 2024 at 04:56, Abhishek Kumar wrote: > Hi, > > When we query the psqlodbc driver to get the column information of the > table(via SQLColumns), we get a precision value of -4 for bytea column. Is > this expected to happen? If yes, what does this value mean for a bytea > column. If no, then what is the correct expected behavior? > Looks like we return switch (handle_unknown_size_as) { case UNKNOWNS_AS_DONTKNOW: return SQL_NO_TOTAL; } Because we don't know the length. Dave > --0000000000009e137d061cf844c5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, 11 Jul 2024 = at 04:56, Abhishek Kumar <abh= ishek.aak0@gmail.com> wrote:
Hi,

When we query t= he psqlodbc driver to get the column information of the table(via SQLColumn= s), we get a precision value of -4 for bytea column. Is this expected to ha= ppen? If yes, what does this value mean for a bytea column.=C2=A0If no, the= n what is the correct expected behavior?

<= /div>
Looks like we return=C2=A0
sw= itch (handle_unknown_size_as<= /span>)
{
case UNKNOWNS_AS_DONTKNOW<= /span>:
return SQL_NO_TOTAL;
}

Because we don't know the length.

=
Dave
--0000000000009e137d061cf844c5--