YES!!! The chdir caused the error! Thanks very much for this help. BTW it was worse than just "not a very good idea" to use chdir - After generating the error, I would lose the ability to see things in my database until restarting postgresql. All's okay now!
On Wed, Sep 8, 2021 at 8:56 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > On Thu, Sep 9, 2021 at 9:19 AM Celia McInnis <celia.mcin...@gmail.com> > wrote: > > Note that the file does exist:! (How do I know if it is looking under > the correct directory? Other times I have done similar temporary table > creations with no problems!): > > PostgreSQL internally uses relative paths. It's probably not a very > good idea to use 'chdir' in a procedure. >