aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/postgres.php
Commit message (Collapse)AuthorAgeFilesLines
* [ticket/11015] Remove old dbal classesIgor Wiedler2012-11-121-19/+0
| | | | PHPBB3-11015
* [ticket/11015] Add BC files for the driversIgor Wiedler2012-07-211-0/+19
| | | | PHPBB3-11015
* [ticket/11015] Make DBAL classes autoloadableIgor Wiedler2012-07-211-498/+0
| | | | | | | | PHPBB3-11015 This allows us to just create the object without having to include the driver first. However, it also means that users must specify the full class name in config.php
* [ticket/9916] Updating header license and removing Version $Id$Unknown2011-12-311-2/+1
| | | | PHPBB3-9916
* Merge branch 'develop-olympus' into developOleg Pudeyev2011-03-101-1/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * develop-olympus: [ticket/10057] Fixes for a bunch of small problems. [ticket/10035] ACP template edit feature allows to read any files on webserver. [ticket/10057] Handle the case of missing interbase extension better. [ticket/10057] Fixed wrong usage of sql_error again, in firebird. [ticket/10057] Fixed usage of sql_error again. [ticket/10057] Condition file/line display on DEBUG_EXTRA or IN_INSTALL. [ticket/10057] Fixed wrong usage of sql_error in postgres dbal. [ticket/10057] Skip ibase_service_attach if firebird connection failed. [ticket/10057] Check for interbase function existence. [ticket/10057] Split statements in firebird dbal for readability. [ticket/10057] Include error collector class file in postgres dbal. [ticket/10057] Moved error collector class into its own file. [ticket/10057] Use a class for error collection. [ticket/10057] More informative error messages in postgres dbal. [ticket/10057] No negative array indexing. [ticket/10057] Report postgres db connection errors.
| * [ticket/10057] Fixes for a bunch of small problems.Oleg Pudeyev2011-03-081-1/+1
| | | | | | | | PHPBB3-10057
| * [ticket/10057] Fixed usage of sql_error again.Oleg Pudeyev2011-03-071-2/+4
| | | | | | | | PHPBB3-10057
| * [ticket/10057] Fixed wrong usage of sql_error in postgres dbal.Oleg Pudeyev2011-03-061-3/+15
| | | | | | | | | | | | | | | | pg_last_error does not work if no connection was ever established. Therefore we must keep track of connection errors in postgres dbal ourselves. PHPBB3-10057
| * [ticket/10057] Include error collector class file in postgres dbal.Oleg Pudeyev2011-03-061-0/+5
| | | | | | | | | | | | This change is in its own commit because it will be reverted for 3.1. PHPBB3-10057
| * [ticket/10057] Use a class for error collection.Oleg Pudeyev2011-03-061-4/+6
| | | | | | | | | | | | | | Replaced error collection functions with a class for a cleaner implementation. PHPBB3-10057
| * [ticket/10057] More informative error messages in postgres dbal.Oleg Pudeyev2011-03-061-2/+2
| | | | | | | | | | | | | | When pg_connect/pg_pconnect do not exist, mention that they come with pgsql extension. PHPBB3-10057
| * [ticket/10057] Report postgres db connection errors.Oleg Pudeyev2011-03-061-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses two issues: 1. When pgsql extension is missing, @pg_connect would silently abort execution. Check for pg_connect existence before calling it, same with pg_pconnect. 2. When connection fails, the error reported by php is discarded. User is shown the failure message without the reason for failure, making debugging difficult. Collect the error (if any) via a temporarily installed error handler, and display it if connection failed. PHPBB3-10057
* | [task/config-class] Implemented a config class to replace the global array.Nils Adermann2011-01-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a phpbb_config class which simply holds an array and does not persist any data. It implements ArrayAccess, Countable and IteratorAggregate to allow regular use of configuration as if it was still an array. The phpbb_config_db class depends on an instance of the dbal and a cache driver. It obtains the configuration data from cache and database as necessary and persists data to the database. The functions set_config and set_config_count remain for backward compatability but they only call methods on the new config class now instead of directly manipulating the database and cache. PHPBB3-9988
* | [ticket/9556] Drop php closing tags, add trailing newlineIgor Wiedler2010-11-111-2/+0
|/ | | | | | | | | | | | Closing tags converted using Oleg's script. remove-php-end-tags.py -a . Trailing newlines added using the following where $ext is file extension. find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s; Extensions: php, css, html, js, xml. PHPBB3-9556
* Merge branch 'ticket/jellydoughnut/9637' into develop-olympusAndreas Fischer2010-07-111-3/+4
|\ | | | | | | | | * ticket/jellydoughnut/9637: [ticket/9637] Do not cache SQL server version in all cases
| * [ticket/9637] Do not cache SQL server version in all casesJosh Woody2010-07-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | Because the existing cache is global, there is no way to differentiate between each of two databases which may be two different DBAL objects pointing to servers with wildly different versions of an RDBMS. phpBB only has this situation in the UCF, thus only one file changed outside the DBAL. I have added a second optional parameter, $use_cache to each of the implementations of dbal::sql_server_info() PHPBB3-9637
* | [ticket/9643] Only split $port from $sqlserver, if it's not an IPv6 address.Andreas Fischer2010-06-081-1/+4
|/ | | | PHPBB3-9643
* [ticket/9518] Correctly create new connection on PostgreSQL when new ↵Andreas Fischer2010-05-141-1/+8
| | | | | | | | connection is forced. pg_connect() takes an integer as the second parameter, but we were passing a boolean parameter. The function especially requires passing the PGSQL_CONNECT_FORCE_NEW constant if a new connection is to be forced. Passing 0 as the second parameter for 'do not force a new connection' doesn't work as expected, hence we're calling the function without a second parameter in this case. PHPBB3-9518
* Fix bug in postgresql db layer for LIMIT ALL clauses (reported by JRSweets)Meik Sievertsen2009-03-301-3/+3
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9412 89ea8834-ac86-4346-8a33-228a782c2dd0
* Ok, story real database server info, as well as caching itMeik Sievertsen2008-09-041-21/+21
| | | | | | Store it on installation too - allows us to check the db version used on installation and used currently to warn the user about incompatibilities git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8814 89ea8834-ac86-4346-8a33-228a782c2dd0
* Refine fix for #31445 originally committed in r8758Chris Smith2008-09-021-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8809 89ea8834-ac86-4346-8a33-228a782c2dd0
* Correctly return results for nested cached queries (Bug #31445 - Patch by faw)Chris Smith2008-08-141-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8758 89ea8834-ac86-4346-8a33-228a782c2dd0
* dumdidum... sorry. ;)Meik Sievertsen2007-10-051-7/+7
| | | | git-svn-id: file:///svn/phpbb/trunk@8147 89ea8834-ac86-4346-8a33-228a782c2dd0
* tweak the sql_like_expression feature a little bit to allow correct escapingMeik Sievertsen2007-06-241-0/+9
| | | | git-svn-id: file:///svn/phpbb/trunk@7789 89ea8834-ac86-4346-8a33-228a782c2dd0
* correctly re-assign query resultMeik Sievertsen2007-06-121-1/+1
| | | | git-svn-id: file:///svn/phpbb/trunk@7753 89ea8834-ac86-4346-8a33-228a782c2dd0
* - changed the way we do forum accounting in phpBB, far less intensive and ↵David M2007-05-051-14/+24
| | | | | | | | | | | much faster. sync() recalculates the number of topics and posts using just the topics table instead of having to join topics and posts together. However, even this can be avoided if we know what operation is happening and an auto sync is not in action. Since MCP operations are "known", we can provide very fast MCP operations. - changed the way we decide if a DB gets multi value support. Old method uses switch/case, new method assumes a DB can't unless the DB says it can via a property I hope nothing is broken :P git-svn-id: file:///svn/phpbb/trunk@7466 89ea8834-ac86-4346-8a33-228a782c2dd0
* - PostgreSQL can now use schemas. During install, under database name, enter ↵David M2007-04-011-2/+17
| | | | | | | | | databasename.schema - phpversion() to PHP_VERSION git-svn-id: file:///svn/phpbb/trunk@7255 89ea8834-ac86-4346-8a33-228a782c2dd0
* - clean up mssql and mssql_odbc, mssql now uses a different method of ↵David M2007-02-191-2/+2
| | | | | | | | | | | | | dealing with IDENTITY - clean up firebird, I will consider changing it to use fetch array instead of fetch object. it's identity code already uses this method as of right... now :D - fix a tiny bug in MySQL's driver (remember to pass the connect id to all DBAL functions) - add new_link as a new param for sql_connect. This allows you to make connections that are not dependant on each other. This is done for our friends mysql, mssql, postgresql and oracle. Now for everybody else.. (I said this was clever ;) MySQLi and SQLite should always spawn a new connection when you call it while mssql_odbc and firebird both will create new links if you give them different params (different creds) than the previous connection(s). Thus we can always promise new links :D - fixed a bug in the converter - cleaned up the dbal a little git-svn-id: file:///svn/phpbb/trunk@7009 89ea8834-ac86-4346-8a33-228a782c2dd0
* - fix some oddities (doubled spaces for example)Meik Sievertsen2007-01-261-1/+1
| | | | | | | | | | - changed the way make_forum_select() is returning the forum list - now including skipped forums but being disabled. This should make identifying the correct forum much more easier. - Changed some permission namings based on suggestions by the community - Tried to comply to the permission field ordering within the language files while displaying permission sets. Hopefully it's worth the additional processing time. - Disable submit buttons after clicking for installation and conversions. git-svn-id: file:///svn/phpbb/trunk@6930 89ea8834-ac86-4346-8a33-228a782c2dd0
* ok, handled some bugs... the most important being validate_username (the ↵Meik Sievertsen2007-01-171-16/+9
| | | | | | variable passed to validate_data([...]array('username', [...])) and updating group listings while doing relevant group actions. Oh, and PM icons are working now. :o git-svn-id: file:///svn/phpbb/trunk@6894 89ea8834-ac86-4346-8a33-228a782c2dd0
* - store sql_layer directly within the layer itselfMeik Sievertsen2006-10-141-11/+2
| | | | | | | | - new method sql_multi_insert to circumvent db-specific hacks (hopefully not introduced any parsing errors) git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0
* *** empty log message ***David M2006-10-061-17/+14
| | | | git-svn-id: file:///svn/phpbb/trunk@6450 89ea8834-ac86-4346-8a33-228a782c2dd0
* - finally removed sql_numrowsMeik Sievertsen2006-10-041-61/+8
| | | | | | | | - sql_fetchfield now in dbal.php - check query id correctly as well as other tiny fixes git-svn-id: file:///svn/phpbb/trunk@6439 89ea8834-ac86-4346-8a33-228a782c2dd0
* - query id can be zero [Bug #4584]Nils Adermann2006-10-031-1/+1
| | | | git-svn-id: file:///svn/phpbb/trunk@6438 89ea8834-ac86-4346-8a33-228a782c2dd0
* made sql_rowseek consistent with the dbal methods as well as fixing ↵Meik Sievertsen2006-09-231-1/+1
| | | | | | sql_query_limit for mssql, especially if sql_query_limit($sql, 0, 0) is given... git-svn-id: file:///svn/phpbb/trunk@6389 89ea8834-ac86-4346-8a33-228a782c2dd0
* bug fixesDavid M2006-09-161-7/+0
| | | | | | | | schema changes i really hope nothing went wrong git-svn-id: file:///svn/phpbb/trunk@6371 89ea8834-ac86-4346-8a33-228a782c2dd0
* some updates. Also adjusted the utf tools and normalizer more to our coding ↵Meik Sievertsen2006-08-221-5/+5
| | | | | | guidelines. git-svn-id: file:///svn/phpbb/trunk@6312 89ea8834-ac86-4346-8a33-228a782c2dd0
* so.... what does this thing do?David M2006-08-111-8/+0
| | | | | | | | | | | well, the super fast, ultra efficient, massively huge BBCode handling system was implemented differently on each DBMS. Although this provided the best performance, the solution was a bit hacky. So what does this new thing do? We use base64 encoding to make everything nice and shiny, it turns into nice, safe characters that we can just jam into varchars on essentially any database. This has two implications: we must decode every bitfield we get AND we have slightly fewer IDs to work with. It goes down from 2040 BBCodes to 1512. We lose like a quarter of them :P P.S. I hope nothing broke :P git-svn-id: file:///svn/phpbb/trunk@6263 89ea8834-ac86-4346-8a33-228a782c2dd0
* *** empty log message ***David M2006-08-061-3/+12
| | | | git-svn-id: file:///svn/phpbb/trunk@6244 89ea8834-ac86-4346-8a33-228a782c2dd0
* This should end some issues we have been having regarding the proper binary ↵David M2006-08-061-1/+18
| | | | | | | | | encoding of stuff. :D Acyd Burn: quit breaking the schema :P git-svn-id: file:///svn/phpbb/trunk@6238 89ea8834-ac86-4346-8a33-228a782c2dd0
* - acm_file uses an index pointer to the current row instead of shifting the ↵Nils Adermann2006-08-011-1/+35
| | | | | | | | | | | | | | result array now [Bug #2451] - all dbals adjusted to use the cache in sql_fetchfield, sql_rowseek, sql_numrows and sql_freeresult [Bug #2451] - use include_once for dbal.php to at least theoretically allow connections to multiple databases at once - added a space to an SQL query [Bug #3506] - detailed information on adding friends/foes [Bugs #2509, #2499] - e modifier stands for evil, so I removed it ;-) - corrected progress_bar image filename in imageset.cfg [Bug #3374] git-svn-id: file:///svn/phpbb/trunk@6225 89ea8834-ac86-4346-8a33-228a782c2dd0
* - Some profile stuff :DDavid M2006-07-151-1/+1
| | | | | | | - Some DB stuff :D git-svn-id: file:///svn/phpbb/trunk@6180 89ea8834-ac86-4346-8a33-228a782c2dd0
* fixing a typo in postgres dbalNils Adermann2006-07-141-1/+1
| | | | git-svn-id: file:///svn/phpbb/trunk@6179 89ea8834-ac86-4346-8a33-228a782c2dd0
* - tackle some usability issuesMeik Sievertsen2006-07-091-0/+10
| | | | | | | | | - fix bug #3147 - added the lock-images made by SHS` - fixed MSSQL errors (adding the correct ESCAPE sequence) git-svn-id: file:///svn/phpbb/trunk@6161 89ea8834-ac86-4346-8a33-228a782c2dd0
* make sure custom profile fields are created correctly on registration (#2225)Meik Sievertsen2006-06-131-6/+6
| | | | git-svn-id: file:///svn/phpbb/trunk@6058 89ea8834-ac86-4346-8a33-228a782c2dd0
* ok, this one is rather large... the most important change:Meik Sievertsen2006-06-061-17/+7
| | | | | | | | | re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different apart from this, code cleanage, bug fixing, etc. git-svn-id: file:///svn/phpbb/trunk@6015 89ea8834-ac86-4346-8a33-228a782c2dd0
* some adjustmentsMeik Sievertsen2006-06-021-12/+12
| | | | | | | nils: please have a look at the @todo comment in mcp_queue.php git-svn-id: file:///svn/phpbb/trunk@6002 89ea8834-ac86-4346-8a33-228a782c2dd0
* some tiny changes...Meik Sievertsen2006-05-261-0/+2
| | | | git-svn-id: file:///svn/phpbb/trunk@5967 89ea8834-ac86-4346-8a33-228a782c2dd0
* - seperate queries and cached queriesMeik Sievertsen2006-05-201-3/+2
| | | | | | | | | - display correct read/unread information while displaying active topics - fix for SELECT DISTINCT in mssql using sql_query_limit - fix for forum updating in ACP using mssql (and probably other dbal having problems with primary keys in updates) git-svn-id: file:///svn/phpbb/trunk@5940 89ea8834-ac86-4346-8a33-228a782c2dd0
* I hope nothing broke!David M2006-05-051-5/+10
| | | | | | | | | - Added a query builder, it is currently only used for complex queries that involve a FROM clause with two tables and a left join - Changed some function calls in the DBAL - Made the viewtopic queries nicer git-svn-id: file:///svn/phpbb/trunk@5885 89ea8834-ac86-4346-8a33-228a782c2dd0