Re: pl/pgsql enabled by default
От | Tom Lane |
---|---|
Тема | Re: pl/pgsql enabled by default |
Дата | |
Msg-id | 2877.1115480320@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pl/pgsql enabled by default (Neil Conway <neilc@samurai.com>) |
Список | pgsql-hackers |
Neil Conway <neilc@samurai.com> writes: > Users can already define SQL functions by default, which certainly > provides "programmable features". I'm not quite sure what you mean by > "user exits." > I guess I'm missing how pl/pgsql is a fundamentally greater security risk. plpgsql has control structures (loops, IF); SQL functions don't. That makes for a fundamental difference in the power of the programming language ... at least according to CS theory as I was taught it. Now admittedly the "primitive statements" of SQL are a lot more powerful than the primitive statements usually considered in programming language theory, but I think there is still a pretty significant difference in capability. An example of why this could be interesting from a security standpoint is that, given access to pg_shadow, it'd be pretty trivial to write a plpgsql function that tries to break user passwords by brute force (just generate possible passwords, hash them, and look for a match). I don't see any way to do that in plain SQL, at least not without a pre-existing SRF to generate the trial passwords for you. regards, tom lane
В списке pgsql-hackers по дате отправления: