mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Avoid maintaining three separate copies of the error codes list.
src/pl/plpgsql/src/plerrcodes.h, src/include/utils/errcodes.h, and a big chunk of errcodes.sgml are now automatically generated from a single file, src/backend/utils/errcodes.txt. Jan Urbański, reviewed by Tom Lane.
This commit is contained in:
@ -273,6 +273,19 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
|
||||
);
|
||||
}
|
||||
|
||||
if (IsNewer('src\include\utils\errcodes.h','src\backend\utils\errcodes.txt'))
|
||||
{
|
||||
print "Generating errcodes.h...\n";
|
||||
system("perl src\backend\utils\generate-errcodes.pl src\backend\utils\errcodes.txt > src\backend\utils\errcodes.h");
|
||||
copyFile('src\backend\utils\errcodes.h','src\include\utils\errcodes.h');
|
||||
}
|
||||
|
||||
if (IsNewer('src\pl\plpgsql\src\plerrcodes.h','src\backend\utils\errcodes.txt'))
|
||||
{
|
||||
print "Generating plerrcodes.h...\n";
|
||||
system("perl src\pl\plpgsql\src\generate-plerrcodes.pl src\backend\utils\errcodes.txt > src\pl\plpgsql\src\plerrcodes.h");
|
||||
}
|
||||
|
||||
if (IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
|
||||
{
|
||||
print "Generating libpq.rc...\n";
|
||||
|
Reference in New Issue
Block a user