Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > Postgres DB Driver > Functions
open/3
Description
open/3 is an Erlang function exported by "postgres" module.
This function retrieves a new DB handle based on the parameters provided by register/2.
References
•register/2
Parameters
Name
Type
Database
atom()
Connection ID to the database.
User
string()
Optional. User name required to open a new DB handle. Default value is "".
Password
Optional. User password required to open a new DB handle. Default value is "".
Result
Value or Type
{db_handle, integer()}
On success returns a new Database handle.
Code Sample
> postgres:open(test_db).