Add SPI results constants available for PL/*

Поиск
Список
Период
Сортировка
От Samuel PHAN
Тема Add SPI results constants available for PL/*
Дата
Msg-id CAC4O=ams2wGNDVujA6_2OAGOQ=ay-ZMyfcEB0gbAnHutKdWyWg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add SPI results constants available for PL/*  (Christopher Browne <cbbrowne@gmail.com>)
Список pgsql-hackers
I'm using PL/Python, and when getting the result object from a plpy.execute(), I can access to the result.status().

E.g.: the result.status() is 4. But to know what 4 corresponds to, I must open the "spi.h" file from the sources to see :

#define SPI_OK_CONNECT 1
#define SPI_OK_FINISH 2
#define SPI_OK_FETCH 3
#define SPI_OK_UTILITY 4
#define SPI_OK_SELECT 5
#define SPI_OK_SELINTO 6
#define SPI_OK_INSERT 7
#define SPI_OK_DELETE 8
#define SPI_OK_UPDATE 9
#define SPI_OK_CURSOR 10
#define SPI_OK_INSERT_RETURNING 11
#define SPI_OK_DELETE_RETURNING 12
#define SPI_OK_UPDATE_RETURNING 13
#define SPI_OK_REWRITTEN 14

Is there a way to have access to these constants from the PL/python code and other PL/* (Tcl, Perl, etc.) ?

Thanks,

--
Samuel PHAN

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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: review: CHECK FUNCTION statement
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Review of VS 2010 support patches