[COMMITTERS] pgsql: Simplify some long-obsolete code in hba.c's next_token().
Simplify some long-obsolete code in hba.c's next_token(). next_token() oddly set its buffer space consumption limit to one before the last char position in the buffer, not the last as you'd expect. The reason is there was once an ugly kluge to mark keywords by appending a newline to them, potentially requiring one more byte. Commit e5e2fc842 removed that kluge, but failed to notice that the length limit could be increased. Also, remove some vestigial handling of newline characters in the buffer. That was left over from when this function read the file directly using getc(). Commit 7f49a67f9 changed it to read from a buffer, from which tokenize_file had already removed the only possible occurrence of newline, but did not simplify this function in consequence. Also, ensure that we don't return with *lineptr set to someplace past the terminating '\0'; that would be catastrophic if a caller were to ask for another token from the same line. This is just latent since no callers actually do call again after a "false" return; but considering that it was actually costing us extra code to do it wrong, we might as well make it bulletproof. Noted while reviewing pg_hba_file_rules patch. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/1e5a5d03da14ba9b734c6a2a1a822dcd8af110eb Modified Files -- src/backend/libpq/hba.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Invent pg_hba_file_rules view to show the content of pg_hba.conf
Invent pg_hba_file_rules view to show the content of pg_hba.conf. This view is designed along the same lines as pg_file_settings, to wit it shows what is currently in the file, not what the postmaster has loaded as the active settings. That allows it to be used to pre-vet edits before issuing SIGHUP. As with the earlier view, go out of our way to allow errors in the file to be reflected in the view, to assist that use-case. (We might at some point invent a view to show the current active settings, but this is not that patch; and it's not trivial to do.) Haribabu Kommi, reviewed by Ashutosh Bapat, Michael Paquier, Simon Riggs, and myself Discussion: https://postgr.es/m/cajrrpgerh4jiwpcxt1-46qxudmnp2qdrg9+-tek_xc8aphs...@mail.gmail.com Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/de16ab723b16825ad13f0bbe123632915e9b Modified Files -- doc/src/sgml/catalogs.sgml | 113 + doc/src/sgml/client-auth.sgml | 18 + src/backend/catalog/system_views.sql | 6 + src/backend/libpq/hba.c| 824 - src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_proc.h | 2 + src/include/libpq/hba.h| 9 +- src/test/regress/expected/rules.out| 10 + src/test/regress/expected/sysviews.out | 7 + src/test/regress/sql/sysviews.sql | 3 + 10 files changed, 873 insertions(+), 121 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Add a regression test script dedicated to exercising system view
Add a regression test script dedicated to exercising system views. Quite a few of our built-in system views were not exercised anywhere in the regression tests. This is perhaps not so exciting for the ones that are simple projections/joins of system catalogs, but for the ones that are wrappers for set-returning C functions, the omission translates directly to lack of test coverage for those functions. In many cases, the reason for the omission is that the view doesn't have much to do with any specific SQL feature, so there's no natural place to test it. To remedy that, invent a new script sysviews.sql that's dedicated to testing SRF-based views. Move a couple of tests that did fit this charter into the new script, and add simple "count(*)" based tests of other views within the charter. That's enough to ensure we at least exercise the main code path through the SRF, although it does little to prove that the output is sane. More could be done here, no doubt, and I hope someone will think about how we can test these views more thoroughly. But this is a starting point. Discussion: https://postgr.es/m/19359.1485723...@sss.pgh.pa.us Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d002f16c6ec38f76d1ee97367ba6af3000d441d0 Modified Files -- src/test/regress/expected/rangefuncs.out | 16 - src/test/regress/expected/sysviews.out| 113 ++ src/test/regress/expected/timestamptz.out | 35 - src/test/regress/parallel_schedule| 2 +- src/test/regress/serial_schedule | 1 + src/test/regress/sql/rangefuncs.sql | 2 - src/test/regress/sql/sysviews.sql | 48 + src/test/regress/sql/timestamptz.sql | 16 - 8 files changed, 163 insertions(+), 70 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Make psql reject attempts to set special variables to invalid va
Make psql reject attempts to set special variables to invalid values. Previously, if the user set a special variable such as ECHO to an unrecognized value, psql would bleat but store the new value anyway, and then fall back to a default setting for the behavior controlled by the variable. This was agreed to be a not particularly good idea. With this patch, invalid values result in an error message and no change in state. (But this applies only to variables that affect psql's behavior; purely informational variables such as ENCODING can still be set to random values.) To do this, modify the API for psql's assign-hook functions so that they can return an OK/not OK result, and give them the responsibility for printing error messages when they reject a value. Adjust the APIs for ParseVariableBool and ParseVariableNum to support the new behavior conveniently. In passing, document the variable VERSION, which had somehow escaped that. And improve the quite-inadequate commenting in psql/variables.c. Daniel Vérité, reviewed by Rahila Syed, some further tweaking by me Discussion: https://postgr.es/m/7356e741-fa59-4146-a8eb-cf95fd6b21fb@mm Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/511ae628f31b4e791cd5c7836e46cb84dcf145fd Modified Files -- doc/src/sgml/ref/psql-ref.sgml | 33 -- src/bin/psql/command.c | 82 +++-- src/bin/psql/common.c | 1 - src/bin/psql/input.c | 2 +- src/bin/psql/mainloop.c| 2 +- src/bin/psql/startup.c | 121 src/bin/psql/variables.c | 228 ++--- src/bin/psql/variables.h | 50 +--- src/test/regress/expected/psql.out | 11 +- src/test/regress/sql/psql.sql | 8 ++ 10 files changed, 356 insertions(+), 182 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Fix sequence test in cs_CZ locale
Fix sequence test in cs_CZ locale Rename some objects so that sorted output becomes less locale-dependent. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/46aae5949f56580281a0f487c785c745d8856a04 Modified Files -- src/test/regress/expected/sequence.out | 24 src/test/regress/sql/sequence.sql | 20 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > This will be undone by the next perltidy run. > > Ugh. > > I certainly hope what was there before wasn't the result of a perltidy > run as it was quite ugly and inconsistent.. Maybe it was. I checked the diff after running perltidy after your commit and there are some changes that look like a reversion of your changes, but I don't know if there are other changes. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Additional test coverage for sequences
Additional test coverage for sequences Reviewed-by: Michael Paquier Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d711532b2eb70cf2f56d95efcc608d474266d769 Modified Files -- src/test/regress/expected/sequence.out | 253 + src/test/regress/sql/sequence.sql | 106 -- 2 files changed, 319 insertions(+), 40 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Stephen Frost wrote: > > test_pg_dump TAP test whitespace cleanup > > > > The formatting of the perl hashes used in the TAP tests for test_pg_dump > > was rather horribly inconsistent and made it more difficult than it > > really should have been to add new tests or adjust what tests are for > > what runs, etc. > > > > Reformat to clean that all up. > > > > Whitespace-only changes. > > This will be undone by the next perltidy run. Ugh. I certainly hope what was there before wasn't the result of a perltidy run as it was quite ugly and inconsistent.. Thanks! Stephen signature.asc Description: Digital signature
Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
Stephen Frost wrote: > test_pg_dump TAP test whitespace cleanup > > The formatting of the perl hashes used in the TAP tests for test_pg_dump > was rather horribly inconsistent and made it more difficult than it > really should have been to add new tests or adjust what tests are for > what runs, etc. > > Reformat to clean that all up. > > Whitespace-only changes. This will be undone by the next perltidy run. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/ef878cc2cda4e8b314e7eda02a8fd688d0afce66 Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/2b133be04bf68870263a3a649439b3ebcfe78256 Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/4c729f4718772d49230fd932322fd6bffa762e10 Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/6da67b684a605ed320b39fe974d631fe5682e8bc Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/a7b5de3ba726180022e0de9f968d6c5456e25b12 Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Update time zone data files to tzdata release 2016j.
Update time zone data files to tzdata release 2016j. DST law changes in northern Cyprus (new zone Asia/Famagusta), Russia (new zone Europe/Saratov), Tonga, Antarctica/Casey. Historical corrections for Asia/Aqtau, Asia/Atyrau, Asia/Gaza, Asia/Hebron, Italy, Malta. Replace invented zone abbreviation "TOT" for Tonga with numeric UTC offset; but as in the past, we'll keep accepting "TOT" for input. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/308d8682740391cf6e94fdbadcdbbecfa02ea208 Modified Files -- src/timezone/data/africa | 2 +- src/timezone/data/antarctica | 7 +- src/timezone/data/asia | 112 +++-- src/timezone/data/australasia| 18 - src/timezone/data/europe | 171 +++ src/timezone/known_abbrevs.txt | 2 +- src/timezone/tznames/Default | 3 +- src/timezone/tznames/Pacific.txt | 3 +- 8 files changed, 196 insertions(+), 122 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
Re: [COMMITTERS] pgsql: Simplify tape block format.
On 12/26/2016 11:52 PM, Peter Geoghegan wrote: On Thu, Dec 22, 2016 at 8:45 AM, Heikki Linnakangas wrote: Simplify tape block format. No more indirect blocks. The blocks form a linked list instead. There is still one remaining reference to indirect blocks that you missed in comments above LogicalTapeRewindForWrite(). Thanks, fixed! - Heikki -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
[COMMITTERS] pgsql: Remove leftover reference to "indirect blocks" in comment.
Remove leftover reference to "indirect blocks" in comment. Peter Geoghegan Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/dbeca61c3535af2613000c4492848ca6da8a902f Modified Files -- src/backend/utils/sort/logtape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers