Postern 0.2.0
Postern 0.2.0
- The Zed extension takes the grammar's 0.1.1 release, in which a single quote is an ordinary
character inpg_hba.confandpg_ident.conf, as it is to the server. The other packages
follow the grammar's main branch and have it already. - A line of
pg_hba.conforpg_ident.confthat ends with a backslash goes on with the next
one, the way the server has read it since 14, joined as it is, so the continuation works inside
a quoted token or a comment and an empty line ends the record. The record carries the number
of the line it starts on, aspg_hba_file_rulesreports it, and a problem on a later line is
marked there. A target older than 14 reads every line on its own. - A
pg_hba.confrule is checked as a whole the way hba.c checks it once its options are read:
gssapi on a local socket, peer anywhere else and cert without hostssl are errors, ldap must
choose between a simple bind and search+bind and take one of ldapsearchattribute and
ldapsearchfilter, radius needs its servers and secrets with lists that fit, and oauth needs an
issuer and a scope and no map next to delegate_ident_mapping, each in the server's words for
the target version. A comma in an option field starts another option, as it does for the
server, so a list meant as one value is quoted. ident on a local socket gets a hint that the
server reads it as peer. - A
pg_hba.confrule is read field by field the way hba.c reads it, so a line that ends too
soon, a list where one value belongs, a host name with a CIDR mask, a mask that does not fit
its address and a method the target version does not know are the server's errors in its
words, and a token meant as an address that the server would look up as a host name gets a
warning.scram-sha-256-plus, a SASL mechanism rather than a method, is no longer taken for
one. The include directives and regular expressions inpg_hba.confandpg_ident.confare
checked against the version, which took them in 16, oauth against 18, and includes are not
followed for an older target. Completion offers the methods the version has. - Postern follows
include,include_if_existsandinclude_dirthe way the server does,
relative to the file that names them, in C locale order for a directory, and reads
postgresql.auto.conffrom the data directory last, so a setting a later file overrides gets
a hint on the line that loses naming the file and line that win, and an include the server
could not open gets the errorpg_file_settingswould show. The hint for a setting repeated in
one file moved to the line that loses too. Hover says where the value that counts is set, go to
definition goes there, and an include line links to its file.pg_hba.confandpg_ident.conf
trees work the same way, so a rule an included file shadows and a map an included file defines
are seen. A file with another name is known by the root that includes it,postern check
walks the tree of a root it is given, and a live check reports a linepg_file_settingsleft
unapplied for a later entry. The resolver is compared withpg_file_settingson every
supported version in CI. - A file with another name is checked as what the editor calls it:
postgresql-conf,pg-hbaor
pg-ident. The editor packages claimpostgresql.base.conf, which Patroni keeps the original
file as, and a.conffile under aconf.ddirectory below apostgresqldirectory, which is
how Debian lays out aninclude_dir; Neovim, Emacs and Zed also take a file whose first line is
a# postern:comment. The Zed extension sendspostgresql-confas the language id. - A check on
pg_hba.confreads thepg_ident.confnext to it, and the other way round: from
the editor while the file is open, from the disk otherwise. A map no longer shows as missing
or unused because of which files happen to be open, and when one of the two changes the other
is checked again. Without the other file there to look at, map names are not checked at all. - Every option on a
pg_hba.confrule is checked against the connection type, the method and
the target PostgreSQL version the way hba.c checks it, with the messagespg_hba_file_rules
reports, and the problem is marked on the option.map=on a peer, cert, gss, sspi or oauth
rule is now looked up inpg_ident.conf, and the map it names no longer shows as unused
there. Completion offers the options the rule's method takes. - The Zed extension is
postgresql-conf, the id Zed's guidelines give a language extension, carries
its own license and references the grammar's 0.1.0 release, ready for the extension registry. - An Emacs package in
editors/emacs: a tree-sitter major mode for the four files with Imenu and
navigation, registered with Eglot for the server. - The Zed extension asks the release for the asset names it actually has when it downloads the
server.