Re: Quick hack for fetching the contents of a temp table

2019-04-23 Thread Souvik Bhattacherjee
This question seems related to the other thread you started on April 18th? > This is related but perhaps a little complicated than the previous one, since this involves modifying the query that would be executed. Several of us suggested you use a CTE to materialize your intermediate values. Did

Re: Quick hack for fetching the contents of a temp table

2019-04-23 Thread Michel Pelletier
On Tue, Apr 23, 2019 at 2:56 PM Souvik Bhattacherjee wrote: > Hi, > > I need to use the return value of the function somefunction1() to modify a > query and execute it. > > While it is easy to fetch the desired result using plpgsql functions(), > however modifying and rewriting the query using th

Quick hack for fetching the contents of a temp table

2019-04-23 Thread Souvik Bhattacherjee
Hi, Is there a quick way to fetch the contents of a temp table from within postgres server code? The temp table has a single column and there is a single value in the column. Thus, I'm using the temp table as a variable to store a string. begin; create temp table mytemp(metastr char(1024)) on co