Ticket #126 (in_QA defect)

Opened 19 months ago

Last modified 4 weeks ago

Postgre Adapter: better handling of timestamps

Reported by: marcosdsanchez Owned by:
Priority: minor Milestone: 1.1.3
Component: Database adapter Version:
Keywords: Cc:

Description (last modified by VexedPanda) (diff)

I have patched the Postgresql adapter with this features:

- multiples schemas (thanks to disaster in the Qcodo forums)
- added new "interval" type (thanks krusty in the Qcodo forums)

Attachments

QPostgreSqlDatabase.class.php.patch (2.3 kB) - added by marcosdsanchez 19 months ago.
new patch
postgres_schema_support.patch (4.9 kB) - added by bithead 12 months ago.
Additions to QPostgreSqlDatabase, QDatabaseBase, QApplicationBase
qpostgresqldatabasesql.patch (3.4 kB) - added by bithead 11 months ago.
bug fix patch to QPostgresqlDatabase.class.php

Change History

Changed 19 months ago by marcosdsanchez

  • status changed from new to in_QA

Changed 19 months ago by marcosdsanchez

new patch

Changed 19 months ago by marcosdsanchez

  • component changed from Framework to Database adapter

Changed 19 months ago by alex94040

Can somene who uses Postgre code-review and test this, please?

Changed 18 months ago by alex94040

  • summary changed from QPostgreSqlDatabase.class.php improvements to Postgre Adapter: better handling of timestamps

I've looked for a person with Postgre for a while to test this, but lo and behold, we can't find one. Well, that's fine. I've looked at the code, it seems clean; the amount of changes is small, so I suggest we check this in and allow the community to chip in if there are issues.

Changed 18 months ago by basilieus

- current_schemas: If you have two postgresql databases you are using and they both share a table name I think the ANY(current_schemas(false)) will return all of the indexes from both tables. I think this is why the current_schema() was used. I will test on my box at home. It has postgresql.

- Interval type: looks fine

- Timestamp looks fine, is varchar the best way to handle it?

Changed 18 months ago by VexedPanda

  • milestone changed from 1.0.0 RC2 to 1.1.0

Split into #171 for timestamp issues to be resolved in RC1 and this ticket for remaining issues.

Changed 18 months ago by VexedPanda

  • description modified (diff)

Changed 12 months ago by alex94040

We need someone with Postgre experience to test this. That someone is not me :-).

Changed 12 months ago by tompalan

I would be able to test postgres-patches. I think there is something wrong with the patch in ticket:171, as I had to revert it to get the postgres-adapter running correctly. Feel free to contact me about any postgres-stuff.

Tom

Changed 12 months ago by bithead

This patch is ok, but incomplete. As an extension of this, the QApplicationBase::InitializeDatabaseConnections?()

$objConfigArray would have to be extended with a parameter for "Schema". This parameter would be passed down to QDatabaseBase and then to QPostgreSqlDatabase, where Query("SET search_path TO $objschema" ) would be issued after pg_connect.

Issues:
No other database connectors support the concept of schemas fully. This parameter is only valid for QPostgreSql.

Patch file for QApplicationBase.class.php, QDatabaseBase.class.php and QPostgreSqlDatabase.class.php with cumulative support patch for schemas will be attached.

Changed 12 months ago by bithead

Additions to QPostgreSqlDatabase, QDatabaseBase, QApplicationBase

Changed 11 months ago by bithead

bug fix patch to QPostgresqlDatabase.class.php

Changed 10 months ago by alex94040

We need someone with Postgre to review this. Anyone?

Changed 9 months ago by alex94040

  • milestone changed from 1.1 to 1.2

Changed 6 months ago by alex94040

  • milestone changed from 1.2 to 1.1.2

Changed 4 weeks ago by alex94040

  • milestone changed from 1.1.2 to 1.1.3
Note: See TracTickets for help on using tickets.