Re: SQL questiom - Mailing list pgsql-general

From Thomas Boussekey
Subject Re: SQL questiom
Date
Msg-id CALUeYmdPS=sYsC+1=wYn2rv_+LymSP3wW0d8YLFMzL21B_ED8w@mail.gmail.com
Whole thread Raw
In response to SQL questiom  (hamann.w@t-online.de)
List pgsql-general


Le ven. 21 janv. 2022 à 11:14, <hamann.w@t-online.de> a écrit :


Hi,

I am using a query pretty often that looks like
SELECT <<fixed columns from tables>> WHERE <<fixed join statements>> AND
<<actual select criterion>>

Is there a way (with sql or plpgsql)  to convert that into
SELECT myquery('<<actual select criterion>>')

Kind regards
Wolfgang Hamann



Hello Wolfgang,

You can use a FUNCTION to perform this operation

HTH,
Thomas

pgsql-general by date:

Previous
From: hamann.w@t-online.de
Date:
Subject: SQL questiom
Next
From: Shaozhong SHI
Date:
Subject: PgAdmin is struggling and can we configure it so that it works better