Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix statement for getTableWhereClause method #492

Merged
merged 1 commit into from
Jan 5, 2014

Commits on Jan 4, 2014

  1. Fix statement for getTableWhereClause method

    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.
    sinner committed Jan 4, 2014
    Configuration menu
    Copy the full SHA
    2b61c85 View commit details
    Browse the repository at this point in the history