agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
BUG #3774: create table like including index doesn't update pg_constraints with primary key
21+ messages / 6 participants
[nested] [flat]

* BUG #3774: create table like including index doesn't update pg_constraints with primary key
@ 2007-11-22 17:47 guillaume (ioguix) de Rorthais <ioguix@free.fr>
  2007-11-30 07:44 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key NikhilS <nikkhils@gmail.com>
  2007-12-13 00:34 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 21+ messages in thread

From: guillaume (ioguix) de Rorthais @ 2007-11-22 17:47 UTC (permalink / raw)
  To: pgsql-bugs@postgresql.org


The following bug has been logged online:

Bug reference:      3774
Logged by:          guillaume (ioguix) de Rorthais
Email address:      ioguix@free.fr
PostgreSQL version: 8.3 beta3
Operating system:   mac os x 10.4.10
Description:        create table like including index doesn't update
pg_constraints with primary key
Details: 

When creating a table using the "create table ... (like ... inluding
indexes...)" syntaxe, pg_catalog.pg_constraint is not updated with the PK
constraints which actually is setted in pg_index.

Here is my test script :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pagila=# --the original table                                               
                                                                            
                                                          \d city           
                                                                            
                                                                            
                                                                            
  Table "public.city"
   Column    |            Type             |                       Modifiers
                       
-------------+-----------------------------+--------------------------------
------------------------
 city_id     | integer                     | not null default
nextval('city_city_id_seq'::regclass)
 city        | character varying(50)       | not null
 country_id  | smallint                    | not null
 last_update | timestamp without time zone | not null default now()
Indexes:
    "city_pkey" PRIMARY KEY, btree (city_id)
    "idx_fk_country_id" btree (country_id)
Foreign-key constraints:
    "city_country_id_fkey" FOREIGN KEY (country_id) REFERENCES
country(country_id) ON UPDATE CASCADE ON DELETE RESTRICT
Triggers:
    last_updated BEFORE UPDATE ON city FOR EACH ROW EXECUTE PROCEDURE
last_updated()

pagila=# -- its pk constraint in pg_constraint                              
                                                                            
                                                          SELECT relname,
conname, contype                                                            
                                                                            
                                          FROM pg_class cl                  
                                                                            
                                                                            
                       JOIN pg_constraint co ON (cl.oid=co.conrelid)        
                                                                            
                                                                            
    JOIN pg_namespace n ON (cl.relnamespace=n.oid)                          
                                                                            
                                                              WHERE
cl.relname='city' AND n.nspname='public' AND contype='p';
 relname |  conname  | contype 
---------+-----------+---------
 city    | city_pkey | p
(1 row)

pagila=# -- create the new table citylike like city                         
                                                                            
                                                          CREATE  TABLE
citylike (LIKE city INCLUDING INDEXES INCLUDING DEFAULTS);
CREATE TABLE
pagila=# --the citylike table                                               
                                                                            
                                                          \d citylike
                                      Table "public.citylike"
   Column    |            Type             |                       Modifiers
                       
-------------+-----------------------------+--------------------------------
------------------------
 city_id     | integer                     | not null default
nextval('city_city_id_seq'::regclass)
 city        | character varying(50)       | not null
 country_id  | smallint                    | not null
 last_update | timestamp without time zone | not null default now()
Indexes:
    "citylike_pkey" PRIMARY KEY, btree (city_id)
    "citylike_country_id_key" btree (country_id)

pagila=# -- citylike constraints'
pagila=# SELECT relname, conname, contype                                   
                                                                            
                                                                   FROM
pg_class cl                                                                 
                                                                            
                                                     JOIN pg_constraint co
ON (cl.oid=co.conrelid)                                                     
                                                                            
                                    JOIN pg_namespace n ON
(cl.relnamespace=n.oid)                                                     
                                                                            
                                   WHERE cl.relname='citylike' AND
n.nspname='public' AND contype='p';
 relname | conname | contype 
---------+---------+---------
(0 rows)

pagila=#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not sure if this issue is actually a bug or if there a logic behind
this, but as the primary key is a constraint, I would expect it to be setted
in pg_constraint, shouldn't it ?



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
@ 2007-11-30 07:44 ` NikhilS <nikkhils@gmail.com>
  2007-12-01 23:46   ` Re: [HACKERS] BUG #3774: create table like including index doesn't update pg_constraints with primary key Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 21+ messages in thread

