ERROR: Duplicate Connection Name PostgreSQL (DBLink)

IT Support Forum Forums Databases PostgreSQL SQL Queries ERROR: Duplicate Connection Name PostgreSQL (DBLink)

This topic contains 0 replies, has 1 voice, and was last updated by  Webmaster 2 years, 4 months ago.

  • Author
  • #2118


    When you try to run SQL statements in PostgreSQL you get this error:

    ERROR: duplicate connection name

    ********** Error **********

    ERROR: duplicate connection name
    SQL state: 42710

    This may be because you have a dblink open. To fix this, close the existing connection. To close the connection, search for dblink_connect to get the name of the duplicate connection then use this command:

    SELECT public.dblink_disconnect(‘Name of duplicate connection’);

    ❗ Note: You may need to roll back the transaction first using this command: rollback transaction;

    Alternatively, you may be trying to create a new connection with the same name as a connection that’s stored in a different schema. Try renaming your connection and trying again.

You must be logged in to reply to this topic.