Re: New user questions

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, psycopg(at)postgresql(dot)org
Subject: Re: New user questions
Date: 2021-07-14 18:01:56
Message-ID: 5ac3e912-13e7-ced4-9925-be649c240d1b@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 7/14/21 10:57 AM, Adrian Klaver wrote:
> On 7/14/21 10:35 AM, Rich Shepard wrote:

> This will not work, if for no other reason that 'companies as c on
> c.org_nbr = p.org_nbr', etc are not identifiers and it is sql.Identifier.
>
> Also it would be simpler for this case just to create a quoted
> statement, something like:
> """SELECT
>    fld_1, fld_2, fld_3
> FROM
>    some_table AS st
> JOIN
>    another_table AS a
> ON
>     st.id = a.a_id
> WHERE
>     st.fld_1 = 'something'
> """

That should have been:

st.fld_1 = %s

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse psycopg by date

  From Date Subject
Next Message David Raymond 2021-07-14 19:09:04 RE: New user questions
Previous Message Adrian Klaver 2021-07-14 17:57:47 Re: New user questions