@homeflare/alchemy 0.47.1 → 0.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/talos/bao-env.d.ts +7 -0
  2. package/dist/talos/bao-env.d.ts.map +1 -0
  3. package/dist/talos/cluster-adapter-errors.d.ts +134 -0
  4. package/dist/talos/cluster-adapter-errors.d.ts.map +1 -0
  5. package/dist/talos/cluster-adapter.d.ts +116 -0
  6. package/dist/talos/cluster-adapter.d.ts.map +1 -0
  7. package/dist/talos/cluster-identity.d.ts +28 -0
  8. package/dist/talos/cluster-identity.d.ts.map +1 -0
  9. package/dist/talos/cluster-transport.d.ts +64 -0
  10. package/dist/talos/cluster-transport.d.ts.map +1 -0
  11. package/dist/talos/credentials-write.d.ts.map +1 -1
  12. package/dist/talos/credentials.d.ts +10 -19
  13. package/dist/talos/credentials.d.ts.map +1 -1
  14. package/dist/talos/fake-apiserver.d.ts +9 -0
  15. package/dist/talos/fake-apiserver.d.ts.map +1 -0
  16. package/dist/talos/index.d.ts +7 -0
  17. package/dist/talos/index.d.ts.map +1 -1
  18. package/dist/talos/index.js +683 -170
  19. package/dist/talos/index.js.map +22 -10
  20. package/dist/talos/kubeconfig-attrs.d.ts +14 -0
  21. package/dist/talos/kubeconfig-attrs.d.ts.map +1 -1
  22. package/dist/talos/kubeconfig-doc.d.ts +23 -0
  23. package/dist/talos/kubeconfig-doc.d.ts.map +1 -0
  24. package/dist/talos/kubeconfig.d.ts +0 -12
  25. package/dist/talos/kubeconfig.d.ts.map +1 -1
  26. package/dist/talos/literal-connection.d.ts +16 -0
  27. package/dist/talos/literal-connection.d.ts.map +1 -0
  28. package/dist/talos/machine-config-read.d.ts +1 -1
  29. package/dist/talos/machine-config-read.d.ts.map +1 -1
  30. package/dist/talos/mint-temp-file.d.ts +20 -0
  31. package/dist/talos/mint-temp-file.d.ts.map +1 -0
  32. package/dist/talos/node-temp.harness.d.ts +2 -0
  33. package/dist/talos/node-temp.harness.d.ts.map +1 -0
  34. package/dist/talos/talos-bootstrap-etcd.d.ts +1 -1
  35. package/dist/talos/talos-bootstrap-etcd.d.ts.map +1 -1
  36. package/dist/talos/talos-cluster-health.d.ts +15 -15
  37. package/dist/talos/talos-cluster-health.d.ts.map +1 -1
  38. package/dist/talos/talos-cluster-identity.d.ts +65 -0
  39. package/dist/talos/talos-cluster-identity.d.ts.map +1 -0
  40. package/dist/talos/talosctl-binary.d.ts +43 -0
  41. package/dist/talos/talosctl-binary.d.ts.map +1 -0
  42. package/dist/talos/talosctl.d.ts +29 -3
  43. package/dist/talos/talosctl.d.ts.map +1 -1
  44. package/dist/talos/trust-boundary.d.ts +8 -0
  45. package/dist/talos/trust-boundary.d.ts.map +1 -0
  46. package/dist/talos/values.d.ts.map +1 -1
  47. package/dist/talos/yaml-parse.d.ts +3 -0
  48. package/dist/talos/yaml-parse.d.ts.map +1 -0
  49. package/dist/verify/fake-engine.d.ts +2 -0
  50. package/dist/verify/fake-engine.d.ts.map +1 -1
  51. package/docs/talos-openbao-adapter.md +45 -0
  52. package/docs/upstream-conformance-bun.md +61 -24
  53. package/package.json +6 -2
  54. package/src/talos/bao-env.ts +16 -0
  55. package/src/talos/bao-vetting.test.ts +97 -0
  56. package/src/talos/cluster-adapter-deadline.test.ts +110 -0
  57. package/src/talos/cluster-adapter-errors.ts +193 -0
  58. package/src/talos/cluster-adapter-move.test.ts +131 -0
  59. package/src/talos/cluster-adapter-reconcile.test.ts +165 -0
  60. package/src/talos/cluster-adapter-refusals.test.ts +102 -0
  61. package/src/talos/cluster-adapter-rename.test.ts +87 -0
  62. package/src/talos/cluster-adapter-secrecy.test.ts +243 -0
  63. package/src/talos/cluster-adapter.fixtures.ts +125 -0
  64. package/src/talos/cluster-adapter.test.ts +240 -0
  65. package/src/talos/cluster-adapter.ts +250 -0
  66. package/src/talos/cluster-identity.ts +63 -0
  67. package/src/talos/cluster-transport.ts +110 -0
  68. package/src/talos/credentials-write.ts +27 -5
  69. package/src/talos/credentials.ts +51 -45
  70. package/src/talos/fake-apiserver.ts +55 -0
  71. package/src/talos/fake-process.ts +47 -1
  72. package/src/talos/index.ts +32 -0
  73. package/src/talos/kubeconfig-adapter.test.ts +37 -0
  74. package/src/talos/kubeconfig-attrs.ts +12 -28
  75. package/src/talos/kubeconfig-doc.ts +74 -0
  76. package/src/talos/kubeconfig.fixtures.ts +52 -0
  77. package/src/talos/kubeconfig.test.ts +6 -54
  78. package/src/talos/kubeconfig.ts +18 -34
  79. package/src/talos/literal-connection.ts +59 -0
  80. package/src/talos/mint-temp-file.test.ts +44 -0
  81. package/src/talos/mint-temp-file.ts +68 -0
  82. package/src/talos/node-connect.harness.ts +78 -0
  83. package/src/talos/node-connect.test.ts +27 -0
  84. package/src/talos/node-temp.harness.ts +40 -0
  85. package/src/talos/node-temp.test.ts +26 -0
  86. package/src/talos/talos-cluster-health-declare.test.ts +54 -0
  87. package/src/talos/talos-cluster-health-literal.test.ts +69 -0
  88. package/src/talos/talos-cluster-health.test.ts +104 -18
  89. package/src/talos/talos-cluster-health.ts +46 -14
  90. package/src/talos/talos-cluster-identity.test.ts +96 -0
  91. package/src/talos/talos-cluster-identity.ts +130 -0
  92. package/src/talos/talosctl-binary.ts +150 -0
  93. package/src/talos/talosctl-probe-kill.test.ts +56 -0
  94. package/src/talos/talosctl-vetting.test.ts +212 -0
  95. package/src/talos/talosctl.test.ts +163 -0
  96. package/src/talos/talosctl.ts +133 -15
  97. package/src/talos/trust-boundary.test.ts +17 -0
  98. package/src/talos/trust-boundary.ts +45 -0
  99. package/src/talos/values.ts +5 -12
  100. package/src/talos/yaml-parse.test.ts +41 -0
  101. package/src/talos/yaml-parse.ts +28 -0
  102. package/src/verify/fake-engine.ts +10 -0
  103. package/dist/talos/fake-process.d.ts +0 -56
  104. package/dist/talos/fake-process.d.ts.map +0 -1
  105. package/dist/talos/machine-config-fixtures.d.ts +0 -60
  106. package/dist/talos/machine-config-fixtures.d.ts.map +0 -1
  107. package/src/postgres/fixtures/pg-REL_18_6-acl.h.txt +0 -147
  108. package/src/postgres/fixtures/pg-REL_18_6-aclexplode-func.txt +0 -31
  109. package/src/postgres/fixtures/pg-REL_18_6-alter-default-privileges-synopsis.txt +0 -82
  110. package/src/postgres/fixtures/pg-REL_18_6-alter_role.sgml.txt +0 -44
  111. package/src/postgres/fixtures/pg-REL_18_6-create-database-synopsis.txt +0 -26
  112. package/src/postgres/fixtures/pg-REL_18_6-create_role.sgml.txt +0 -26
  113. package/src/postgres/fixtures/pg-REL_18_6-grant-synopsis.txt +0 -95
  114. package/src/postgres/fixtures/pg-REL_18_6-pg_attribute.h.txt +0 -24
  115. package/src/postgres/fixtures/pg-REL_18_6-pg_auth_members.h.txt +0 -62
  116. package/src/postgres/fixtures/pg-REL_18_6-pg_authid.h.txt +0 -70
  117. package/src/postgres/fixtures/pg-REL_18_6-pg_class.h.txt +0 -33
  118. package/src/postgres/fixtures/pg-REL_18_6-pg_database.h.txt +0 -67
  119. package/src/postgres/fixtures/pg-REL_18_6-pg_default_acl.h.txt +0 -81
  120. package/src/postgres/fixtures/pg-REL_18_6-pg_namespace.h.txt +0 -28
  121. package/src/postgres/fixtures/pg-REL_18_6-revoke-synopsis.txt +0 -124
  122. package/src/release/fixtures/openbao/checksums.txt +0 -83
  123. package/src/release/fixtures/openbao/checksums.txt.gpgsig +0 -0
  124. package/src/release/fixtures/openbao/darwin-assets.txt +0 -12
  125. package/src/release/fixtures/openbao/openbao-gpg-pub-20240618.asc +0 -109
  126. package/src/release/fixtures/victoria/darwin-arm64-assets.txt +0 -22
  127. package/src/release/fixtures/victoria/victoria-logs-darwin-arm64-v1.52.0_checksums.txt +0 -2
  128. package/src/release/fixtures/victoria/victoria-metrics-darwin-arm64-v1.151.0_checksums.txt +0 -2
  129. package/src/release/fixtures/victoria/victoria-traces-darwin-arm64-v0.10.0_checksums.txt +0 -2
  130. package/src/release/fixtures/victoria/vmutils-darwin-arm64-v1.151.0_checksums.txt +0 -8
