Skip to content

poutapilvi/hphp-pgsql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postgres Extension for HipHop

This is an implementation of the pgsql PHP extension for the HipHop PHP VM.

Note: As of writing, this extension is blocked on this issue

Prerequisites

This extension only requires the libpq library distributed with Postgres and HipHop VM itself.

Building & Installation

Installation requires a copy of HipHop to be built from source on the local machine, instructions on how to do this are available on the HipHop Wiki. Once done, the following commands will build the extension.

$ cd /path/to/extension
$ $HPHP_HOME/hphp/tools/hphpize/hphpize
$ cmake .
$ make

This will produce a pgsql.so file, the dynamically-loadable extension.

To enable the extension, you need to have the following section in your hhvm config file

DynamicExtensionPath = /path/to/hhvm/extensions
DynamicExtensions {
	* = pgsql.so
}

Where /path/to/hhvm/extensions is a folder containing all HipHop extensions, and pgsql.so is in it. This will cause the extension to be loaded when the virtual machine starts up.

Differences from Zend

There are a few differences from the standard Zend implementation.

  • The connection resource is not optional.
  • Persistent connections are not implemented
  • The following functions are not implemented for various reasons:
    • pg_convert
    • pg_copy_from
    • pg_copy_to
    • pg_field_type
    • pg_insert
    • pg_last_oid
    • pg_lo_close
    • pg_lo_create
    • pg_lo_export
    • pg_lo_import
    • pg_lo_open
    • pg_lo_read_all
    • pg_lo_read
    • pg_lo_seek
    • pg_lo_tell
    • pg_lo_unlink
    • pg_lo_write
    • pg_meta_data
    • pg_pconnect
    • pg_put_line
    • pg_select
    • pg_set_client_encoding
    • pg_set_error_verbosity
    • pg_trace
    • pg_tty
    • pg_untrace
    • pg_update

Otherwise, all functionality is (or should be) the same as the Zend implementation.

As always, bugs should be reported to the issue tracker and patches are very welcome.

About

Postgres Extension for the HipHop PHP Virtual Machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 88.0%
  • PHP 12.0%