Re: Use of '&' as table prefix in query - Mailing list pgsql-general

From Rob Sargent
Subject Re: Use of '&' as table prefix in query
Date
Msg-id 2dbe6c30-8b16-6b0f-1d93-026ee71b6eae@gmail.com
Whole thread Raw
In response to Use of '&' as table prefix in query  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Use of '&' as table prefix in query  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
On 7/12/21 11:25 AM, Rich Shepard wrote:
> Long ago I wrote a query which was greatly improved (i.e., it actually
> worked as intended) by help here):
>
> /* This query selects all activity information for a named person */
>
> SELECT p.lname, p.fname, p.loc_nbr, p.job_title, p.direct_phone, 
> p.active,
>        o.org_name,
>        l.loc_nbr, l.loc_name,
>        a.act_date, a.act_type, a.notes, a.next_contact
> FROM People AS p
>      JOIN Organizations AS o ON o.org_nbr = p.org_nbr
>      JOIN Locations AS l ON l.org_nbr = o.org_nbr and l.loc_nbr = 
> p.loc_nbr
>      JOIN Activities AS a ON a.person_nbr = p.person_nbr
> WHERE p.lname = &p.lname AND p.fname = &p.fname;
>
These look like value substitutions, usually done on the client at it 
sends the sql.  How is this sql getting to the server (presumably after 
substitution).



pgsql-general by date:

Previous
From: Jurrie Overgoor
Date:
Subject: Re: How to debug a connection that's "active" but hanging?
Next
From: Rich Shepard
Date:
Subject: Re: Use of '&' as table prefix in query