Thread: [QUESTION] How to retrieve type info for ROW
Hi everyone
I'm trying to read data from Postgres with pgjdbc.I tried to find an answer via docs but failed
E.g. there is a queryjava.sql.ResultSet#getString(int)
however this way probably could lead to type info losing
--
Best regards,
Sergey
Sergey
Sergey,
What I suspected it would return. The problem is the backend does not provide us with anything better than unknown OID
Dave Cramer
www.postgres.rocks
On Tue, 7 Dec 2021 at 03:54, Sergey Nuyanzin <snuyanzin@gmail.com> wrote:
Hi Daveit returns object with field referencing to some unknown oid (screen attached)On Mon, Dec 6, 2021 at 1:47 PM Dave Cramer <davecramer@postgres.rocks> wrote:Hi Sergey,What does getResultSetMetadata return?Dave Cramerwww.postgres.rocksOn Mon, 29 Nov 2021 at 07:19, Sergey Nuyanzin <snuyanzin@gmail.com> wrote:I wonder if there is a more subtle way here?parse it and reconstruct the object...I noticed some projects where people take its string representation likeSELECT ROW(1, 'one', ROW(1, 'one', null, ROW(1)));The current question is: how can I retrieve data about nested row types?Hi everyoneI'm trying to read data from Postgres with pgjdbc.I tried to find an answer via docs but failedE.g. there is a query
java.sql.ResultSet#getString(int)
however this way probably could lead to type info losing
--Best regards,
Sergey
--Best regards,
Sergey