From: NikhilS @ 2007-11-30 07:44 UTC (permalink / raw)
  To: ioguix@free.fr; +Cc: pgsql-bugs@postgresql.org; pgsql-hackers

Hi,


>
> The following bug has been logged online:
>
> Bug reference:      3774
> Logged by:          guillaume (ioguix) de Rorthais
> Email address:      ioguix@free.fr
> PostgreSQL version: 8.3 beta3
> Operating system:   mac os x 10.4.10
> Description:        create table like including index doesn't update
> pg_constraints with primary key
> Details:
>
> When creating a table using the "create table ... (like ... inluding
> indexes...)" syntaxe, pg_catalog.pg_constraint is not updated with the PK
> constraints which actually is setted in pg_index.
>
> I'm not sure if this issue is actually a bug or if there a logic behind
> this, but as the primary key is a constraint, I would expect it to be
> setted
> in pg_constraint, shouldn't it ?
>

This can be handled by setting index->isconstraint appropriately inside
generateClonedIndexStmt().

The fundamental question though is should we allow primary, unique
CONSTRAINTS which use the index mechanism just as an implementation to be
created using the "INCLUDING INDEXES" mechanism.

As per the discussion here:

http://www.nabble.com/Re%3A-CREATE-TABLE-LIKE-INCLUDING-INDEXES-support-p10683716.html

maybe we should not?

In other words "INCLUDING INDEXES" should only create those indexes which do
not have isconstraint set to TRUE.

Comments?

Regards,
Nikhils
-- 
EnterpriseDB               http://www.enterprisedb.com


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: [HACKERS] BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
  2007-11-30 07:44 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key NikhilS <nikkhils@gmail.com>
@ 2007-12-01 23:46   ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-12-02 08:14     ` Re: [HACKERS] BUG #3774: create table like including index doesn't update pg_constraints with primary key NikhilS <nikkhils@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2007-12-01 23:46 UTC (permalink / raw)
  To: NikhilS <nikkhils@gmail.com>; +Cc: ioguix@free.fr; pgsql-bugs@postgresql.org; pgsql-hackers

NikhilS <nikkhils@gmail.com> writes:
> This can be handled by setting index->isconstraint appropriately inside
> generateClonedIndexStmt().

Done.

> The fundamental question though is should we allow primary, unique
> CONSTRAINTS which use the index mechanism just as an implementation to be
> created using the "INCLUDING INDEXES" mechanism.

Yeah, this bizarreness was foreseen and agreed to back when we set up
LIKE INCLUDING CONSTRAINTS the way it was defined (ie, copying only
CHECK constraints and not other things called constraints).  I was never
very thrilled with that definition myself, but it's a bit too late to
revisit it.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: [HACKERS] BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
  2007-11-30 07:44 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key NikhilS <nikkhils@gmail.com>
  2007-12-01 23:46   ` Re: [HACKERS] BUG #3774: create table like including index doesn't update pg_constraints with primary key Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-12-02 08:14     ` NikhilS <nikkhils@gmail.com>
  0 siblings, 0 replies; 21+ messages in thread

From: NikhilS @ 2007-12-02 08:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Bruce Momjian <bruce@momjian.us>; +Cc: ioguix@free.fr; pgsql-bugs@postgresql.org; pgsql-hackers

Hi,

>
> > The fundamental question though is should we allow primary, unique
> > CONSTRAINTS which use the index mechanism just as an implementation to
> be
> > created using the "INCLUDING INDEXES" mechanism.
>
> Yeah, this bizarreness was foreseen and agreed to back when we set up
> LIKE INCLUDING CONSTRAINTS the way it was defined (ie, copying only
> CHECK constraints and not other things called constraints).  I was never
> very thrilled with that definition myself, but it's a bit too late to
> revisit it.
>

Yeah this is all confusing. I believe we should remove the following TODO
now that the above has been checked in:

 CREATE

   - Have WITH CONSTRAINTS also create constraint indexes

   http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php


