From: | Philip Carlsen <plcplc(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: valid casts to anyarray |
Date: | 2023-09-28 06:24:28 |
Message-ID: | CALkT+D49rT+6Zi_NWhcaARNtcdAnjSKvLKhR=mfTE1CuMaSw=Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Per the comments for check_generic_type_consistency:
>
> * 2) All arguments declared ANYARRAY must have the same datatype,
> * which must be a varlena array type.
>
This must be exactly the bit that I missed during my reading - thanks!
> It has to not only have an element type, but have a standard array
> header, else we don't know how to do a lot of operations on it.
>
> Type "point" and related animals are sort of a poor man's array,
> which is supported for basic subscripting operations, but it's not
> generic enough to be reasonable to consider as an ANYARRAY.
This is what I had started to suspect.
I also found the source commentary in c.h (via
https://doxygen.postgresql.org/c_8h_source.html, though apparently the
comments do not make it to the generated doxygen docs) was helpful in
understanding just what exactly the term 'varlena' refers to.
The docs also refer to this term at times, but it never makes concrete
what it actually means (IIRC).
This was a very enlightening answer - Thanks!
-Philip
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2023-09-28 06:35:01 | Re: debugger from superuser only.... why? |
Previous Message | Raivo Rebane | 2023-09-28 06:18:26 | Re: Right version of jdbc |