• José Gabriel González Pérez's avatar
    Fix statement for getTableWhereClause method · 2b61c85f
    José Gabriel González Pérez authored
    If you have a role "postgres" in PostgreSQL that is described like this:
    ```
    -- Role: postgres
    CREATE ROLE postgres LOGIN
      ENCRYPTED PASSWORD 'md53175bce1d3201d16594cebf9d7eb3f9d'
      SUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION;
    ALTER ROLE postgres IN DATABASE sf_test
      SET search_path = "$user", public, access, geographic, rrhh;
    ```
    
    At the time when I execute the statement (Part of $schema value in the line 348):
    ```
    SELECT string_to_array((select replace(replace(setting,"$user",user),' ','') from pg_catalog.pg_settings where name = 'search_path'),',')
    ```
    I fetch this result:
    ```
    {public," access"," geographic"," rrhh"}
    ```
    Look the space character that is on the start of each string.This error does not match any namespace to which the role has access. This is critical when you have PostgreSQL database and you work with schemas.
    2b61c85f
Name
Last commit
Last update
bin Loading commit data...
docs Loading commit data...
lib Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
UPGRADE.md Loading commit data...
build.properties Loading commit data...
build.xml Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
phpunit.xml.dist Loading commit data...
run-all.sh Loading commit data...