Re: Protection from SQL injection

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Protection from SQL injection
Дата
Msg-id
20390.1209576499@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Protection from SQL injection Chris Browne <cbbrowne@acm.org>
Re: Protection from SQL injection Andrew Dunstan <andrew@dunslane.net>
"Gurjeet Singh"  writes:
> Maybe we can extend the SQL's WITH clause do declare the constant along with
> the query, and not separate from the query.

> WITH CONSTANT c_jobrole = 'clerk', CONSTANT c_dept = 10
> SELECT * FROM emp WHERE jobrole = c_jobrole and deptno = c_dept;

[ scratches head... ]  And that will provide SQL injection protection how?

Anyway, you hardly need new syntax to do that, I'd expect
WITH SELECT 'clerk' AS c_jobrole ...

to accomplish it just fine.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Gurjeet Singh
Дата:
От: Gurjeet Singh
Дата:
FAQ