Home » RADICORE » How To » Check for empty $schema in dml.psql.class.inc
Check for empty $schema in dml.psql.class.inc [message #7250] |
Wed, 06 February 2019 12:42  |
pdv
Messages: 15 Registered: January 2019
|
Junior Member |
|
|
Hi,
I'm new and trying to access some existing PostgreSQL databases with Radicore and on macos. Sofar I met a few problems which I could only solve by changing the code. I'll describe them in separate messages.
The first problem is similar to the one reported in the thread "SQLSRV Driver", message #4722. I could only connect to the database when hard coding the dbname (which is the postgresql schema).
The problem is in the following code in dml.pgsql.class.inc:
if (!empty($this->dbname) AND !empty($schema)) {
$result = $this->connect($schema) or trigger_error($this, E_USER_ERROR);
} else {
trigger_error('No value supplied for PGSQL_dbname', E_USER_ERROR);
} // if
This code fails because $schema is empty, e.g. when querying for the list of databases. $this->dbname refers here to the PGSQL_dbname. I removed the check on $schema.
The error message is also misleading in this case since PGSQL_dbname was not empty.
Regards,
Patrick
|
|
|
 |
|
Check for empty $schema in dml.psql.class.inc
By: pdv on Wed, 06 February 2019 12:42
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Thu, 07 February 2019 04:49
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: pdv on Thu, 07 February 2019 07:15
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Fri, 08 February 2019 05:11
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: pdv on Sun, 10 February 2019 11:16
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Mon, 11 February 2019 04:43
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: pdv on Tue, 12 February 2019 04:44
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Wed, 13 February 2019 04:19
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: pdv on Wed, 13 February 2019 04:44
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Thu, 21 February 2019 18:30
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: pdv on Mon, 25 February 2019 15:21
|
 |
|
Re: Check for empty $schema in dml.psql.class.inc
By: AJM on Tue, 26 February 2019 04:39
|
Goto Forum:
Current Time: Sat Jun 21 04:43:19 EDT 2025
Total time taken to generate the page: 0.01231 seconds
|