PostgreSQL equivalent to Oracles ANYDATASET

From: Dirk Mika <Dirk(dot)Mika(at)mikatiming(dot)de>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: PostgreSQL equivalent to Oracles ANYDATASET
Date: 2020-11-13 16:56:50
Message-ID: 198CEF8B-3DD8-4396-A6AF-E0D2E3567FBB@mikatiming.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

we’re currently using Oracle and have a few functions in some packages, which are defined e.g. as follows:

FUNCTION get_results(p_id_series series.id_series%TYPE)

RETURN ANYDATASET

PIPELINED USING t_series_get_results;

It can be called like:

SELECT * FROM TABLE(series_pkg.get_results(1));

The purpose of this function is to provide a DATASET, which has different columns in the result depending on the passed parameter.

Is there any way to achieve something similar in PostreSQL?

BR
Dirk
--
Dirk Mika
Software Developer

[cid:mt_c1c59b3d-dd43-4ca6-992b-79f5a19f5999.png]

mika:timing GmbH
Strundepark - Kürtener Str. 11b
51465 Bergisch Gladbach
Germany

fon +49 2202 2401-1197
dirk(dot)mika(at)mikatiming(dot)de
www.mikatiming.de

AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884
Geschäftsführer: Harald Mika, Jörg Mika

[cid:sig_ineos_2940640b-c572-4bba-865f-9f3ba3fea686.png]<https://www.facebook.com/mikatiming>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-11-13 17:00:38 Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
Previous Message Tom Lane 2020-11-13 16:52:38 Re: Problem with psprintf and intmax_t (%jd)