plpgsql & string building - Mailing list pgsql-admin

From Wells Oliver
Subject plpgsql & string building
Date
Msg-id CAOC+FBWLJzmzdvpqC9=xjn=z32t_miSu7ycNrOYyXSgvbjCjcA@mail.gmail.com
Whole thread Raw
Responses Re: plpgsql & string building  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
This is probably obvious, but I have this in a plpgsql function, where GROUPINGS is a text[]:

SQLSTR := 'SELECT foo,'|| 'bar' = any(GROUPINGS) || ', col2, col3...';

I end up with SQLSTR containin the literal any() statement: SELECT foo, '|| 'bar' = any(GROUPINGS) || ', col2, col3

vs it being coming out like SELECT foo, t, col2, col3.

What am I missing here?

--

pgsql-admin by date:

Previous
From: Murali Paramu
Date:
Subject: Run 9.4 & 12 version of PostgreSQL on same PC
Next
From: "David G. Johnston"
Date:
Subject: Re: plpgsql & string building