Pending

User tests: Successful: Unsuccessful:

avatar gpongelli
gpongelli
25 Mar 2012

This driver implements inherited function from JDatabase class and add some other useful function to be able to use Joomla! on PostgreSQL database.
There is also a class that inherits from JDatabaseQuery to be able to create query object using PostgreSQL dialect.
Also added change item class for Postgresql under CMS libraries folder.
This pull include codes from platform 12.1 for JDatabaseQuery::charLength to address CMS' CASE WHEN
queries that has to be compared with 0 .

JDatabasePostgresql::getQuery has an optional second parameter to retrieve JDatabasePostgresqlQuery object, used inside JDatabasePostgresql::insertid call .

PostgreSQL's added functions:

  • getRandom, ge a random number
  • getStringPositionSQL, returns string's position inside another string
  • releaseTransactionSavepoint, release given savepoint during transaction
  • showTables, lists all table in database
  • transactionSavepoint, to create a savepoint

Overridden functions:

  • connected
  • dropTable
  • escape
  • explain
  • fetchArray
  • fetchAssoc
  • fetchObject
  • freeResult
  • getAffectedRows
  • getAlterDbCharacterSet
  • getCollation
  • getCreateDbQuery
  • getNumRows
  • getQuery
  • getTableColumns
  • getTableCreate
  • getTableKeys
  • getTableList
  • getVersion
  • hasUTF
  • insertid
  • insertObject
  • lockTable
  • query
  • queryBatch
  • renameTable
  • replacePrefix
  • select
  • setUTF
  • test
  • transactionCommit
  • transactionRollback
  • transactionStart
  • unlockTables
  • updateObject

PostgreSQL database query added functions:

  • limit, a possible replace for limit in setQuery
  • offset, a possible replace for limit in setQuery
  • forShare, lock table/row during SELECT
  • forUpdate, lock table/row during SELECT
  • noWait, no wait a locked table
  • returning, an INSERT INTO optional clause to returns last insert id
avatar gpongelli gpongelli - open - 25 Mar 2012
avatar gpongelli
gpongelli - comment - 25 Mar 2012

See #84 .

avatar JoaoSRaposo
JoaoSRaposo - comment - 1 Jun 2012

Hello gpongelli,

Really nice work.
Postgres support is very important to easily integrate Joomla with other applications that are using postgres DB.

Thank you very much for you work and hope this pull request will be included in next Joomla release.

avatar JoaoSRaposo
JoaoSRaposo - comment - 3 Aug 2012

Hi,

I'm using your version for about two months and only recently found a bug :)

When I try to process multiple articles, for example when copying multiple articles from one category to another changing their language, I receive the following error (translated from portuguese):

The batch process failed with the following message: Failed to archive JTableAsset ::
JLIB_DATABASE_QUERY_FAILED ERROR: null value in the "rules" violates the constraint not null SQL = INSERT INTO "minonl_assets" ("name", "title" , "parent_id", "level", "lft", "RGT") VALUES ('com_content.article.98', 'Software and Human Resources Management in the Cloud', 207,4,323,324) RETURNING id

The result of this operation, is that only one article is copied and mantains de original language.

In the screencast bellow you can see it happening.

http://screencast.com/t/31QjGSCiOrxL

It's not a serious error so I can continue working with no problem, I just want to let you now ;)

Regards,

avatar gpongelli
gpongelli - comment - 4 Aug 2012

Thank you for your reporting, I'll try to solve this error when I'll come back from holidays.
That version is a little bit old, it's in plan to update 2.5 and realize 3.0 branch with Postgresql fully supported by CMS.

Eng. Gabriele Pongelli

avatar gpongelli
gpongelli - comment - 23 Aug 2012

Hi Joao,
actually I'm working on porting this driver to 3.0 , could you test if this
error is present with this zip ?
https://github.com/gpongelli/joomla-cms/zipball/postgresql_3.0

Actually I haven't a 2.5 installation so I can't replicate nor debug this
error.

Thank you,
Eng. Gabriele Pongelli.

2012/8/4 Gabriele Pongelli gabriele.pongelli@gmail.com

Thank you for your reporting, I'll try to solve this error when I'll come
back from holidays.
That version is a little bit old, it's in plan to update 2.5 and realize
3.0 branch with Postgresql fully supported by CMS.

Eng. Gabriele Pongelli

AVVERTENZE AI SENSI DEL D.LGS. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e negli
eventuali files allegati, sono da considerarsi strettamente riservati. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceveste per errore
questo messaggio, Vi preghiamo cortesemente di darcene notizia
all'indirizzo e-mail di cui sopra e di procedere alla distruzione del
messaggio stesso, cancellandolo dal Vostro sistema; costituisce
comportamento contrario ai principi dettati dal D.lgs. 196/2003 il
trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad
altri soggetti, copiarlo, od utilizzarlo per finalità diverse.
This electronic transmission is strictly confidential and intended solely
for the addresses. It may contain information which is covered by legal,
professional or other privilege. If you are not the intended addressee, you
must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error, please
notify us and delete the received data as soon as possible.

Il giorno 03/ago/2012, alle ore 12:50, JoaoSRaposo<
reply@reply.github.com>
ha scritto:

Hi,

I'm using your version for about two months and only recently found a
bug :)

When I try to process multiple articles, for example when copying
multiple articles from one category to another changing their language, I
receive the following error (translated from portuguese):

The batch process failed with the following message: Failed to archive
JTableAsset ::
JLIB_DATABASE_QUERY_FAILED ERROR: null value in the
"rules" violates the constraint not null SQL = INSERT INTO "minonl_assets"
("name", "title" , "parent_id", "level", "lft", "RGT") VALUES
('com_content.article.98', 'Software and Human Resources Management in the
Cloud', 207,4,323,324) RETURNING id

The result of this operation, is that only one article is copied and
mantains de original language.

In the screencast bellow you can see it happening.

http://screencast.com/t/31QjGSCiOrxL

It's not a serious error so I can continue working with no problem, I
just want to let you now ;)

Regards,


Reply to this email directly or view it on GitHub:
#166 (comment)

avatar mbabker mbabker - close - 28 Dec 2012
avatar gpongelli gpongelli - reference | - 16 Mar 13
avatar beat beat - reference | fefc671 - 8 Sep 13

Add a Comment

Login with GitHub to post a comment