Re: javascript and postgres

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: javascript and postgres
Дата
Msg-id 49A3999C.5060102@postnewspapers.com.au
обсуждение исходный текст
Ответ на javascript and postgres  (野村 <nomura@ir-alt.co.jp>)
Ответы Re: javascript and postgres  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
野村 wrote:
> Hello all.
>
> My javascript connects with postgres using php.
> php responds with XML for my select request.
> I wonder is there any way to access to postgres directly?

Nothing stops you passing SQL snippets from JavaScript into your PHP
code, which then dispatches then to the server and returns the results.

This is a really, really, REALLY bad idea. It allows anybody with the
ability to access your XML-RPC interface for PHP (say via XMLHttpRequest
in their browser) to send whatever SQL code they want to your server.

Do not do this unless you would also be comfortable opening the
PostgreSQL server port for direct Internet access and publishing the
username and password to use on your website. That's effectively what
you would be doing.

--
Craig Ringer

В списке pgsql-general по дате отправления:

Предыдущее
От: Jordan Tomkinson
Дата:
Сообщение: Re: High cpu usage after many inserts
Следующее
От: John R Pierce
Дата:
Сообщение: Re: javascript and postgres