You use and .ags file to connect to ArcGIS Server and a .sde file to connect to SDE.
What is the method to connect to the Enterprise DataStore - a PostgreSQL database?? I haven't found any information on the ArcGIS Enterprise webpage, that explains how to connect.
Any pointers appreciated.
The DataStore is managed by the ArcGIS Enterprise deployment. It is not designed to be accessed directly via ArcGIS clients. You can use the DataStore tools (https://enterprise.arcgis.com/en/portal/latest/administer/windows/data-store-utility-reference.htm) to access some information.
Is there a specific reason that you want to connect directly to it?
So each layer in a Hosted Feature Service will be a Table in the Datastore SQL with a few exceptions; The best solution is to just manage it out of portal because editing the data in datastore can corrupt items in portal.