forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#294504 from wolfgangwalther/postgresql-outputs
postgresql: split -lib and -dev outputs cleanly
- Loading branch information
Showing
9 changed files
with
232 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
pkgs/servers/sql/postgresql/patches/empty-pg-config-view-15+.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Empty the pg_config system information view. This view keeps references to | ||
several -dev outputs, which we want to avoid to keep closure size down. | ||
|
||
The alternative to this patch would be to nuke references across the board, | ||
but this will also affect the output of the pg_config utility. By emptying | ||
the view only, we keep the pg_config binary intact. It resides in the -dev | ||
output, so it's fine to have all those references there. | ||
|
||
--- | ||
--- a/src/backend/utils/misc/pg_config.c | ||
+++ b/src/backend/utils/misc/pg_config.c | ||
@@ -32,20 +32,5 @@ pg_config(PG_FUNCTION_ARGS) | ||
/* initialize our tuplestore */ | ||
InitMaterializedSRF(fcinfo, 0); | ||
|
||
- configdata = get_configdata(my_exec_path, &configdata_len); | ||
- for (i = 0; i < configdata_len; i++) | ||
- { | ||
- Datum values[2]; | ||
- bool nulls[2]; | ||
- | ||
- memset(values, 0, sizeof(values)); | ||
- memset(nulls, 0, sizeof(nulls)); | ||
- | ||
- values[0] = CStringGetTextDatum(configdata[i].name); | ||
- values[1] = CStringGetTextDatum(configdata[i].setting); | ||
- | ||
- tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls); | ||
- } | ||
- | ||
return (Datum) 0; | ||
} | ||
--- a/src/test/regress/expected/sysviews.out | ||
+++ b/src/test/regress/expected/sysviews.out | ||
@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes | ||
(1 row) | ||
|
||
-- At introduction, pg_config had 23 entries; it may grow | ||
-select count(*) > 20 as ok from pg_config; | ||
+select count(*) = 0 as ok from pg_config; | ||
ok | ||
---- | ||
t | ||
--- a/src/test/regress/sql/sysviews.sql | ||
+++ b/src/test/regress/sql/sysviews.sql | ||
@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes | ||
from pg_backend_memory_contexts where level = 0; | ||
|
||
-- At introduction, pg_config had 23 entries; it may grow | ||
-select count(*) > 20 as ok from pg_config; | ||
+select count(*) = 0 as ok from pg_config; | ||
|
||
-- We expect no cursors in this test; see also portals.sql | ||
select count(*) = 0 as ok from pg_cursors; |
Oops, something went wrong.