PostgreSQL
PostgreSQL is an open source relational database management system.
There are different technologies you can use to access PostgreSQL from web applications developed with HTML5 Builder:
- The Database component, documented below. Requirements: client and PHP PDO extension.
- PHP functions, documented here. Requirements: client and PHP extension.
Contents
Installation
Client
Download the PostgreSQL Installer from here, and run it.
You must also tweak your PATH environment variable:
- Open Environment Variables dialog:
- On Windows Vista, Windows 7 and Windows 8: Go to Start, right-click Computer, click on Properties, open Advanced system settings link on the left sidebar, and click Environment Variables… at the bottom of the page.
- On Windows XP: Right-click My Computer, then click Properties, go to the Advanced tab and click Environment variables.
- On the System variables section, select the entry for PATH and click Edit….
- Add the path to the bin folder inside PostgreSQL’s installation directory at the end of your PATH environment variable, separated from the previous content with a semicolon (previous\paths;new\path).
PHP PDO Extension
Enable the extension by uncommenting (removing the ;
at the beginning) the following line in PHP’s configuration file (php.ini):
;extension=php_pdo_pgsql.dll
→extension=php_pdo_pgsql.dll
- For HTML5 Builder’s internal server, apply the changes to the php.ini.template file.
PHP Extension
Enable the extension by uncommenting (removing the ;
at the beginning) the following line in PHP’s configuration file (php.ini):
;extension=php_pgsql.dll
→extension=php_pgsql.dll
- For HTML5 Builder’s internal server, apply the changes to the php.ini.template file.
Configuration
Tip: You can use the Data Explorer to configure your PostgreSQL connections the RAD way.
To use a Database component with PostgreSQL, configure it with the following property values:
- DriverName: postgres.
Then fill the rest of the mandatory properties as required.
Help Resources
Documentation
Frequently Encountered Problems
Unable to load dynamic library
- PHP Warning: PHP Startup: Unable to load dynamic library '<HTML5 Builder installation path>\ext\php_pgsql.dll' - Cannot find the specified module
If you run into this, you most probably forgot to configure the PATH environment variable.