Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/4/11 Bruce Momjian <bruce@momjian.us>:
>> I remember adding the TODO after a request from the user, but I have not
>> seen further requests. I have remove the item; let's see if we get any
>> further requests for it.
> I thing so this TODO point is little bit step in bad direction.
I agree with Pavel that the originally suggested use-case seems like
a poor man's substitute for a missing database facility. But Abhijit's
question about parameters reminds me that there is a use-case from the
point of view of client-side libraries. You might wish to do something
like (pseudo-code here)
execute('COMMENT ON foo IS $1', some_string);
and let the out-of-line-parameter mechanism take care of quoting and
escaping your string. This doesn't work today, and I remember having
seen complaints about that on the JDBC list. So there's a use-case at
least for allowing parameter symbols in place of string literals, if not
fully general expressions. But again, I think we'd want such a thing
across all utility statements that can take string literals, not only
COMMENT.
regards, tom lane