Re: Opening view that uses a function - empty column

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Brady Mathis <bmathis(at)r-hsoftware(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Opening view that uses a function - empty column
Date: 2012-07-27 20:40:58
Message-ID: CADK3HHJ76-CD=bSdp6Qhd7SYX+rda-m=+BX9ri8GwQWF-XnffA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

You'd have to give us a bit more information such as how you "open" it
using JDBC

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Fri, Jul 27, 2012 at 3:46 PM, Brady Mathis <bmathis(at)r-hsoftware(dot)com> wrote:
> Two step inquiry:
>
>
> 1) I have created a function that will parse a value out of XML stored in the pg_largeobject table using xpath, like so:
>
>
> CREATE OR REPLACE FUNCTION extract_from_extended(text, bigint)
> RETURNS text AS
> $BODY$
> select translate( xpath(...) );
> $BODY$
> LANGUAGE sql VOLATILE
> COST 100;
>
>
> 2) I then created a view that calls this function as part of the query, like so:
>
>
> CREATE OR REPLACE VIEW encounter AS
> SELECT md.account_id, extract_from_extended('externalEncounterID'::text, md.id) AS external_id...
> FROM app.menu_data md, app.menu_structure ms
> WHERE...;
>
> When I open this view via JDBC, there is no data in the column that is filled by the function call.
>
> Any thoughts?
> TIA,
> BRady
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Brady Mathis 2012-07-27 21:21:24 Re: Opening view that uses a function - empty column
Previous Message Brady Mathis 2012-07-27 19:46:20 Opening view that uses a function - empty column