Jasbinder Bali wrote: > Hi, > I have a database in postgres and i've given trusted permissions to all > making required changes > in pg_hba.conf. > > Now, I'm trying to connect to the database using ECPG. Unfortunately after > EXEC SQL CONNECT dbxyz > gives me error -402 that means i don't have permissions to the database.
If you turn on connection logging on the postgresql server you'll see what's happening. Don't forget system users and postgresql users aren't connected.