User tests: Successful: Unsuccessful:
Pull Request for Issue #24998 .
Method getTableColumns of JDatabaseDriverPostgresql class
CREATE TABLE test.customer (
id SERIAL,
name VARCHAR(100),
PRIMARY KEY(id)
)
WITH (oids = false);
$db = JFactory::getDBO();
$custfields=$db->getTableColumns('test.customer');
Array with fields of a table
Empty array
Added to param $table
For PostgreSQL may starting with a schema
Status | New | ⇒ | Pending |
Category | ⇒ | Postgresql Libraries |
Labels |
Added:
?
|
quite a greyzone it dependes on how you feel that, so up to the Production Lead
@HLeithner Do you think this PR is a bug fix for 3.9 or a new feature for 4.0? From my point of view it is a bug fix since it is not good practice to use the public schema for everything in PostgreSQL, as far as I know, like it has to be without this PR. But I might be wrong, so I'd like to know your opinion, and @alikon 's, too, because he is doing much with PostgreSQL.
@HLeithner Do you think this PR is a bug fix for 3.9 or a new feature for 4.0? From my point of view it is a bug fix since it is not good practice to use the public schema for everything in PostgreSQL, as far as I know, like it has to be without this PR. But I might be wrong, so I'd like to know your opinion, and @alikon 's, too, because he is doing much with PostgreSQL.
It's a bugfix.
to me too it's a bugfix
@pviolette-fr please test > https://docs.joomla.org/Testing_Joomla!_patches
@HLeithner Do you think this PR is a bug fix for 3.9 or a new feature for 4.0? From my point of view it is a bug fix since it is not good practice to use the public schema for everything in PostgreSQL, as far as I know, like it has to be without this PR. But I might be wrong, so I'd like to know your opinion, and @alikon 's, too, because he is doing much with PostgreSQL.
My PR isn't only bug-fix. It's a feature request for a future version of Joomla.
Best practice for PostgresSQL is using different schemas for logical subsystems into a database.
Proof - https://www.postgresql.org/docs/10/ddl-schemas.html#DDL-SCHEMAS-PATTERNS
Simple RDBS (not supported schemas, such as MySQL) use surrogate solving with a prefix for tables.
When I write a new component for Joomla with PostgreSQL, I wont to use for this separate schema.
In another side, in big and complex system Joomla could use schema. called other than "public". But Joomla can't do it.
Third, with good schemas supporting Joomla could switching between schemas just different databases.
I'm not sure what you mean with "Simple RDBS (not supported schemas, such as MySQL)" is the schema support of MySQL different then the support form PostgresSQL?
I'm not sure what you mean with "Simple RDBS (not supported schemas, such as MySQL)" is the schema support of MySQL different then the support form PostgresSQL?
Using the term 'schema' completely different in other systems.
In MySQL and Firebird command CREATE SCHEMA is a synonym for CREATE DATABASE -
In more powerful RDBMS (Oracle, SQL Server, PostgreSQL ) a schema is essentially a namespace.
Proofs:
I'm not sure what you mean with "Simple RDBS (not supported schemas, such as MySQL)" is the schema support of MySQL different then the support form PostgresSQL?
Using the term 'schema' completely different in other systems.
In MySQL and Firebird command CREATE SCHEMA is a synonym for CREATE DATABASE -
ok thx, anyway in this case it's only a bugfix because it's should handle this and don't break.
I have tested this item
I have tested this item
@softarius I've changed the "Actual result" in your testing instructions to the value from the issue. I guess that was a copy and paste thing from "Expected result", so it was the same as that, and in the issue it was correct, right?
@HLeithner I can fully confirm @softarius 's explanations above.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
RTC
@alikon Have there ever been discussions in past about full db schema support in Joomla, i.e. you can specify a schema like you can specify user and database names when installing on PostgreSQL, so Joomla can be installed using a different schema than "Public"? If so, what was the result of these discussions?
For the one who will merge: Drone failure is not related to this PR.
@softarius I've changed the "Actual result" in your testing instructions to the value from the issue. I guess that was a copy and paste thing from "Expected result", so it was the same as that, and in the issue it was correct, right?
Yes.
Have there ever been discussions in past about full db schema support in Joomla
not that i'm aware of
I have tested this item
I have tested this item
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-06-05 15:47:09 |
Closed_By | ⇒ | HLeithner |
thx
@alikon Do you think this is a new feature for 4.0, or is it a bug fix for 3.9?