Re: Postgres 12.4 inner join with where statement = 'string' returning error

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: VAE Ventures <vaeventures(at)outlook(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres 12.4 inner join with where statement = 'string' returning error
Date: 2021-01-04 03:13:06
Message-ID: CAKFQuwYRcYBL_Wb84o8ZCMvcU0-O2etmH2MEDijqcYU5z=ZUQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, Jan 3, 2021 at 6:33 PM VAE Ventures <vaeventures(at)outlook(dot)com> wrote:

> SELECT * FROM table_1 INNER JOIN table_2 ON table_1.column =
> table_2.column WHERE table_1.column = ‘string’;
> ERROR: column 'string' does not exist
>

The only way you will get "column 'string' does not exist" is if you wrote
the word -string- surrounded by double-quotes so that it is interpreted as
an object identifier instead of a literal value. Assuming corresponding
tables and columns exist, the query you show would not return that error.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Li EF Zhang 2021-01-04 10:17:11 RE: recovery snapshot waiting for non-overflowed snapshot or until oldest active xid on standby is at least 4739126 (now 1422751)
Previous Message Ron 2021-01-04 02:45:08 Re: Postgres 12.4 inner join with where statement = 'string' returning error