From: | Dominique Devienne <ddevienne(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: libpq: empty arrays have rank 0 in binary results? whatever the type's rank? |
Date: | 2023-03-29 14:02:09 |
Message-ID: | CAFCRh-_N066y3r5EE6tzdrsd=eQOU=xEBnr_eUMu=oBfzHDJbQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Mar 29, 2023 at 3:45 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dominique Devienne <ddevienne(at)gmail(dot)com> writes:
> > Hi. Selecting/fetching an empty 1D array using a binary-mode PGresult,
> > gives me back 12 bytes, and the first 4, the rank, is 0, something I was
> > not expecting.
>
> Yeah, empty arrays have zero dimensions.
>
> > PS: On a side note; where can I find the sending code for arrays?
> > I didn't find the usual _send() and _recv() functions (but looking on
> > github online...)
>
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/adt/arrayfuncs.c;h=87c987fb2704761c59333bf8c1fee47e5c14c598;hb=HEAD#l1583
Great. Thanks Tom. --DD
From | Date | Subject | |
---|---|---|---|
Next Message | Sebastien Flaesch | 2023-03-29 14:19:54 | Re: Using CTID system column as a "temporary" primary key |
Previous Message | Tom Lane | 2023-03-29 13:45:23 | Re: libpq: empty arrays have rank 0 in binary results? whatever the type's rank? |