Suresh Kumar R writes:
>I needed this because, I use postgres backend along with golang using
> pgx driver. When i query address i need to specify OID of
> address[](composite type). In my case i couldnt find the oid of that type
> since its dynamic.
The usual advice is to look it up on the f
Hi Merlin,
I needed this because, I use postgres backend along with golang using
pgx driver. When i query address i need to specify OID of
address[](composite type). In my case i couldnt find the oid of that type
since its dynamic. Needed generic type so needed to cast to record[] which
has cons
On Thu, Mar 3, 2022 at 4:01 AM Suresh Kumar R
wrote:
>
> Hi, I created an table with composite type array as datatype for one column.
> When I query that table I need the pg_typeof(column) as record[] instead of
> composite_type[].
> I tried creating a separate function and returning record[], but
Suresh Kumar R writes:
> When I query that table I need the pg_typeof(column) as record[] instead of
> composite_type[].
Why? record[] is considered a pseudotype (polymorphic type),
which is why casting to it doesn't do anything.
regards, tom lane
Hi
čt 3. 3. 2022 v 11:01 odesílatel Suresh Kumar R
napsal:
> Hi, I created an table with composite type array as datatype for one
> column.
> When I query that table I need the pg_typeof(column) as record[] instead of
> composite_type[].
> I tried creating a separate function and returning recor