Re: Displaying chat by punished users only to themselves (db fiddle attached)

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Displaying chat by punished users only to themselves (db fiddle attached)
Date: 2022-05-04 15:56:22
Message-ID: CAKFQuwZ5gvocEerjANkWP5eA3aE-23oBsZU+Sf5=_WbhoxV8Wg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 4, 2022 at 8:53 AM Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
wrote:

>
> JOIN cte
> WHERE c.gid = in_gid
> AND (c.uid = myself.uid OR NOT opponent.muted)
> ORDER BY c.CREATED ASC;
>
> ERROR: syntax error at or near "WHERE"
> LINE 67: WHERE c.gid = in_gid
> ^
>
> And if I remove the "JOIN cte" line, then the error is:
>
> ERROR: missing FROM-clause entry for table "cte"
> LINE 64: ...elf.uid IN (g.player1, g.player2) AND myself.uid = cte.uid)
>

Try "CROSS JOIN cte" - that variant doesn't require a join condition.

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2022-05-04 16:12:19 Re: Displaying chat by punished users only to themselves (db fiddle attached)
Previous Message Alexander Farber 2022-05-04 15:53:21 Re: Displaying chat by punished users only to themselves (db fiddle attached)