Re: Help with optional parameters - Mailing list pgsql-sql

From MaXX
Subject Re: Help with optional parameters
Date
Msg-id eev4rk$2l3h$1@talisker.lacave.net
Whole thread Raw
In response to Re: Help with optional parameters  (Curtis Scheer <Curtis@DAYCOS.com>)
List pgsql-sql
Curtis Scheer wrote:> I noticed this one by searching in the archives, as I am working with 
some> "optional" parameters myself and noticed your solution. I just wanted to> make one improvement suggestion which
isinstead of checking whether 
 
or not> a parameter has been used simply start your query like so> Query_base := 'SELECT * FROM my_table WHERE 1 =1;>
Ifyou do that then you can just add on any parameters you need or 
 
not add> any at all. I think that seems to be a bit simpler than having a 
has_param"> Boolean variable.
True, I think I was too focused on the "clean" output, your solution 
wastes less cycles and is more readable...

Snipet updated,

Thanks,
--
MaXX


pgsql-sql by date:

Previous
From: Curtis Scheer
Date:
Subject: Re: Help with optional parameters
Next
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Group by minute