pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philipp Kraus <philipp.kraus@tu-clausthal.de>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: void function and view select
Date: Mon, 7 May 2018 13:52:29 +0000
Message-ID: <0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de> (raw)

Hello,

I have got a complex query with a dynamic column result e.g.:

select builddata('_foo‘);
select * from _foo;

The first is a plsql function which creates a temporary table, but the function returns void.
The second call returns all the data from this table. But the columns of the temporary table are
not strict fixed, so I cannot return a table by the function. 
So my question is, how can I build with this two lines a view, so that I can run "select * from myFooView“ or
a function with a dynamic return set of columns e.g. „select myFoo()“?

Thanks

Phil

view thread (3+ messages)  latest in thread

Message-ID: <0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de>
Permalink:  ../0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de/
Also on:    postgresql.org/message-id/0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: philipp.kraus@tu-clausthal.de
  Subject: Re: void function and view select
  In-Reply-To: <0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de>
  References: <0AF95F26-7F53-4AF0-88AC-3ACFC6929E3B@tu-clausthal.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox