Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5 - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5
Date
Msg-id CAKFQuwb5664o3CpEtUo9Tn-cQCuH07kFm6VpyACmmjxC+_pOiQ@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5  (Patrick B <patrickbakerbr@gmail.com>)
List pgsql-general
On Wednesday, December 14, 2016, Patrick B <patrickbakerbr@gmail.com> wrote:

         ' || date_start || '
      AND
          ' || date_end || '
  Results in this
      BETWEEN
        2016-12-15
      AND
          20160901
Compared to this 

         '2016-12-15'

      AND

          '20160901'


Your query has single quotes surrounding the values in the between.  In the the error output they don't.  You need to modify the dynamic SQL so that they do.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5
Next
From: Lucas Possamai
Date:
Subject: Re: [GENERAL] Plpgsql - Custom fields Postgres 9.5