Suchen / SearchNavigation |
PostgreSQL Access with AppleScript using PHP Data Objects26 Okt 2011 - 07:39 These pages describe and provide an AppleScript library to access PostgreSQL databases via AppleScript. Only scripting tools coming with OS X 10.7 (“Lion”) are used, no additional software is required. The library is an AppleScript with an embedded PHP script that is performing the actual communication with the PostgreSQL database server. The library will not run with systems prior to Lion. The script library described here is an adaption from the MySQL library. Since that script uses the PHP Data Objects abstraction layer, adapting it to other databases is pretty simple if the necessary driver is installed. With Lion, Apple changed the main SQL server in the server system from MySQL to PostgreSQL. Accordingly, Lion client systems come with the necessary tools to access this server. A PostgreSQL driver for the PHP Data Objects is one of them. I have not much experience with PostgreSQL and did some basic tests with this library only. Several things in the description for SQLite are valid here as well, particularly the reasoning about
General HintsFor developing and testing I used a PostgreSQL installation as provided by EnterpriseDB. If you want to test this library on a client Mac, I suggest to use that distribution. They prepared an Image file with a nice and simple installer for Mac OS. Probably on first launch, it will tell you that some cache settings need to be changed. If so, restart your machine and run it again. I strongly suggest to include the phpPgAdmin administration tool in the installation. It will install a complete (additional) Apache server (running on port 8080, so it does not interfere with your Web Sharing), PHP and the necessary Web pages. When the installation is complete, you can use the administration page on your Mac: http://localhost:8080/phpPgAdmin/ Log in as user “postgres” using the password you entered during the installation.
|
PostgreSQL Access with AppleScript using PHP Data Objects |