Send multiple statements to pg server at once

Поиск
Список
Период
Сортировка
От Andy Fan
Тема Send multiple statements to pg server at once
Дата
Msg-id 87pliof2uc.fsf@163.com
обсуждение исходный текст
Ответы Re: Send multiple statements to pg server at once
Список pgsql-hackers

Hi,

I want to simulate a case where server receive "SELECT 1;SELECT 2;" at
once, so when executing exec_simple_query, the query_string is
"SELECT 1;SELECT 2;"  However I found it is not easy to simulate, does
anyone has a suggestion?

I tried 'psql -f', checking 'psql/settings.h', at last I see below code
in psql/mainloop.c, I guess it is impossible in psql.


    /*
     * Send command if semicolon found, or if end of line and we're in
     * single-line mode.
     */
    if (scan_result == PSCAN_SEMICOLON ||
        (scan_result == PSCAN_EOL && pset.singleline))
    {


-- 
Best Regards
Andy Fan




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