mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
PL/Python custom SPI exceptions
This provides a separate exception class for each error code that the backend defines, as well as the ability to get the SQLSTATE from the exception object. Jan Urbański, reviewed by Steve Singer
This commit is contained in:
@ -273,6 +273,12 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
|
||||
);
|
||||
}
|
||||
|
||||
if ($self->{options}->{python} && IsNewer('src\pl\plpython\spiexceptions.h','src\include\backend\errcodes.txt'))
|
||||
{
|
||||
print "Generating spiexceptions.h...\n";
|
||||
system('perl src\pl\plpython\generate-spiexceptions.pl src\backend\utils\errcodes.txt > src\pl\plpython\spiexceptions.h');
|
||||
}
|
||||
|
||||
if (IsNewer('src\include\utils\errcodes.h','src\backend\utils\errcodes.txt'))
|
||||
{
|
||||
print "Generating errcodes.h...\n";
|
||||
|
Reference in New Issue
Block a user