Re: Need feedback on new feature (\for)
От | Tom Lane |
---|---|
Тема | Re: Need feedback on new feature (\for) |
Дата | |
Msg-id | 14331.1061165286@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Need feedback on new feature (\for) (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-general |
Martijn van Oosterhout <kleptog@svana.org> writes: > Yes, I see that but it also limits what you could do. For example: > \for > select oid from <some funky query here> > \do > drop constraint "RI_ConstraintTrigger_:1" > \done > .. Incidently, the above > case could be handled by performing the concatintation in the query. Yes. I'd argue that that's a much cleaner approach. I really dislike the notion of doing substitutions inside quoted strings. (You'll notice that psql does not do that now for :name variables --- I think that these substitutions should follow the exact same rules.) In general, you can do any sort of calculation on the strings with ease in the control query, while the substituter in psql will necessarily be pretty stupid. So I think it makes much more sense to push the complexity into the control query and keep the substitution rules non-surprising. regards, tom lane
В списке pgsql-general по дате отправления: