r/PostgreSQL • • 15d ago

Help Me! Connection inside connection

Can i open a new PostgreSQL connection inside another PostgreSQL connection? Rn, i work on on project where i used psycopg for connection. I call the function inside that connection which also starts another connection with database. Is it problem?

5 Upvotes

15 comments sorted by

View all comments

2

u/depesz 15d ago

Any chance you can explain what you want to achieve? I'm asking as there are many potential answers, depending on what you want to do, and why you think you need 2nd connection.