Regards,
Nikhils
-- 
EnterpriseDB               http://www.enterprisedb.com


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
@ 2007-12-13 00:34 ` Bruce Momjian <bruce@momjian.us>
  2008-03-06 21:45   ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 21+ messages in thread

From: Bruce Momjian @ 2007-12-13 00:34 UTC (permalink / raw)
  To: guillaume (ioguix) de Rorthais <ioguix@free.fr>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@postgresql.org


Tom, did your recent commit to clean up LIKE ... INCLUDING INDEXES fix
this?

---------------------------------------------------------------------------

guillaume (ioguix) de Rorthais wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      3774
> Logged by:          guillaume (ioguix) de Rorthais
> Email address:      ioguix@free.fr
> PostgreSQL version: 8.3 beta3
> Operating system:   mac os x 10.4.10
> Description:        create table like including index doesn't update
> pg_constraints with primary key
> Details: 
> 
> When creating a table using the "create table ... (like ... inluding
> indexes...)" syntaxe, pg_catalog.pg_constraint is not updated with the PK
> constraints which actually is setted in pg_index.
> 
> Here is my test script :
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> pagila=# --the original table                                               
>                                                                             
>                                                           \d city           
>                                                                             
>                                                                             
>                                                                             
>   Table "public.city"
>    Column    |            Type             |                       Modifiers
>                        
> -------------+-----------------------------+--------------------------------
> ------------------------
>  city_id     | integer                     | not null default
> nextval('city_city_id_seq'::regclass)
>  city        | character varying(50)       | not null
>  country_id  | smallint                    | not null
>  last_update | timestamp without time zone | not null default now()
> Indexes:
>     "city_pkey" PRIMARY KEY, btree (city_id)
>     "idx_fk_country_id" btree (country_id)
> Foreign-key constraints:
>     "city_country_id_fkey" FOREIGN KEY (country_id) REFERENCES
> country(country_id) ON UPDATE CASCADE ON DELETE RESTRICT
> Triggers:
>     last_updated BEFORE UPDATE ON city FOR EACH ROW EXECUTE PROCEDURE
> last_updated()
> 
> pagila=# -- its pk constraint in pg_constraint                              
>                                                                             
>                                                           SELECT relname,
> conname, contype                                                            
>                                                                             
>                                           FROM pg_class cl                  
>                                                                             
>                                                                             
>                        JOIN pg_constraint co ON (cl.oid=co.conrelid)        
>                                                                             
>                                                                             
>     JOIN pg_namespace n ON (cl.relnamespace=n.oid)                          
>                                                                             
>                                                               WHERE
> cl.relname='city' AND n.nspname='public' AND contype='p';
>  relname |  conname  | contype 
> ---------+-----------+---------
>  city    | city_pkey | p
> (1 row)
> 
> pagila=# -- create the new table citylike like city                         
>                                                                             
>                                                           CREATE  TABLE
> citylike (LIKE city INCLUDING INDEXES INCLUDING DEFAULTS);
> CREATE TABLE
> pagila=# --the citylike table                                               
>                                                                             
>                                                           \d citylike
>                                       Table "public.citylike"
>    Column    |            Type             |                       Modifiers
>                        
> -------------+-----------------------------+--------------------------------
> ------------------------
>  city_id     | integer                     | not null default
> nextval('city_city_id_seq'::regclass)
>  city        | character varying(50)       | not null
>  country_id  | smallint                    | not null
>  last_update | timestamp without time zone | not null default now()
> Indexes:
>     "citylike_pkey" PRIMARY KEY, btree (city_id)
>     "citylike_country_id_key" btree (country_id)
> 
> pagila=# -- citylike constraints'
> pagila=# SELECT relname, conname, contype                                   
>                                                                             
>                                                                    FROM
> pg_class cl                                                                 
>                                                                             
>                                                      JOIN pg_constraint co
> ON (cl.oid=co.conrelid)                                                     
>                                                                             
>                                     JOIN pg_namespace n ON
> (cl.relnamespace=n.oid)                                                     
>                                                                             
>                                    WHERE cl.relname='citylike' AND
> n.nspname='public' AND contype='p';
>  relname | conname | contype 
> ---------+---------+---------
> (0 rows)
> 
> pagila=#
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I'm not sure if this issue is actually a bug or if there a logic behind
> this, but as the primary key is a constraint, I would expect it to be setted
> in pg_constraint, shouldn't it ?
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
  2007-12-13 00:34 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Bruce Momjian <bruce@momjian.us>
@ 2008-03-06 21:45   ` Bruce Momjian <bruce@momjian.us>
  2008-03-06 22:20     ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Bruce Momjian @ 2008-03-06 21:45 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: guillaume (ioguix) de Rorthais <ioguix@free.fr>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@postgresql.org


