Paul M Foster <paulf(at)quillandmouse(dot)com> writes:
> I've written code to connect to and/or create databases in C. To check
> my work, I'll open up psql in another console. But if I'm connected to
> the default database (template1), and attempt to connect to that
> database in my C program, it fails.
This shouldn't happen, unless you're at your connection limit for
Postgres (32 by default), or running out of kernel file descriptors or
something.
What is the exact error you're getting in the C program?
-Doug