From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Lukas Eder <lukas(dot)eder(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Weird issues when reading UDT from stored function |
Date: | 2011-01-11 00:24:16 |
Message-ID: | 4D2BA330.9060009@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
On 11/01/11 12:06, Lukas Eder wrote:
> CREATE TYPE u_street_type AS (
> street VARCHAR(100),
> no VARCHAR(30)
> )
>
> CREATE TYPE u_address_type AS (
> street u_street_type,
> zip VARCHAR(50),
> city VARCHAR(50),
> country u_country,
> since DATE,
> code INTEGER
> )
> ====================================
> Output:
> # of columns: 6
> ("(""Parliament Hill"",77)",NW31A9)
>
> Why are there 6 columns? And why is the UDT incorrectly fetched (many
> fields are missing)
Looks to me like you're getting each field of the UDT as a separate
column. You printed only the first column i.e. the 'street' part.
It might be informative to run with loglevel=2 and see how the server is
returning results. If the driver is reporting 6 columns, that means that
the server is reporting 6 fields in its RowDescription message.
Oliver
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2011-01-11 00:25:03 | Re: Bug in pg_describe_object |
Previous Message | Cédric Villemain | 2011-01-10 23:25:48 | Re: Streaming base backups |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2011-01-11 01:13:47 | Re: Weird issues when reading UDT from stored function |
Previous Message | Lukas Eder | 2011-01-10 23:20:52 | Re: Support for SQLInput / SQLOutput |