[QUESTION] How to retrieve type info for ROW

From: Sergey Nuyanzin <snuyanzin(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [QUESTION] How to retrieve type info for ROW
Date: 2021-11-29 11:01:21
Message-ID: CAKQOUBjw4naub8E0VksQ1T+f25gC5ZgV2A1V8PhkaNd0DjzOFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi everyone

I'm trying to read data from Postgres with pgjdbc.
The current question is: how can I retrieve data about nested row types?
I tried to find an answer via docs but failed

E.g. there is a query
SELECT ROW(1, 'one', ROW(1, 'one', null, ROW(1)));

I noticed some projects where people take its string representation like
java.sql.ResultSet#getString(int)
parse it and reconstruct the object...
however this way probably could lead to type info losing

I wonder if there is a more subtle way here?

--
Best regards,
Sergey

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2021-12-07 13:15:42 Re: [QUESTION] How to retrieve type info for ROW
Previous Message Sergey Nuyanzin 2021-11-26 10:52:07 [pgjdbc/pgjdbc] 9899c6: Misprint in messages_ru.java (#2358)