processSQLNamePattern() analog - Mailing list pgsql-hackers

From Sergey Cherkashin
Subject processSQLNamePattern() analog
Date
Msg-id 1528279574.27656.14.camel@postgrespro.ru
Whole thread Raw
Responses Re: processSQLNamePattern() analog
List pgsql-hackers
Hello!

I'm working on adding to psql commands to print information about access methods. I ran into the following problem:
The command "\dA" (as well as several commands that I write) accept the access method name template. The resulting
templateis processed by the processSQLNamePattern () function, which means that a template with a schema can be fed to
theinput. But since the access method does not have schema, it's needed to handle somehow a command like "\dA foo. *".
Atthis point, the command will display a full list of access methods, not paying attention to the presence of the
schemaname in the template. Function processSQLNamePattern () allows you to filter out the output, if for example to
comparethe name of the schema not with any value of the column, but with NULL. But in this case, patterns like "\dA
*.*"will not be eliminated.
 

I also need a possibility to handle templates of type "schema.table.column", but the function processSQLNamePattern ()
canprocess only "schema.table".
 

In this regard, the question: is it still worth adding a new function capable of handling these cases, or should the
psqluser deal with output like "all_schemas.mathed_table.mathed_column"? And is it worth fixing the current behavior of
"\dAfoo.*"?
 


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: why partition pruning doesn't work?
Next
From: Etsuro Fujita
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partitionwise join enabled.