pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: armand pirvu <armand.pirvu@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: cursors and function question
Date: Tue, 13 Feb 2018 20:58:27 -0600
Message-ID: <1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com> (raw)
In-Reply-To: <CAKFQuwZW_mUz4pYb0hUiAywcQcb2+4Rf9bow0zKikxzWGCu84Q@mail.gmail.com>
References: <149EBC11-E33E-4DBA-9130-8C93BE4B1B43@gmail.com>
	<83c954ba-4d14-ac71-f4ea-30ce25b9a310@aklaver.com>
	<CFD427B2-8A62-4F37-821F-AAF67D7E09FC@gmail.com>
	<af847883-367a-6306-8ddd-822c3dcb5003@aklaver.com>
	<0B711AA9-3ACA-4A26-BC40-9F971E250AE0@gmail.com>
	<b0e739d5-50ce-507c-995b-49f27981b6fa@aklaver.com>
	<CAKFQuwZW_mUz4pYb0hUiAywcQcb2+4Rf9bow0zKikxzWGCu84Q@mail.gmail.com>


> On Feb 13, 2018, at 4:37 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
> 
> On Tue, Feb 13, 2018 at 3:31 PM, Adrian Klaver <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
> 2) By global table do you mean a temporary table? If so not sure that is going to work as I am pretty sure it will disappear after the function is run.
> 
> ​Temporary tables can survive until either session or transaction end - neither of which occurs automatically when exiting a function.
> 
> https://www.postgresql.org/docs/10/static/sql-createtable.html <https://www.postgresql.org/docs/10/static/sql-createtable.html;
> 
> "Temporary tables are automatically dropped at the end of a session, or optionally at the end of the current transaction (see ON COMMIT below)"
> 
> David J.
> 

Thank you both of you Adrian and David for the input and help

I owe you some nice red wine :)


Cheers
- Armand=

view thread (11+ messages)

Message-ID: <1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com>
Permalink:  ../1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com/
Also on:    postgresql.org/message-id/1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com

 · 

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: armand.pirvu@gmail.com, david.g.johnston@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: cursors and function question
  In-Reply-To: <1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com>
  References: <149EBC11-E33E-4DBA-9130-8C93BE4B1B43@gmail.com> <83c954ba-4d14-ac71-f4ea-30ce25b9a310@aklaver.com> <CFD427B2-8A62-4F37-821F-AAF67D7E09FC@gmail.com> <af847883-367a-6306-8ddd-822c3dcb5003@aklaver.com> <0B711AA9-3ACA-4A26-BC40-9F971E250AE0@gmail.com> <b0e739d5-50ce-507c-995b-49f27981b6fa@aklaver.com> <CAKFQuwZW_mUz4pYb0hUiAywcQcb2+4Rf9bow0zKikxzWGCu84Q@mail.gmail.com> <1CC76001-D74C-49A0-AC7F-2DE8AAC047C7@gmail.com>

* 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