Postgres Test Scripts

Testing Scripts

This page has links to test scripts you can use to test PostgreSQL connectivity for php, pdo, perl, jsp, and python.

In each script you will need to change the database name, user name and password to your own. While you can change any of the scripts to query an existing table, our PostgreSQL Create Script can be used to create all of the objects used in the test scripts.

Simply log into phpPgAdmin, paste the contents of PostgreSQL Create Script into the SQL window, and execute. .

***Be sure to de-select "Paginate Results" before running the create script. Failing to do so will cause the script to fail.

.

PostgreSQL Create Script - paste into SQL window in phpPgAdmin and execute. This will create a schema, sequence, table, and insert 3 rows of data into the table. ***Be sure to de-select "Paginate Results" before running the create script. Failing to do so will cause the script to fail.

PostgreSQL PHP Test Script - Save as php-test.php and upload to your public_html directory. Browse to http://yourdomain.com/php-test.php

PostgreSQL PDO Test Script - Save as pdo-test.php and upload to your public_html directory. Browse to http://yourdomain.com/pdo-test.php

PostgreSQL Perl Test Script - save as perl-test.pl and upload to your home directory. Log in via SSH and issue: 'perl perl-test.pl'

PostgreSQL JSP Test Script - save as jsp-test.jsp and upload to your servers document root. Browse to http://domain.com/jsp-test.jsp

PostgreSQL Python Test Script - save as python-test.py and upload to your home directory. Log in via SSH and issue: 'python python-test.py'