Re: Using placeholders when creating a materialized view - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Using placeholders when creating a materialized view
Date
Msg-id f97a83c0-a037-5cb8-1e15-4926bedba30d@aklaver.com
Whole thread Raw
In response to Using placeholders when creating a materialized view  (Mitar <mmitar@gmail.com>)
List pgsql-general
On 12/29/18 12:07 AM, Mitar wrote:
> Hi!
> 
> Is it possible to use placeholders and provide values to the query
> when creating a materialized view? It looks like direct passing of
> values to the query is not possible and I have to encode them?

The only way I could see to do that is using dynamic SQL in a function:

https://www.postgresql.org/docs/11/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

Or use something like pl/pythonu.


> 
> 
> Mitar
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: getting pg_basebackup to use remote destination
Next
From: Adrian Klaver
Date:
Subject: Re: In which session context is a trigger run?