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

From Tom Lane
Subject Re: Use of '&' as table prefix in query
Date
Msg-id 2985165.1626111400@sss.pgh.pa.us
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
Rich Shepard <rshepard@appl-ecosys.com> writes:
> Long ago I wrote a query which was greatly improved (i.e., it actually
> worked as intended) by help here):

> SELECT ...
> WHERE p.lname = &p.lname AND p.fname = &p.fname;

> I did not save the reason why the ampersand is used in the WHERE row selection
> phrase and want now to learn why it's there. Probably needed to concatenate
> separate names?

AFAICS this is invoking a prefix operator named "&".  There is no such
operator built into Postgres.  Maybe psql's "\do+ &" would jog your
memory about where yours came from.

            regards, tom lane



pgsql-general by date:

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