Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed atend-of-transaction - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed atend-of-transaction
Date
Msg-id 20200316155306.GM26184@telsasoft.com
Whole thread Raw
In response to Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed atend-of-transaction  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Mar 12, 2020 at 07:11:56AM -0500, Justin Pryzby wrote:
> > Do you want to have a go at that?
> 
> First draft attached.  Note that I handled pg_ls_dir, even though I'm proposing
> on the other thread to collapse/merge/meld it with pg_ls_dir_files [0].
> Possibly that's a bad idea with tuplestore, due to returning a scalar vs a row
> and needing to conditionally call CreateTemplateTupleDesc vs
> get_call_result_type.  I'll rebase that patch later today.
> 
> I didn't write test cases yet.  Also didn't look for functions not on your
> list.
> 
> I noticed this doesn't actually do anything, but kept it for now...except in
> pg_ls_dir error case:
> 
> src/include/utils/tuplestore.h:/* tuplestore_donestoring() used to be required, but is no longer used */
> src/include/utils/tuplestore.h:#define tuplestore_donestoring(state)    ((void) 0)

v2 attached - I will add to next CF in case you want to defer it until later.

-- 
Justin

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: pg_ls_tmpdir to show directories and shared filesets (andpg_ls_*)
Next
From: David Steele
Date:
Subject: Re: [PATCH] Connection time for \conninfo