Re: PostgreSQL equivalent to Oracles ANYDATASET - Mailing list pgsql-general

From Dirk Mika
Subject Re: PostgreSQL equivalent to Oracles ANYDATASET
Date
Msg-id 22C0588C-B59D-477D-B30A-62C53F4F67F7@mikatiming.de
Whole thread Raw
In response to Re: PostgreSQL equivalent to Oracles ANYDATASET  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general

Hi,

 

That looks promising. I'll take a closer look at that.

 

Regards

Dirk

 

--
Dirk Mika
Software Developer



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

fon +49 2202 2401-1197
dirk.mika@mikatiming.de
www.mikatiming.de

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

Von: Pavel Stehule <pavel.stehule@gmail.com>
Datum: Freitag, 13. November 2020 um 18:05
An: Dirk Mika <Dirk.Mika@mikatiming.de>
Cc: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Betreff: Re: PostgreSQL equivalent to Oracles ANYDATASET

 

Hi

 

pá 13. 11. 2020 v 17:57 odesílatel Dirk Mika <Dirk.Mika@mikatiming.de> napsal:

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?

 

Currently there is not this possibility

 

Theoretically you can use a function, that returns refcursor, and outside function you can read this cursor

 

 

Regards

 

Pavel

 

BR

Dirk

--
Dirk Mika
Software Developer

cid:175c28eef6b1377a7f41

mika:timing GmbH

Strundepark - Kürtener Str. 11b
51465 Bergisch Gladbach
Germany

fon +49 2202 2401-1197
dirk.mika@mikatiming.de
www.mikatiming.de

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

 

cid:175c28eef6d822336482


 

Attachment

pgsql-general by date:

Previous
From: Dirk Mika
Date:
Subject: Re: PostgreSQL equivalent to Oracles ANYDATASET
Next
From: Job
Date:
Subject: Bi-directional Replica updates