enhance SPI to support EXECUTE commands

From: Quan Zongliang <zongliang(dot)quan(at)postgresdata(dot)com>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: enhance SPI to support EXECUTE commands
Date: 2019-09-05 06:39:00
Message-ID: ff04301f-4e98-2320-2285-60ed0b1b1233@postgresdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear hackers,

I found that such a statement would get 0 in PL/pgSQL.

PREPARE smt_del(int) AS DELETE FROM t1;
EXECUTE 'EXECUTE smt_del(100)';
GET DIAGNOSTICS j = ROW_COUNT;

In fact, this is a problem with SPI, it does not support getting result
of the EXECUTE command. I made a little enhancement. Support for the
number of rows processed when executing INSERT/UPDATE/DELETE statements
dynamically.

Regards,
Quan Zongliang

Attachment Content-Type Size
spi_execmd.patch text/plain 947 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-09-05 06:52:48 Re: refactoring - share str2*int64 functions
Previous Message Peter Eisentraut 2019-09-05 06:38:36 Re: using explicit_bzero