@@ -0,0 +1,41 @@
1
+ /**
2
+ * `parseYaml` — a syntax error is "not a document"; nothing else is swallowed. And the adapter's
3
+ * kubeconfig reader no longer reports a parser/runtime fault as an unreadable kubeconfig.
4
+ */
5
+ import { expect, spyOn, test } from 'bun:test';
6
+ import { kubeconfigTransport } from './kubeconfig-doc.ts';
7
+ import { parseYaml } from './yaml-parse.ts';
8
+
9
+ test('valid YAML parses and a syntax error is undefined', () => {
10
+ expect(parseYaml('a: 1\nb: [x, y]\n')).toEqual({ a: 1, b: ['x', 'y'] });
11
+ expect(parseYaml('a: [unclosed\n')).toBeUndefined();
12
+ });
13
+
14
+ test('an unresolved tag beside key material emits no warning carrying the source', () => {
15
+ // ⛔ yaml's default logLevel is 'warn': process.emitWarning with the SOURCE TEXT. Reproduced in
16
+ // hunt round 5: the whole client-key-data landed on stderr while parsing still succeeded.
17
+ // A fresh random needle per run: a fixed high-entropy literal here is exactly what the secret scan refuses.
18
+ const secret = Buffer.from(crypto.getRandomValues(new Uint8Array(32))).toString('base64');
19
+ const text = `users:\n - user:\n client-key-data: ${secret}\n other: !nosuchtag value\n`;
20
+ const emitted: string[] = [];
21
+ const warn = spyOn(process, 'emitWarning').mockImplementation(((w: unknown) => {
22
+ emitted.push(String(w instanceof Error ? w.message : w));
23
+ }) as never);
24
+ const err = spyOn(process.stderr, 'write').mockImplementation(((c: unknown) => {
25
+ emitted.push(String(c));
26
+ return true;
27
+ }) as never);
28
+ try {
29
+ expect(parseYaml(text)).toBeDefined();
30
+ } finally {
31
+ warn.mockRestore();
32
+ err.mockRestore();
33
+ }
34
+ expect(emitted.join('\n')).not.toContain(secret);
35
+ expect(emitted).toEqual([]);
36
+ });
37
+
38
+ test('kubeconfigTransport returns undefined for a non-document, not for a fault', () => {
39
+ expect(kubeconfigTransport('a: [unclosed\n', 'admin@c1')).toBeUndefined();
40
+ expect(kubeconfigTransport('- just\n- a list\n', 'admin@c1')).toBeUndefined();
41
+ });
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The one YAML parser of the Talos family — runtime-neutral, so it runs under Bun AND Node.
3
+ *
4
+ * ⛔ NOT `Bun.YAML`. The published `dist/` runs on Node for consumers (AGENTS.md: Bun is the
5
+ * toolchain, not the runtime). `Bun.YAML` is a missing global there: the old code swallowed that
6
+ * ReferenceError and reported every kubeconfig as unreadable (reproduced on Node 22: the adapter
7
+ * returned no transport). ★ `yaml` is the parser alchemy itself depends on (`yaml ^2.9.0`), so no
8
+ * new package enters a consumer's tree.
9
+ * ⚠️ ONLY a YAML syntax error is `undefined` ("this is not a document"). Anything else — a broken
10
+ * import, a runtime fault — propagates, so a parser/runtime defect is never dressed up as bad
11
+ * vault content.
12
+ */
13
+ import { YAMLParseError, parse } from 'yaml';
14
+
15
+ /** Parse one YAML document, or `undefined` when the text is not valid YAML. */
16
+ export const parseYaml = (text: string): unknown => {
17
+ try {
18
+ // ⛔ yaml reports unresolved tags etc. via process.emitWarning with the SOURCE TEXT in the
19
+ // message (reproduced, hunt round 5: a kubeconfig with an unknown tag beside client-key-data
20
+ // put the whole key on stderr). `logLevel: 'error'` silences warnings (yaml options.d.ts:
21
+ // LogLevelId; doc.warnings are never emitted) and `prettyErrors: false` keeps source excerpts
22
+ // out of any thrown error's message; syntax errors still throw YAMLParseError.
23
+ return parse(text, { logLevel: 'error', prettyErrors: false });
24
+ } catch (error) {
25
+ if (error instanceof YAMLParseError) return undefined;
26
+ throw error;
27
+ }
28
+ };
@@ -143,6 +143,8 @@ export interface FakeEngine {
143
143
  * `verify.ts`'s `readWithState`, which already wraps that same call in `Effect.catchCause`.
144
144
  */
145
145
  readonly drift: (body: Body) => Promise<Record<string, DriftRow>>;
146
+ /** `alchemy drift --repair` (`Alchemy.Drift.repair`): read, then reconcile what drifted. */
147
+ readonly repair: (body: Body) => Promise<Record<string, DriftRow>>;
146
148
  /**
147
149
  * Every state row the store holds, as JSON — what a Postgres store would persist. ★ For tests
148
150
  * that must prove a value NEVER reaches state (proxmox/pbs-notification-target-state.test.ts).
@@ -173,6 +175,8 @@ export const engineOver = <ROut, E, RIn>(
173
175
  stage: string;
174
176
  }) => Effect.Effect<{ resources: Record<string, DriftRow> }, unknown>;
175
177
 
178
+ const repairDrift = Alchemy.Drift.repair as unknown as typeof detectDrift;
179
+
176
180
  const run = <A>(body: Body, next: (compiled: Compiled) => Effect.Effect<A, unknown, unknown>) =>
177
181
  Effect.runPromise(
178
182
  Effect.gen(function* () {
@@ -208,6 +212,12 @@ export const engineOver = <ROut, E, RIn>(
208
212
  Effect.map((detected) => detected.resources),
209
213
  ),
210
214
  ),
215
+ repair: (body) =>
216
+ run(body, (compiled) =>
217
+ repairDrift({ name: compiled.name, stage: compiled.stage }).pipe(
218
+ Effect.map((detected) => detected.resources),
219
+ ),
220
+ ),
211
221
  };
212
222
  };
213
223
 
@@ -1,56 +0,0 @@
1
- /**
2
- * A fake `ChildProcessSpawner` for offline Talos tests — no real `bao` or `talosctl` process ever
3
- * starts. Shared by credentials.test.ts and talos-machine-config.test.ts (2026-09-26, K-A3);
4
- * this package had NO process-level test fake before this file — every Talos resource file spawns
5
- * a real binary in production and none of that was previously exercised offline.
6
- *
7
- * ★ A FULL FAKE SERVICE, NOT A REAL SPAWN WITH A FIXTURE EXECUTABLE ON `PATH`. The alternative —
8
- * a tiny fake `bao`/`talosctl` script and a mutated `process.env.PATH` — spawns a REAL OS
9
- * process and mutates process-global state for the test's duration, which is exactly the kind
10
- * of cross-test interference the house rules ask tests to avoid. `ChildProcessSpawner.make`
11
- * takes just a `spawn` function and derives everything else, so a fake `spawn` is the whole cost.
12
- */
13
- import * as Effect from 'effect/Effect';
14
- import * as Stream from 'effect/Stream';
15
- import type { Command } from 'effect/process/ChildProcess';
16
- import * as ChildProcessSpawner from 'effect/process/ChildProcessSpawner';
17
- export type FakeResult = {
18
- readonly stdout?: string;
19
- readonly stderr?: string;
20
- readonly exitCode?: number;
21
- };
22
- export type FakeCall = {
23
- readonly command: string;
24
- readonly args: readonly string[];
25
- /**
26
- * Decoded stdin text, present only when the real caller piped a `Stream` in (K-talos-first-boot,
27
- * `credentials-write.ts`'s `writeKvValue`) — the whole reason this fake exists is to prove a
28
- * value went in via stdin and never via argv, so a test needs to see it.
29
- */
30
- readonly stdin?: string;
31
- };
32
- export type FakeHandler = (call: FakeCall) => FakeResult;
33
- /**
34
- * Build a fake `ChildProcessSpawner.Service` from `handler`, which sees every command's
35
- * executable + argv (+ decoded stdin, when piped) and returns canned stdout/stderr/exitCode.
36
- * `credentials.ts` and `talosctl.ts` only ever build `StandardCommand`s (never a piped command),
37
- * so that is the only shape this fake accepts — a `PipedCommand` is a test-authoring mistake, not
38
- * something to fake.
39
- */
40
- export declare const fakeSpawner: (handler: FakeHandler, calls?: FakeCall[]) => {
41
- spawn(command: Command): Effect.Effect<ChildProcessSpawner.ChildProcessHandle, import("effect/PlatformError").PlatformError, import("effect/Scope").Scope>;
42
- exitCode(command: Command): Effect.Effect<ChildProcessSpawner.ExitCode, import("effect/PlatformError").PlatformError>;
43
- streamString(command: Command, options?: {
44
- readonly includeStderr?: boolean | undefined;
45
- }): Stream.Stream<string, import("effect/PlatformError").PlatformError>;
46
- streamLines(command: Command, options?: {
47
- readonly includeStderr?: boolean | undefined;
48
- }): Stream.Stream<string, import("effect/PlatformError").PlatformError>;
49
- lines(command: Command, options?: {
50
- readonly includeStderr?: boolean | undefined;
51
- }): Effect.Effect<Array<string>, import("effect/PlatformError").PlatformError>;
52
- string(command: Command, options?: {
53
- readonly includeStderr?: boolean | undefined;
54
- }): Effect.Effect<string, import("effect/PlatformError").PlatformError>;
55
- };
56
- //# sourceMappingURL=fake-process.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fake-process.d.ts","sourceRoot":"","sources":["../../src/talos/fake-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,mBAAmB,MAAM,oCAAoC,CAAC;AAE1E,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK,UAAU,CAAC;AAsCzD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAAa,WAAW,UAAS,QAAQ,EAAE;;;;;;;;;;;;;;;CAehE,CAAC"}
@@ -1,60 +0,0 @@
1
- /**
2
- * Shared fixtures for talos-machine-config.test.ts and machine-config-poll.test.ts — split out
3
- * so neither test file needs to duplicate the fake `bao`/`talosctl` dispatcher (2026-09-26, K-A3).
4
- *
5
- * ⚠️ FIXTURES ONLY. `CONFIG_TEXT` is a plain marker string, never anything resembling a real
6
- * Talos machine config, CA key or bootstrap token. No provider imports this file.
7
- */
8
- import * as Effect from 'effect/Effect';
9
- import * as ChildProcessSpawner from 'effect/process/ChildProcessSpawner';
10
- import { type FakeCall } from './fake-process.ts';
11
- import type { MachineConfigProps } from './talos-machine-config.ts';
12
- export declare const CONFIG_TEXT = "machine:\n type: worker\n";
13
- export declare const PIN: string;
14
- export declare const TARGET: {
15
- cluster: string;
16
- mount: string;
17
- };
18
- export declare const FAST_POLL: {
19
- immediate: {
20
- intervalMs: number;
21
- maxAttempts: number;
22
- };
23
- rebootish: {
24
- intervalMs: number;
25
- maxAttempts: number;
26
- };
27
- };
28
- export declare const props: (overrides?: Partial<MachineConfigProps>) => MachineConfigProps;
29
- /** Shape REASONED from talosctl's `get machineconfig -o yaml` — see values.ts's own header. */
30
- export declare const wrapperFor: (specText: string, version?: string) => string;
31
- /** Routes fake `bao kv get` (config + talosconfig keys) and `talosctl` calls in one place. */
32
- export declare const dispatcher: (opts: {
33
- configText?: string;
34
- liveWrapper?: () => {
35
- stdout?: string;
36
- exitCode?: number;
37
- };
38
- applyExitCode?: number;
39
- /**
40
- * Controls the fix-first #1 maintenance-mode probe (`talosctl version --insecure`), reached only
41
- * when the authenticated `get machineconfig` above fails. Defaults to `false` so a bare failing
42
- * `liveWrapper` (most tests) still exercises the "both reads fail → propagate" path rather than
43
- * silently succeeding at the probe.
44
- */
45
- maintenanceReachable?: boolean;
46
- }) => (call: FakeCall) => {
47
- stdout?: string;
48
- exitCode?: number;
49
- } | {
50
- exitCode: number;
51
- stderr: string;
52
- };
53
- export declare const run: <A, E>(effect: Effect.Effect<A, E, ChildProcessSpawner.ChildProcessSpawner>, handler: (c: FakeCall) => {
54
- stdout?: string;
55
- stderr?: string;
56
- exitCode?: number;
57
- }, calls?: FakeCall[]) => Promise<A>;
58
- /** `Data.TaggedError` stamps `_tag`, not `.message` — see talos-errors.ts. */
59
- export declare const hasTag: (tag: string) => (error: unknown) => boolean;
60
- //# sourceMappingURL=machine-config-fixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"machine-config-fixtures.d.ts","sourceRoot":"","sources":["../../src/talos/machine-config-fixtures.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,mBAAmB,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,KAAK,QAAQ,EAAe,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,eAAO,MAAM,WAAW,+BAA+B,CAAC;AACxD,eAAO,MAAM,GAAG,QAA4B,CAAC;AAC7C,eAAO,MAAM,MAAM;IAAK,OAAO;IAAQ,KAAK;CAAc,CAAC;AAC3D,eAAO,MAAM,SAAS;IACpB,SAAS;QAAI,UAAU;QAAK,WAAW;;IACvC,SAAS;QAAI,UAAU;QAAK,WAAW;;CACxC,CAAC;AAEF,eAAO,MAAM,KAAK,eAAe,OAAO,CAAC,kBAAkB,CAAC,KAAQ,kBAMlE,CAAC;AAEH,+FAA+F;AAC/F,eAAO,MAAM,UAAU,aAAc,MAAM,6BAC6D,CAAC;AAEzG,8FAA8F;AAC9F,eAAO,MAAM,UAAU,SAAU;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,YAEe,QAAQ;aAXS,MAAM;eAAa,MAAM;;;;CAgCzD,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,CAAC,EAAE,CAAC,UACd,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,WAC3D,CAAC,CAAC,EAAE,QAAQ,KAAK;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,UAC1E,QAAQ,EAAE,eAQhB,CAAC;AAEJ,8EAA8E;AAC9E,eAAO,MAAM,MAAM,QAAS,MAAM,aAAa,OAAO,YACH,CAAC"}
@@ -1,147 +0,0 @@
1
- # path: src/include/utils/acl.h
2
- # blob: 13bb8128747139d9cae66777e4782359ead0a760
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-30 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the AclItem struct, the grant-option layout, every ACL_*_CHR letter define and the ACL_ALL_RIGHTS_* sets (lines 40-180 of the full file)
6
- #
7
-
8
- /*
9
- * typedef AclMode is declared in parsenodes.h, also the individual privilege
10
- * bit meanings are defined there
11
- */
12
-
13
- #define ACL_ID_PUBLIC 0 /* placeholder for id in a PUBLIC acl item */
14
-
15
- /*
16
- * AclItem
17
- *
18
- * Note: must be same size on all platforms, because the size is hardcoded
19
- * in the pg_type.h entry for aclitem.
20
- */
21
- typedef struct AclItem
22
- {
23
- Oid ai_grantee; /* ID that this item grants privs to */
24
- Oid ai_grantor; /* grantor of privs */
25
- AclMode ai_privs; /* privilege bits */
26
- } AclItem;
27
-
28
- /*
29
- * The upper 32 bits of the ai_privs field of an AclItem are the grant option
30
- * bits, and the lower 32 bits are the actual privileges. We use "rights"
31
- * to mean the combined grant option and privilege bits fields.
32
- */
33
- #define ACLITEM_GET_PRIVS(item) ((item).ai_privs & 0xFFFFFFFF)
34
- #define ACLITEM_GET_GOPTIONS(item) (((item).ai_privs >> 32) & 0xFFFFFFFF)
35
- #define ACLITEM_GET_RIGHTS(item) ((item).ai_privs)
36
-
37
- #define ACL_GRANT_OPTION_FOR(privs) (((AclMode) (privs) & 0xFFFFFFFF) << 32)
38
- #define ACL_OPTION_TO_PRIVS(privs) (((AclMode) (privs) >> 32) & 0xFFFFFFFF)
39
-
40
- #define ACLITEM_SET_PRIVS(item,privs) \
41
- ((item).ai_privs = ((item).ai_privs & ~((AclMode) 0xFFFFFFFF)) | \
42
- ((AclMode) (privs) & 0xFFFFFFFF))
43
- #define ACLITEM_SET_GOPTIONS(item,goptions) \
44
- ((item).ai_privs = ((item).ai_privs & ~(((AclMode) 0xFFFFFFFF) << 32)) | \
45
- (((AclMode) (goptions) & 0xFFFFFFFF) << 32))
46
- #define ACLITEM_SET_RIGHTS(item,rights) \
47
- ((item).ai_privs = (AclMode) (rights))
48
-
49
- #define ACLITEM_SET_PRIVS_GOPTIONS(item,privs,goptions) \
50
- ((item).ai_privs = ((AclMode) (privs) & 0xFFFFFFFF) | \
51
- (((AclMode) (goptions) & 0xFFFFFFFF) << 32))
52
-
53
-
54
- #define ACLITEM_ALL_PRIV_BITS ((AclMode) 0xFFFFFFFF)
55
- #define ACLITEM_ALL_GOPTION_BITS ((AclMode) 0xFFFFFFFF << 32)
56
-
57
- /*
58
- * Definitions for convenient access to Acl (array of AclItem).
59
- * These are standard PostgreSQL arrays, but are restricted to have one
60
- * dimension and no nulls. We also ignore the lower bound when reading,
61
- * and set it to one when writing.
62
- *
63
- * CAUTION: as of PostgreSQL 7.1, these arrays are toastable (just like all
64
- * other array types). Therefore, be careful to detoast them with the
65
- * macros provided, unless you know for certain that a particular array
66
- * can't have been toasted.
67
- */
68
-
69
-
70
- /*
71
- * Acl a one-dimensional array of AclItem
72
- */
73
- typedef struct ArrayType Acl;
74
-
75
- #define ACL_NUM(ACL) (ARR_DIMS(ACL)[0])
76
- #define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL))
77
- #define ACL_N_SIZE(N) (ARR_OVERHEAD_NONULLS(1) + ((N) * sizeof(AclItem)))
78
- #define ACL_SIZE(ACL) ARR_SIZE(ACL)
79
-
80
- /*
81
- * fmgr macros for these types
82
- */
83
- #define DatumGetAclItemP(X) ((AclItem *) DatumGetPointer(X))
84
- #define PG_GETARG_ACLITEM_P(n) DatumGetAclItemP(PG_GETARG_DATUM(n))
85
- #define PG_RETURN_ACLITEM_P(x) PG_RETURN_POINTER(x)
86
-
87
- #define DatumGetAclP(X) ((Acl *) PG_DETOAST_DATUM(X))
88
- #define DatumGetAclPCopy(X) ((Acl *) PG_DETOAST_DATUM_COPY(X))
89
- #define PG_GETARG_ACL_P(n) DatumGetAclP(PG_GETARG_DATUM(n))
90
- #define PG_GETARG_ACL_P_COPY(n) DatumGetAclPCopy(PG_GETARG_DATUM(n))
91
- #define PG_RETURN_ACL_P(x) PG_RETURN_POINTER(x)
92
-
93
- /*
94
- * ACL modification opcodes for aclupdate
95
- */
96
- #define ACL_MODECHG_ADD 1
97
- #define ACL_MODECHG_DEL 2
98
- #define ACL_MODECHG_EQL 3
99
-
100
- /*
101
- * External representations of the privilege bits --- aclitemin/aclitemout
102
- * represent each possible privilege bit with a distinct 1-character code
103
- */
104
- #define ACL_INSERT_CHR 'a' /* formerly known as "append" */
105
- #define ACL_SELECT_CHR 'r' /* formerly known as "read" */
106
- #define ACL_UPDATE_CHR 'w' /* formerly known as "write" */
107
- #define ACL_DELETE_CHR 'd'
108
- #define ACL_TRUNCATE_CHR 'D' /* super-delete, as it were */
109
- #define ACL_REFERENCES_CHR 'x'
110
- #define ACL_TRIGGER_CHR 't'
111
- #define ACL_EXECUTE_CHR 'X'
112
- #define ACL_USAGE_CHR 'U'
113
- #define ACL_CREATE_CHR 'C'
114
- #define ACL_CREATE_TEMP_CHR 'T'
115
- #define ACL_CONNECT_CHR 'c'
116
- #define ACL_SET_CHR 's'
117
- #define ACL_ALTER_SYSTEM_CHR 'A'
118
- #define ACL_MAINTAIN_CHR 'm'
119
-
120
- /* string holding all privilege code chars, in order by bitmask position */
121
- #define ACL_ALL_RIGHTS_STR "arwdDxtXUCTcsAm"
122
-
123
- /*
124
- * Bitmasks defining "all rights" for each supported object type
125
- */
126
- #define ACL_ALL_RIGHTS_COLUMN (ACL_INSERT|ACL_SELECT|ACL_UPDATE|ACL_REFERENCES)
127
- #define ACL_ALL_RIGHTS_RELATION (ACL_INSERT|ACL_SELECT|ACL_UPDATE|ACL_DELETE|ACL_TRUNCATE|ACL_REFERENCES|ACL_TRIGGER|ACL_MAINTAIN)
128
- #define ACL_ALL_RIGHTS_SEQUENCE (ACL_USAGE|ACL_SELECT|ACL_UPDATE)
129
- #define ACL_ALL_RIGHTS_DATABASE (ACL_CREATE|ACL_CREATE_TEMP|ACL_CONNECT)
130
- #define ACL_ALL_RIGHTS_FDW (ACL_USAGE)
131
- #define ACL_ALL_RIGHTS_FOREIGN_SERVER (ACL_USAGE)
132
- #define ACL_ALL_RIGHTS_FUNCTION (ACL_EXECUTE)
133
- #define ACL_ALL_RIGHTS_LANGUAGE (ACL_USAGE)
134
- #define ACL_ALL_RIGHTS_LARGEOBJECT (ACL_SELECT|ACL_UPDATE)
135
- #define ACL_ALL_RIGHTS_PARAMETER_ACL (ACL_SET|ACL_ALTER_SYSTEM)
136
- #define ACL_ALL_RIGHTS_SCHEMA (ACL_USAGE|ACL_CREATE)
137
- #define ACL_ALL_RIGHTS_TABLESPACE (ACL_CREATE)
138
- #define ACL_ALL_RIGHTS_TYPE (ACL_USAGE)
139
-
140
- /* operation codes for pg_*_aclmask */
141
- typedef enum
142
- {
143
- ACLMASK_ALL, /* normal case: compute all bits */
144
- ACLMASK_ANY, /* return when result is known nonzero */
145
- } AclMaskHow;
146
-
147
- /* result codes for pg_*_aclcheck */
@@ -1,31 +0,0 @@
1
- # path: doc/src/sgml/func.sgml
2
- # blob: b57f161f53c8833c721dede3d48121490dc15f12
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-30 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the aclexplode row of "Access Privilege Inquiry Functions" (lines 25843-25867 of the full file)
6
- #
7
- <entry role="func_table_entry"><para role="func_signature">
8
- <indexterm>
9
- <primary>aclexplode</primary>
10
- </indexterm>
11
- <function>aclexplode</function> ( <type>aclitem[]</type> )
12
- <returnvalue>setof record</returnvalue>
13
- ( <parameter>grantor</parameter> <type>oid</type>,
14
- <parameter>grantee</parameter> <type>oid</type>,
15
- <parameter>privilege_type</parameter> <type>text</type>,
16
- <parameter>is_grantable</parameter> <type>boolean</type> )
17
- </para>
18
- <para>
19
- Returns the <type>aclitem</type> array as a set of rows.
20
- If the grantee is the pseudo-role PUBLIC, it is represented by zero in
21
- the <parameter>grantee</parameter> column. Each granted privilege is
22
- represented as <literal>SELECT</literal>, <literal>INSERT</literal>,
23
- etc (see <xref linkend="privilege-abbrevs-table"/> for a full list).
24
- Note that each privilege is broken out as a separate row, so
25
- only one keyword appears in the <parameter>privilege_type</parameter>
26
- column.
27
- </para></entry>
28
- </row>
29
-
30
- <row>
31
- <entry role="func_table_entry"><para role="func_signature">
@@ -1,82 +0,0 @@
1
- # path: doc/src/sgml/ref/alter_default_privileges.sgml
2
- # blob: 6acd0f1df914c6926e6d6f5bd28b0599d66d629c
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-30 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the <synopsis> block only (lines 23-98 of the full file), cut per house doc-size convention
6
- #
7
- <synopsis>
8
- ALTER DEFAULT PRIVILEGES
9
- [ FOR { ROLE | USER } <replaceable>target_role</replaceable> [, ...] ]
10
- [ IN SCHEMA <replaceable>schema_name</replaceable> [, ...] ]
11
- <replaceable class="parameter">abbreviated_grant_or_revoke</replaceable>
12
-
13
- <phrase>where <replaceable class="parameter">abbreviated_grant_or_revoke</replaceable> is one of:</phrase>
14
-
15
- GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER | MAINTAIN }
16
- [, ...] | ALL [ PRIVILEGES ] }
17
- ON TABLES
18
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
19
-
20
- GRANT { { USAGE | SELECT | UPDATE }
21
- [, ...] | ALL [ PRIVILEGES ] }
22
- ON SEQUENCES
23
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
24
-
25
- GRANT { EXECUTE | ALL [ PRIVILEGES ] }
26
- ON { FUNCTIONS | ROUTINES }
27
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
28
-
29
- GRANT { USAGE | ALL [ PRIVILEGES ] }
30
- ON TYPES
31
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
32
-
33
- GRANT { { USAGE | CREATE }
34
- [, ...] | ALL [ PRIVILEGES ] }
35
- ON SCHEMAS
36
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
37
-
38
- GRANT { { SELECT | UPDATE }
39
- [, ...] | ALL [ PRIVILEGES ] }
40
- ON LARGE OBJECTS
41
- TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
42
-
43
- REVOKE [ GRANT OPTION FOR ]
44
- { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER | MAINTAIN }
45
- [, ...] | ALL [ PRIVILEGES ] }
46
- ON TABLES
47
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
48
- [ CASCADE | RESTRICT ]
49
-
50
- REVOKE [ GRANT OPTION FOR ]
51
- { { USAGE | SELECT | UPDATE }
52
- [, ...] | ALL [ PRIVILEGES ] }
53
- ON SEQUENCES
54
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
55
- [ CASCADE | RESTRICT ]
56
-
57
- REVOKE [ GRANT OPTION FOR ]
58
- { EXECUTE | ALL [ PRIVILEGES ] }
59
- ON { FUNCTIONS | ROUTINES }
60
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
61
- [ CASCADE | RESTRICT ]
62
-
63
- REVOKE [ GRANT OPTION FOR ]
64
- { USAGE | ALL [ PRIVILEGES ] }
65
- ON TYPES
66
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
67
- [ CASCADE | RESTRICT ]
68
-
69
- REVOKE [ GRANT OPTION FOR ]
70
- { { USAGE | CREATE }
71
- [, ...] | ALL [ PRIVILEGES ] }
72
- ON SCHEMAS
73
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
74
- [ CASCADE | RESTRICT ]
75
-
76
- REVOKE [ GRANT OPTION FOR ]
77
- { { SELECT | UPDATE }
78
- [, ...] | ALL [ PRIVILEGES ] }
79
- ON LARGE OBJECTS
80
- FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
81
- [ CASCADE | RESTRICT ]
82
- </synopsis>
@@ -1,44 +0,0 @@
1
- # path: doc/src/sgml/ref/alter_role.sgml
2
- # blob: 7b0a04bc4637c7c08246e597a9acf4466b467fa2
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-29 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the <synopsis> block plus the memberships sentence the GRANT/REVOKE design leans on; blob SHA is the full upstream file
6
- #
7
- <synopsis>
8
- ALTER ROLE <replaceable class="parameter">role_specification</replaceable> [ WITH ] <replaceable class="parameter">option</replaceable> [ ... ]
9
-
10
- <phrase>where <replaceable class="parameter">option</replaceable> can be:</phrase>
11
-
12
- SUPERUSER | NOSUPERUSER
13
- | CREATEDB | NOCREATEDB
14
- | CREATEROLE | NOCREATEROLE
15
- | INHERIT | NOINHERIT
16
- | LOGIN | NOLOGIN
17
- | REPLICATION | NOREPLICATION
18
- | BYPASSRLS | NOBYPASSRLS
19
- | CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
20
- | [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
21
- | VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
22
-
23
- ALTER ROLE <replaceable class="parameter">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
24
-
25
- ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | ALL } [ IN DATABASE <replaceable class="parameter">database_name</replaceable> ] SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
26
- ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | ALL } [ IN DATABASE <replaceable class="parameter">database_name</replaceable> ] SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
27
- ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | ALL } [ IN DATABASE <replaceable class="parameter">database_name</replaceable> ] RESET <replaceable>configuration_parameter</replaceable>
28
- ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | ALL } [ IN DATABASE <replaceable class="parameter">database_name</replaceable> ] RESET ALL
29
-
30
- <phrase>where <replaceable class="parameter">role_specification</replaceable> can be:</phrase>
31
-
32
- <replaceable class="parameter">role_name</replaceable>
33
- | CURRENT_ROLE
34
- | CURRENT_USER
35
- | SESSION_USER
36
- </synopsis>
37
-
38
- The first variant of this command listed in the synopsis can change
39
- many of the role attributes that can be specified in
40
- <link linkend="sql-createrole"><command>CREATE ROLE</command></link>.
41
- (All the possible attributes are covered,
42
- except that there are no options for adding or removing memberships; use
43
- <link linkend="sql-grant"><command>GRANT</command></link> and
44
- <link linkend="sql-revoke"><command>REVOKE</command></link> for that.)
@@ -1,26 +0,0 @@
1
- # path: doc/src/sgml/ref/create_database.sgml
2
- # blob: 4da8aeebb50a29e89bd9f68a8deac4b1a3ec7b18
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-23 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the <synopsis> block only (lines 23-42 of the full file), cut per house doc-size convention
6
- #
7
- <synopsis>
8
- CREATE DATABASE <replaceable class="parameter">name</replaceable>
9
- [ WITH ] [ OWNER [=] <replaceable class="parameter">user_name</replaceable> ]
10
- [ TEMPLATE [=] <replaceable class="parameter">template</replaceable> ]
11
- [ ENCODING [=] <replaceable class="parameter">encoding</replaceable> ]
12
- [ STRATEGY [=] <replaceable class="parameter">strategy</replaceable> ]
13
- [ LOCALE [=] <replaceable class="parameter">locale</replaceable> ]
14
- [ LC_COLLATE [=] <replaceable class="parameter">lc_collate</replaceable> ]
15
- [ LC_CTYPE [=] <replaceable class="parameter">lc_ctype</replaceable> ]
16
- [ BUILTIN_LOCALE [=] <replaceable class="parameter">builtin_locale</replaceable> ]
17
- [ ICU_LOCALE [=] <replaceable class="parameter">icu_locale</replaceable> ]
18
- [ ICU_RULES [=] <replaceable class="parameter">icu_rules</replaceable> ]
19
- [ LOCALE_PROVIDER [=] <replaceable class="parameter">locale_provider</replaceable> ]
20
- [ COLLATION_VERSION = <replaceable>collation_version</replaceable> ]
21
- [ TABLESPACE [=] <replaceable class="parameter">tablespace_name</replaceable> ]
22
- [ ALLOW_CONNECTIONS [=] <replaceable class="parameter">allowconn</replaceable> ]
23
- [ CONNECTION LIMIT [=] <replaceable class="parameter">connlimit</replaceable> ]
24
- [ IS_TEMPLATE [=] <replaceable class="parameter">istemplate</replaceable> ]
25
- [ OID [=] <replaceable class="parameter">oid</replaceable> ]
26
- </synopsis>
@@ -1,26 +0,0 @@
1
- # path: doc/src/sgml/ref/create_role.sgml
2
- # blob: cee23b1ea6b4dcf2d9d356d07a582e64808c2912
3
- # tag: REL_18_6 (commit 724edf9bde9d356724ad384a2e196edc3c9f80f7)
4
- # fetched: 2026-09-29 via gh api repos/postgres/postgres/contents/...?ref=724edf9bde9d356724ad384a2e196edc3c9f80f7
5
- # excerpt: the <synopsis> block only (the provenance test reads the option list); blob SHA is the full upstream file
6
- #
7
- <synopsis>
8
- CREATE ROLE <replaceable class="parameter">name</replaceable> [ [ WITH ] <replaceable class="parameter">option</replaceable> [ ... ] ]
9
-
10
- <phrase>where <replaceable class="parameter">option</replaceable> can be:</phrase>
11
-
12
- SUPERUSER | NOSUPERUSER
13
- | CREATEDB | NOCREATEDB
14
- | CREATEROLE | NOCREATEROLE
15
- | INHERIT | NOINHERIT
16
- | LOGIN | NOLOGIN
17
- | REPLICATION | NOREPLICATION
18
- | BYPASSRLS | NOBYPASSRLS
19
- | CONNECTION LIMIT <replaceable class="parameter">connlimit</replaceable>
20
- | [ ENCRYPTED ] PASSWORD '<replaceable class="parameter">password</replaceable>' | PASSWORD NULL
21
- | VALID UNTIL '<replaceable class="parameter">timestamp</replaceable>'
22
- | IN ROLE <replaceable class="parameter">role_name</replaceable> [, ...]
23
- | ROLE <replaceable class="parameter">role_name</replaceable> [, ...]
24
- | ADMIN <replaceable class="parameter">role_name</replaceable> [, ...]
25
- | SYSID <replaceable class="parameter">uid</replaceable>
26
- </synopsis>