Tom, did your commit to clean up LIKE ... INCLUDING INDEXES fix
this?

> ---------------------------------------------------------------------------
> 
> guillaume (ioguix) de Rorthais wrote:
> > 
> > The following bug has been logged online:
> > 
> > Bug reference:      3774
> > Logged by:          guillaume (ioguix) de Rorthais
> > Email address:      ioguix@free.fr
> > PostgreSQL version: 8.3 beta3
> > Operating system:   mac os x 10.4.10
> > Description:        create table like including index doesn't update
> > pg_constraints with primary key
> > Details: 
> > 
> > When creating a table using the "create table ... (like ... inluding
> > indexes...)" syntaxe, pg_catalog.pg_constraint is not updated with the PK
> > constraints which actually is setted in pg_index.
> > 
> > Here is my test script :
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > pagila=# --the original table                                               
> >                                                                             
> >                                                           \d city           
> >                                                                             
> >                                                                             
> >                                                                             
> >   Table "public.city"
> >    Column    |            Type             |                       Modifiers
> >                        
> > -------------+-----------------------------+--------------------------------
> > ------------------------
> >  city_id     | integer                     | not null default
> > nextval('city_city_id_seq'::regclass)
> >  city        | character varying(50)       | not null
> >  country_id  | smallint                    | not null
> >  last_update | timestamp without time zone | not null default now()
> > Indexes:
> >     "city_pkey" PRIMARY KEY, btree (city_id)
> >     "idx_fk_country_id" btree (country_id)
> > Foreign-key constraints:
> >     "city_country_id_fkey" FOREIGN KEY (country_id) REFERENCES
> > country(country_id) ON UPDATE CASCADE ON DELETE RESTRICT
> > Triggers:
> >     last_updated BEFORE UPDATE ON city FOR EACH ROW EXECUTE PROCEDURE
> > last_updated()
> > 
> > pagila=# -- its pk constraint in pg_constraint                              
> >                                                                             
> >                                                           SELECT relname,
> > conname, contype                                                            
> >                                                                             
> >                                           FROM pg_class cl                  
> >                                                                             
> >                                                                             
> >                        JOIN pg_constraint co ON (cl.oid=co.conrelid)        
> >                                                                             
> >                                                                             
> >     JOIN pg_namespace n ON (cl.relnamespace=n.oid)                          
> >                                                                             
> >                                                               WHERE
> > cl.relname='city' AND n.nspname='public' AND contype='p';
> >  relname |  conname  | contype 
> > ---------+-----------+---------
> >  city    | city_pkey | p
> > (1 row)
> > 
> > pagila=# -- create the new table citylike like city                         
> >                                                                             
> >                                                           CREATE  TABLE
> > citylike (LIKE city INCLUDING INDEXES INCLUDING DEFAULTS);
> > CREATE TABLE
> > pagila=# --the citylike table                                               
> >                                                                             
> >                                                           \d citylike
> >                                       Table "public.citylike"
> >    Column    |            Type             |                       Modifiers
> >                        
> > -------------+-----------------------------+--------------------------------
> > ------------------------
> >  city_id     | integer                     | not null default
> > nextval('city_city_id_seq'::regclass)
> >  city        | character varying(50)       | not null
> >  country_id  | smallint                    | not null
> >  last_update | timestamp without time zone | not null default now()
> > Indexes:
> >     "citylike_pkey" PRIMARY KEY, btree (city_id)
> >     "citylike_country_id_key" btree (country_id)
> > 
> > pagila=# -- citylike constraints'
> > pagila=# SELECT relname, conname, contype                                   
> >                                                                             
> >                                                                    FROM
> > pg_class cl                                                                 
> >                                                                             
> >                                                      JOIN pg_constraint co
> > ON (cl.oid=co.conrelid)                                                     
> >                                                                             
> >                                     JOIN pg_namespace n ON
> > (cl.relnamespace=n.oid)                                                     
> >                                                                             
> >                                    WHERE cl.relname='citylike' AND
> > n.nspname='public' AND contype='p';
> >  relname | conname | contype 
> > ---------+---------+---------
> > (0 rows)
> > 
> > pagila=#
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > I'm not sure if this issue is actually a bug or if there a logic behind
> > this, but as the primary key is a constraint, I would expect it to be setted
> > in pg_constraint, shouldn't it ?
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: Have you checked our extensive FAQ?
> > 
> >                http://www.postgresql.org/docs/faq
> 
> -- 
>   Bruce Momjian  <bruce@momjian.us>        http://momjian.us
>   EnterpriseDB                             http://postgres.enterprisedb.com
> 
>   + If your life is a hard drive, Christ can be your backup. +
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key
  2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
  2007-12-13 00:34 ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Bruce Momjian <bruce@momjian.us>
  2008-03-06 21:45   ` Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key Bruce Momjian <bruce@momjian.us>
@ 2008-03-06 22:20     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Tom Lane @ 2008-03-06 22:20 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: guillaume (ioguix) de Rorthais <ioguix@free.fr>; pgsql-bugs@postgresql.org

Bruce Momjian <bruce@momjian.us> writes:
> Tom, did your commit to clean up LIKE ... INCLUDING INDEXES fix
> this?

Yes, see 2007-12-01 commit.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v30 02/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index e845042d38..ea0fc48dbd 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -214,6 +214,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index a398349afc..eb6ac12ab4 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -69,6 +69,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--ZwgA9U+XZDXt4+m+
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v30-0003-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v21 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--Tcb1KvpfnM4LxW2s
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v21-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v15 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--8w3uRX/HFJGApMzv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v15-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v20 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--Z1Z8UV8BNhgCynIS
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v20-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v31 02/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index 1013d17f87..830de507e7 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -243,6 +243,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test replication slot directory functions
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 7ab9b2a150..422a1369ae 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -91,6 +91,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test replication slot directory functions
 --
-- 
2.17.0


--qZVVwWJgpX9Jzs7f
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v31-0003-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v24 03/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..edbfd9abc1 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..b32a3a4b74 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--mPTHnM80CEnHQ2WJ
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v24-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v25 03/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..edbfd9abc1 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..b32a3a4b74 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--SBikYMzjhZGK9d4p
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v25-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v28 02/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index e845042d38..ea0fc48dbd 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -214,6 +214,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index a398349afc..eb6ac12ab4 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -69,6 +69,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--vk/v8fjDPiDepTtA
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v28-0003-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v15 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--8w3uRX/HFJGApMzv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v15-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v31 02/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index 1013d17f87..830de507e7 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -243,6 +243,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test replication slot directory functions
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 7ab9b2a150..422a1369ae 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -91,6 +91,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test replication slot directory functions
 --
-- 
2.17.0


--qZVVwWJgpX9Jzs7f
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v31-0003-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v22 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--d6Gm4EdcadzBjdND
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v22-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v19 03/10] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 18 ++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  5 +++++
 2 files changed, 23 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index d3acb98d04..2e87c548eb 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -201,6 +201,24 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index 094e8f8296..f6857ad177 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -60,6 +60,11 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--S0GG+JvAI2G0KxBG
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v19-0004-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v30 02/11] Add tests on pg_ls_dir before changing it
@ 2020-03-17 18:16 Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Justin Pryzby @ 2020-03-17 18:16 UTC (permalink / raw)

---
 src/test/regress/expected/misc_functions.out | 24 ++++++++++++++++++++
 src/test/regress/sql/misc_functions.sql      |  8 +++++++
 2 files changed, 32 insertions(+)

diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index e845042d38..ea0fc48dbd 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -214,6 +214,30 @@ select count(*) > 0 from
  t
 (1 row)
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+ name 
+------
+ .
+(1 row)
+
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+ name 
+------
+(0 rows)
+
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+ pg_ls_dir 
+-----------
+(0 rows)
+
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+ERROR:  could not open directory "does not exist": No such file or directory
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+ size | access | modification | change | creation | isdir 
+------+--------+--------------+--------+----------+-------
+(0 rows)
+
 --
 -- Test adding a support function to a subject function
 --
diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql
index a398349afc..eb6ac12ab4 100644
--- a/src/test/regress/sql/misc_functions.sql
+++ b/src/test/regress/sql/misc_functions.sql
@@ -69,6 +69,14 @@ select count(*) > 0 from
    where spcname = 'pg_default') pts
   join pg_database db on pts.pts = db.oid;
 
+select * from (select pg_ls_dir('.', false, true) as name) as ls where ls.name='.'; -- include_dot_dirs=true
+select * from (select pg_ls_dir('.', false, false) as name) as ls where ls.name='.'; -- include_dot_dirs=false
+select pg_ls_dir('does not exist', true, false); -- ok with missingok=true
+select pg_ls_dir('does not exist'); -- fails with missingok=false
+
+-- Check that expected columns are present
+select * from pg_stat_file('.') limit 0;
+
 --
 -- Test adding a support function to a subject function
 --
-- 
2.17.0


--ZwgA9U+XZDXt4+m+
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="v30-0003-Add-pg_ls_dir_metadata-to-list-a-dir-with-file-m.patch"



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* [PATCH v1] Cleanup explicit PREPARE query strings
@ 2025-12-24 14:31 Julien Rouhaud <julien.rouhaud@free.fr>
  0 siblings, 0 replies; 21+ messages in thread

From: Julien Rouhaud @ 2025-12-24 14:31 UTC (permalink / raw)

When a multi statements query string contains one PREPARE statement (or
multiple), the whole query string was saved in the cached plan.  This is
wasteful as that string can be artitrarily big, but it can also confusing as
some other parts like pg_prepared_statements will output the saved query string
as-is.

This commit changes this behavior and only stores the part of the query string
that correspond to any given PREPARED statement, similarly to how it's already
done in pg_stat_statements.
---
 contrib/auto_explain/t/001_auto_explain.pl |  8 ++--
 src/backend/commands/prepare.c             | 43 +++++++++++++++++++--
 src/test/regress/expected/prepare.out      | 44 +++++++++++++---------
 src/test/regress/sql/prepare.sql           |  2 +-
 4 files changed, 72 insertions(+), 25 deletions(-)

diff --git a/contrib/auto_explain/t/001_auto_explain.pl b/contrib/auto_explain/t/001_auto_explain.pl
index 6af5ac1da18..535c4770095 100644
--- a/contrib/auto_explain/t/001_auto_explain.pl
+++ b/contrib/auto_explain/t/001_auto_explain.pl
@@ -60,7 +60,7 @@ $log_contents = query_log($node,
 
 like(
 	$log_contents,
-	qr/Query Text: PREPARE get_proc\(name\) AS SELECT \* FROM pg_proc WHERE proname = \$1;/,
+	qr/Query Text: PREPARE get_proc\(name\) AS SELECT \* FROM pg_proc WHERE proname = \$1/,
 	"prepared query text logged, text mode");
 
 like(
@@ -82,7 +82,7 @@ $log_contents = query_log(
 
 like(
 	$log_contents,
-	qr/Query Text: PREPARE get_type\(name\) AS SELECT \* FROM pg_type WHERE typname = \$1;/,
+	qr/Query Text: PREPARE get_type\(name\) AS SELECT \* FROM pg_type WHERE typname = \$1/,
 	"prepared query text logged, text mode");
 
 like(
@@ -98,7 +98,7 @@ $log_contents = query_log(
 
 like(
 	$log_contents,
-	qr/Query Text: PREPARE get_type\(name\) AS SELECT \* FROM pg_type WHERE typname = \$1;/,
+	qr/Query Text: PREPARE get_type\(name\) AS SELECT \* FROM pg_type WHERE typname = \$1/,
 	"prepared query text logged, text mode");
 
 unlike(
@@ -164,7 +164,7 @@ $log_contents = query_log(
 
 like(
 	$log_contents,
-	qr/"Query Text": "PREPARE get_class\(name\) AS SELECT \* FROM pg_class WHERE relname = \$1;"/,
+	qr/"Query Text": "PREPARE get_class\(name\) AS SELECT \* FROM pg_class WHERE relname = \$1"/,
 	"prepared query text logged, json mode");
 
 like(
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 34b6410d6a2..11b330ab73d 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -27,6 +27,7 @@
 #include "commands/prepare.h"
 #include "funcapi.h"
 #include "nodes/nodeFuncs.h"
+#include "nodes/queryjumble.h"
 #include "parser/parse_coerce.h"
 #include "parser/parse_collate.h"
 #include "parser/parse_expr.h"
@@ -64,6 +65,7 @@ PrepareQuery(ParseState *pstate, PrepareStmt *stmt,
 	Oid		   *argtypes = NULL;
 	int			nargs;
 	List	   *query_list;
+	const char *new_query;
 
 	/*
 	 * Disallow empty-string statement name (conflicts with protocol-level
@@ -80,14 +82,49 @@ PrepareQuery(ParseState *pstate, PrepareStmt *stmt,
 	 */
 	rawstmt = makeNode(RawStmt);
 	rawstmt->stmt = stmt->query;
-	rawstmt->stmt_location = stmt_location;
-	rawstmt->stmt_len = stmt_len;
+
+	/*
+	 * Extract the query text if possible.
+	 *
+	 * If we have a statement location, we can extract the relevant part of the
+	 * possibly multi-statement query string.  If not just use what we were
+	 * given.
+	 */
+	if (stmt_location < 0)
+	{
+		rawstmt->stmt_location = stmt_location;
+		rawstmt->stmt_len = stmt_len;
+		new_query = pstate->p_sourcetext;
+	}
+	else
+	{
+		const char *cleaned;
+		char	   *tmp;
+
+		rawstmt->stmt_len = stmt_len;
+		cleaned = CleanQuerytext(pstate->p_sourcetext, &stmt_location,
+								 &rawstmt->stmt_len);
+
+		if (rawstmt->stmt_len == 0)
+			rawstmt->stmt_len = strlen(cleaned);
+
+		/*
+		 * CleanQuerytext() removes any leading whitespace and returns a
+		 * pointer to the first actual character, so the cleaned query string
+		 * is guaranteed to start at offset 0.
+		 */
+		rawstmt->stmt_location = 0;
+		tmp = palloc(rawstmt->stmt_len + 1);
+		strlcpy(tmp, cleaned, rawstmt->stmt_len + 1);
+
+		new_query = tmp;
+	}
 
 	/*
 	 * Create the CachedPlanSource before we do parse analysis, since it needs
 	 * to see the unmodified raw parse tree.
 	 */
-	plansource = CreateCachedPlan(rawstmt, pstate->p_sourcetext,
+	plansource = CreateCachedPlan(rawstmt, new_query,
 								  CreateCommandTag(stmt->query));
 
 	/* Transform list of TypeNames to array of type OIDs */
diff --git a/src/test/regress/expected/prepare.out b/src/test/regress/expected/prepare.out
index 5815e17b39c..c645a4e5d0e 100644
--- a/src/test/regress/expected/prepare.out
+++ b/src/test/regress/expected/prepare.out
@@ -6,7 +6,17 @@ SELECT name, statement, parameter_types, result_types FROM pg_prepared_statement
 ------+-----------+-----------------+--------------
 (0 rows)
 
-PREPARE q1 AS SELECT 1 AS a;
+SELECT 'bingo'\;  PREPARE q1 AS SELECT 1 AS a \; SELECT 42;
+ ?column? 
+----------
+ bingo
+(1 row)
+
+ ?column? 
+----------
+       42
+(1 row)
+
 EXECUTE q1;
  a 
 ---
@@ -14,9 +24,9 @@ EXECUTE q1;
 (1 row)
 
 SELECT name, statement, parameter_types, result_types FROM pg_prepared_statements;
- name |          statement           | parameter_types | result_types 
-------+------------------------------+-----------------+--------------
- q1   | PREPARE q1 AS SELECT 1 AS a; | {}              | {integer}
+ name |          statement          | parameter_types | result_types 
+------+-----------------------------+-----------------+--------------
+ q1   | PREPARE q1 AS SELECT 1 AS a | {}              | {integer}
 (1 row)
 
 -- should fail
@@ -33,18 +43,18 @@ EXECUTE q1;
 
 PREPARE q2 AS SELECT 2 AS b;
 SELECT name, statement, parameter_types, result_types FROM pg_prepared_statements;
- name |          statement           | parameter_types | result_types 
-------+------------------------------+-----------------+--------------
- q1   | PREPARE q1 AS SELECT 2;      | {}              | {integer}
- q2   | PREPARE q2 AS SELECT 2 AS b; | {}              | {integer}
+ name |          statement          | parameter_types | result_types 
+------+-----------------------------+-----------------+--------------
+ q1   | PREPARE q1 AS SELECT 2      | {}              | {integer}
+ q2   | PREPARE q2 AS SELECT 2 AS b | {}              | {integer}
 (2 rows)
 
 -- sql92 syntax
 DEALLOCATE PREPARE q1;
 SELECT name, statement, parameter_types, result_types FROM pg_prepared_statements;
- name |          statement           | parameter_types | result_types 
-------+------------------------------+-----------------+--------------
- q2   | PREPARE q2 AS SELECT 2 AS b; | {}              | {integer}
+ name |          statement          | parameter_types | result_types 
+------+-----------------------------+-----------------+--------------
+ q2   | PREPARE q2 AS SELECT 2 AS b | {}              | {integer}
 (1 row)
 
 DEALLOCATE PREPARE q2;
@@ -168,20 +178,20 @@ SELECT name, statement, parameter_types, result_types FROM pg_prepared_statement
 ------+------------------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------
  q2   | PREPARE q2(text) AS                                             +| {text}                                             | {name,boolean,boolean}
       |         SELECT datname, datistemplate, datallowconn             +|                                                    | 
-      |         FROM pg_database WHERE datname = $1;                     |                                                    | 
+      |         FROM pg_database WHERE datname = $1                      |                                                    | 
  q3   | PREPARE q3(text, int, float, boolean, smallint) AS              +| {text,integer,"double precision",boolean,smallint} | {integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,name,name,name}
       |         SELECT * FROM tenk1 WHERE string4 = $1 AND (four = $2 OR+|                                                    | 
       |         ten = $3::bigint OR true = $4 OR odd = $5::int)         +|                                                    | 
-      |         ORDER BY unique1;                                        |                                                    | 
+      |         ORDER BY unique1                                         |                                                    | 
  q5   | PREPARE q5(int, text) AS                                        +| {integer,text}                                     | {integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,name,name,name}
       |         SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2 +|                                                    | 
-      |         ORDER BY unique1;                                        |                                                    | 
+      |         ORDER BY unique1                                         |                                                    | 
  q6   | PREPARE q6 AS                                                   +| {integer,name}                                     | {integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,integer,name,name,name}
-      |     SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2;    |                                                    | 
+      |     SELECT * FROM tenk1 WHERE unique1 = $1 AND stringu1 = $2     |                                                    | 
  q7   | PREPARE q7(unknown) AS                                          +| {path}                                             | {text,path}
-      |     SELECT * FROM road WHERE thepath = $1;                       |                                                    | 
+      |     SELECT * FROM road WHERE thepath = $1                        |                                                    | 
  q8   | PREPARE q8 AS                                                   +| {integer,name}                                     | 
-      |     UPDATE tenk1 SET stringu1 = $2 WHERE unique1 = $1;           |                                                    | 
+      |     UPDATE tenk1 SET stringu1 = $2 WHERE unique1 = $1            |                                                    | 
 (6 rows)
 
 -- test DEALLOCATE ALL;
diff --git a/src/test/regress/sql/prepare.sql b/src/test/regress/sql/prepare.sql
index c6098dc95ce..0e7fe44725e 100644
--- a/src/test/regress/sql/prepare.sql
+++ b/src/test/regress/sql/prepare.sql
@@ -4,7 +4,7 @@
 
 SELECT name, statement, parameter_types, result_types FROM pg_prepared_statements;
 
-PREPARE q1 AS SELECT 1 AS a;
+SELECT 'bingo'\;  PREPARE q1 AS SELECT 1 AS a \; SELECT 42;
 EXECUTE q1;
 
 SELECT name, statement, parameter_types, result_types FROM pg_prepared_statements;
-- 
2.52.0


--biRhQYMBrGQlqcCN--





^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2025-12-24 14:31 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-22 17:47 BUG #3774: create table like including index doesn't update pg_constraints with primary key guillaume (ioguix) de Rorthais <ioguix@free.fr>
2007-11-30 07:44 ` NikhilS <nikkhils@gmail.com>
2007-12-01 23:46   ` Tom Lane <tgl@sss.pgh.pa.us>
2007-12-02 08:14     ` NikhilS <nikkhils@gmail.com>
2007-12-13 00:34 ` Bruce Momjian <bruce@momjian.us>
2008-03-06 21:45   ` Bruce Momjian <bruce@momjian.us>
2008-03-06 22:20     ` Tom Lane <tgl@sss.pgh.pa.us>
2020-03-17 18:16 [PATCH v30 02/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v21 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v15 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v20 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v31 02/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v24 03/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v25 03/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v28 02/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v15 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v31 02/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v22 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v19 03/10] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2020-03-17 18:16 [PATCH v30 02/11] Add tests on pg_ls_dir before changing it Justin Pryzby <pryzbyj@telsasoft.com>
2025-12-24 14:31 [PATCH v1] Cleanup explicit PREPARE query strings Julien Rouhaud <julien.rouhaud@free.fr>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox