Hi @ameydahikar
You should not have to specify this Server Name Indication (SNI) workaround option “?options=endpoint%3D” in your psql connection string. That’s a workaround option for drivers that do not support SNI.
For the branch you are trying to connect to, try grabbing a connection string for it from the Connect details widget on the Neon dashboard. Your psql command should look something like this:
when I do psql 'postgres://ameydahikar:supersecretpassword@ep-long-glade-283413.us-east-2.aws.neon.tech/neondb?sslmode=require'
It results in psql: error: ERROR: Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D<endpoint-id>'. See more at https://neon.tech/sni
OK. My mistake. I suspect you using an older version of Postgres? Pre v14? Support for SNI was added to libpq in PostgreSQL v14. If you try a newer version of Postgres (with psql), your connection should work.
Now, if you cannot upgrade Postgres:
I have not tried the SNI workarounds with psql, but the one you showed above is not defined correctly. Try this one: