summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/php_pdo_pgsql_int.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace zend_bool uses with boolNikita Popov2021-01-151-4/+4
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Rewrite PDO result bindingNikita Popov2020-12-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of requiring the type to be determined in advance by the describer function and then requiring get_col to return a buffer of appropriate type, allow get_col to return an arbitrary zval. See UPGRADING.INTERNALS for a more detailed description of the change. This makes the result fetching simpler, more efficient and more flexible. The general possibility already existed via the special PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or inefficient. Now it's possible to easily implement behavior like "return int if it fits, otherwise string" and to avoid any kind of complex management of temporary buffers. This also fixes bug #40913 (our second highest voted bug of all time, for some reason). PARAM_LOB result bindings will now consistently return a stream resource, independently of the used database driver. I've tried my best to update all PDO drivers for this change, but some of the changes may be broken, as I cannot test or even build some of these drivers (in particular PDO dblib and PDO oci). Fixes are appreciated -- a working CI setup would be even more appreciated ;)
* Remove unused pdo_pgsql_column memberNikita Popov2020-12-181-1/+0
|
* PDO: Store/pass query_string as zend_stringNikita Popov2020-12-141-1/+1
| | | | | Rather than storing char* + size_t, use a zend_string*. Also avoid various copies of the query string.
* Fixed bug #79131Nikita Popov2020-12-101-1/+2
| | | | | | | | | | | | When a driver reports an error during EVT_ALLOC (and some over EVTs), make sure we handle it as usual, i.e. warn or throw. This requires some adjustments in PDO PgSQL to stop manually doing this through an impl error. Unfortunately the PDO PgSQL error messages regress because of this, as they now include a completely arbitrary error code. There doesn't seem to be an ability to skip it right now.
* PGSQL and POD_SQL: don't include pg_config.hChristoph M. Becker2020-05-251-0/+2
| | | | | | | | | | | | | | | | | | | | | Even if that header file is available, we better consider it private, and don't include it. The information about whether SSL support is enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no alternative way to get it (`PQinitSSL()` is always defined), so we remove it from the PHP info. Furthermore, the `PG_VERSION` and `PG_VERSION_STR` macros are no longer available, but as of libpq 9.1 there is `PQlibVersion()` which allows us to construct `PG_VERSION` in a most likely backwards compatible manner. The additional information available through `PG_VERSION_STR` is lost, though, so we define `PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`, and deprecate it right away. Since we are now requiring at least libpq 9.1, we can remove some further compatibility code and additional checks. Regarding the raised requirements: official support for PostGreSQL 9.0 ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so this is not supposed to be too much of an issue.
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* year++Xinchen Hui2018-01-021-1/+1
|
* Turn "pdo_stmt_methods" into constants.Dmitry Stogov2017-12-141-1/+1
|
* Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
|
* Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | Remove PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENTNikita Popov2015-04-241-2/+1
| | | | | | | | Use the generic ATTR_EMULATE_PREPARES instead.
* | optimize structsAnatol Belski2015-04-151-6/+6
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-6/+6
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | master renames phase 1Anatol Belski2014-08-251-1/+1
| |
* | ported from pdo - pgsql, odbc, mysql, firebirt, dblibAnatol Belski2014-08-191-1/+1
| |
* | Made a little clean upXinchen Hui2014-05-151-2/+2
|/
* Added new PDO::PGSQL_ATTR_DISABLE_PREPARES that uses PQexecParamsMatteo Beccati2014-03-111-0/+2
| | | | | | Faster than prepared statements when queries are run once. Slightly slower than PDO::ATTR_EMULATE_PREPARES but without the potential security implications of embedding parameters in the query itself.
* Deprecated PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENTMatteo Beccati2014-03-111-3/+2
|
* Drop PDO support for extremely old libpq versionsMatteo Beccati2014-03-111-5/+1
| | | | | | | | configure will now fail if any of the following function is missing: * PQprepare * PQexecParams * PQescapeStringConn * PQescapeByteaConn
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Refactored custom PDO_pgsql methods to trigger errors/exceptionsMatteo Beccati2013-06-051-3/+5
| | | | | | | | BC Break: the custom methods were previously just return false on failure. Now they throw an exception with a proper error message. An hopefully welcome improvement, but some application might be depending on the old behaviour. FWIW the PDO::pgsqlCopy* methods are not documented, even though they are available since 5.3.x.
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* - Year++Felipe Pena2012-01-011-1/+1
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* Added inTransaction() method to PDO, with specialized support for PostgresIlia Alshanetsky2010-06-101-0/+7
|
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* - Properly fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted ↵Matteo Beccati2009-11-041-0/+1
| | | | | | | | transaction). # Removed usage of the memory address when generating prepared statemend names # as uniqueness can't be enforced. Used a statment counter instead.
* - Fixed bug #48764 (PDO_pgsql::query always uses implicit prepared ↵Matteo Beccati2009-10-071-0/+7
| | | | | | | statements if v3 proto available) # original patch by Mark Kirkwood
* MFHMatteo Beccati2009-05-121-1/+1
| | | | | - Fixed bug #48188
* MFH:Matteo Beccati2009-04-301-4/+0
| | | | | | | | | | | | - Changed PDO_PGSQL configure script to require libpq 7.4 - Cleaned up usage of HAVE_PQ* defines - Fixed compiler warnings - Removed custom implementation of PQunescapeByte # Rationale: # - PDO_PGSQL couldn't even compile when using libpq 7.3 # - PostgreSQL 7.3 is unsupported since a long time # - Got consensus from pgsql devs on freenode
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|
* bump year and license versionfoobar2006-01-011-3/+3
|
* Retry on failed prepare resulting from duplicate statement name.Ilia Alshanetsky2005-12-171-0/+1
|
* Added PDO::pgsqlLOBCreate(), PDO::pgsqlLOBOpen() and PDO::pgsqlLOBUnlink().Wez Furlong2005-11-291-5/+16
|
* Addresses #35338.Wez Furlong2005-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Postgres client API is pretty poor, so we have zero idea about the actual parameter types in a statement. We now defer the preparation of a statement until the first call to execute is made. At that point, we have the parameters defined by the calling script, so we can use the typing specified there when we perform the prepare. For PDO_PARAM_LOB parameters, we set the binary formatting flag. We can't just set this flag for all parameters, because its meaning is not "string data, counted length" but "data is in native format". If this flag is set for a numeric column and we send the number 1 formatted as a string, then we will get an "insufficient data left in message" error message, because the library was expecting sizeof(int4) bytes but only saw 1 byte for "1". This is infuriating because we have no way to determine the datatypes for parameters, and the type we explicitly set has to match the type in the database. The only choice we're left with is telling postgres to deduce the type; we still have no idea what type was deduced.
* Add PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute, which, when setWez Furlong2005-07-201-0/+4
| | | | | | | | | | | | | | | | to true, forces the driver to use PDO's own emulated prepared statement support. Why would you want that, considering that native prepared statements are supposed to be the best thing ever? "Often postgresql will have to plan the query without knowing the parameters - and it will choose a bad plan. In some cases it will plan based on the first parameters you send. " Ugh. So now we have a way to let you decide that you know better than the pgsql query planner.
* Add early support for native prepared statements in pgsql.Wez Furlong2005-07-081-1/+7
| | | | | | Note that some tests now fail; if we can't resolve this in time for the beta, the prepare code should be disabled (I'll add a flag for this later today).
* Fold PQresultErrorField() into a macroEdin Kadribasic2005-07-011-0/+7
|