Re: Dynamically filtering a CTE? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Dynamically filtering a CTE?
Date
Msg-id CAKFQuwY36yat8Ycf_Ha6z25sZnNYMH9rHmTsG3QfkDZt1zX2XA@mail.gmail.com
Whole thread Raw
In response to Dynamically filtering a CTE?  ("W. Trevor King" <wking@tremily.us>)
Responses Re: Dynamically filtering a CTE?
List pgsql-general
On Thursday, April 19, 2018, W. Trevor King <wking@tremily.us> wrote:
  Is there
an idiomatic way to approach this problem?


I would use pl/pgsql as the language and build a query using a combination of text literals and the format() function - invoking via pl/pgsql's EXECUTE command.

David J.

pgsql-general by date:

Previous
From: "W. Trevor King"
Date:
Subject: Dynamically filtering a CTE?
Next
From: PegoraroF10
Date:
Subject: Re: Problem with trigger makes Detail record be invalid