Hi @frances, welcome back!
I would try adding libpq-dev to a packages.txt file, which will install Postgres development headers on the image. Often times, when database drivers don’t work, it’s because it’s trying to call an underlying C library.
Best,
Randy