Re: postgresMain() function

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: postgresMain() function
Дата
Msg-id 00ea01ce7b89$462ea0c0$d28be240$@kapila@huawei.com
обсуждение исходный текст
Ответ на postgresMain() function  (mohsen soodkhah mohammadi <mohsensoodkhah@gmail.com>)
Список pgsql-hackers
On Sunday, July 07, 2013 3:46 PM mohsen soodkhah mohammadi wrote:

> hello .
> In Postgres.c we have a switch for firstchar .  one of case of them is :
case 'Q' that is for simple queries.
> I want to know the other cases were for what operations .
> and:
> is the case with  'Q' parameter for DDL and DML commands?

SQL Commands can be executed using 2 sub-protocols, 'simple query' ,
'extended query'

In 'simple query' protocol, the frontend just sends a textual query string,
which is parsed and immediately executed by the backend.
In 'extended query' protocol, processing of queries is separated into
multiple steps: parsing, binding of parameter values, and execution.

'Q' message is used for 'simple query'. It can be used for any SQL command
'P', 'B', 'E' are most important messages for 'extended query', these are
used for prepared statements.

You can read the below link for detailed message flow description:
http://www.postgresql.org/docs/devel/static/protocol.html

With Regards,
Amit Kapila.




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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]
Следующее
От: Hari Babu
Дата:
Сообщение: Re: WAL