@pgxsinkit/pgwasm-c 0.5.1 → 0.6.0-rc.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.
Binary file
Binary file
@@ -11,46 +11,46 @@
11
11
  /** The release the files are assets of. */
12
12
  export declare const ARTEFACT_RELEASE: {
13
13
  readonly repository: "pgxsinkit/pgwasm-postgres";
14
- readonly tag: "18.6.2";
15
- readonly name: "pgwasm-postgres 18.6.2";
16
- readonly commit: "bf7938ad6acd51e1f68a9cb14fee9fea879a3b48";
14
+ readonly tag: "19.0.0-rc.1";
15
+ readonly name: "pgwasm-postgres 19.0.0-rc.1";
16
+ readonly commit: "df4458a4fd3c0a546af29eb399bdfaa54eee70dd";
17
17
  readonly upstream: {
18
- readonly tag: "REL_18_6";
19
- readonly commit: "724edf9bde9d356724ad384a2e196edc3c9f80f7";
18
+ readonly tag: "REL_19_RC1";
19
+ readonly commit: "0b8bff042a997fe50fcd1c4c83b9ef1cc9ed8a89";
20
20
  };
21
- readonly dataFormat: 1;
22
- readonly builderImage: "ghcr.io/pgxsinkit/pgwasm-builder@sha256:0c4d5255c5f1824216d1eb347cc231a6f881574c3d5b8172796a8cbe5f9f63c8";
23
- readonly manifestSha256: "571b72a31003f89510f1bcbb37b5f70c142a5271cfdf24b7229423f9975d621d";
21
+ readonly dataFormat: 2;
22
+ readonly builderImage: "ghcr.io/pgxsinkit/pgwasm-builder@sha256:cbb378a50de43cd2fbd8718b72ce4c7595ffe421148a3c32435906f096bc5130";
23
+ readonly manifestSha256: "3451d5f8c0cc67c9dc8dd7d69862bebf81c700907f0a7d42860acc7a7548222a";
24
24
  };
25
25
  /** Every pinned file, by its name in `artefacts/` (the release asset of the same name). */
26
26
  export declare const ARTEFACT_FILES: {
27
27
  readonly "amcheck.tar.gz": {
28
- readonly bytes: 21850;
29
- readonly sha256: "6151f1f4ff507dd4401dc3dff9e5ad769727c2eb3d510e9fe75329bf52667c3f";
28
+ readonly bytes: 21881;
29
+ readonly sha256: "200978d0b73e9d5b254088625f9975a61bbbfd584558d4b53acb8bc667f26a02";
30
30
  };
31
31
  readonly "initdb.js": {
32
- readonly bytes: 106390;
33
- readonly sha256: "a402bd734fda0faf36696b68324471f853d52bd248ab8219893a6344386f6fac";
32
+ readonly bytes: 105130;
33
+ readonly sha256: "cf3fff4109879f3be1ba321f19b126c4f8d518d9909846927d3104b1ec0a8129";
34
34
  };
35
35
  readonly "initdb.wasm": {
36
- readonly bytes: 298938;
37
- readonly sha256: "0fdc9cb46e2efe6dc1fc957c47c0c7364022c98d327eb8072af3f7fb75237d3e";
36
+ readonly bytes: 308968;
37
+ readonly sha256: "71b468843c8b75dea04a5c3775606ca8d0612f0d3240953159b44132d29e0015";
38
38
  };
39
39
  readonly "postgres.data": {
40
- readonly bytes: 6246509;
41
- readonly sha256: "012a2ed052fc0a05d50b9920afb5cb1692b3fbf9e09d486da61e4a59bb8f249a";
40
+ readonly bytes: 6330058;
41
+ readonly sha256: "be7b9fd708ddffcc627aefaff8fdc35310978d8f274a87046cfd232e306a861b";
42
42
  };
43
43
  readonly "postgres.js": {
44
- readonly bytes: 335115;
45
- readonly sha256: "1bfb5740bd836121c0444d058593bbc7fa0de625596214a8e4805414191a23b2";
44
+ readonly bytes: 336823;
45
+ readonly sha256: "49f427bd890b89ba5b29cf96e3032dcc13cbaf5aadf62b782290480317ea0178";
46
46
  };
47
47
  readonly "postgres.wasm": {
48
- readonly bytes: 9140085;
49
- readonly sha256: "f2d217be96e05dd01c02a6b62e89110d3658ac5be6032fe1d28effc9348b15ac";
48
+ readonly bytes: 9451369;
49
+ readonly sha256: "3caccc979114e3ac7177a77bdc4511dab775738ea397bcdde04e6959ce682eb3";
50
50
  };
51
51
  readonly "prepopulated.tar.gz": {
52
- readonly bytes: 4404457;
53
- readonly sha256: "f5228a3690329edf675f630bedad6a4f6196f40c277f34aec3ac4d1ee426e0b3";
52
+ readonly bytes: 4443562;
53
+ readonly sha256: "7542c86ecdb058aa18553087b28ebf155b6270773abfb206ddcb05a446266052";
54
54
  };
55
55
  };
56
56
  export type ArtefactName = keyof typeof ARTEFACT_FILES;
@@ -1 +1 @@
1
- {"version":3,"file":"artefact-pins.d.ts","sourceRoot":"","sources":["../src/artefact-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;aAC3B,UAAU,EAAE,2BAA2B;aACvC,GAAG,EAAE,QAAQ;aACb,IAAI,EAAE,wBAAwB;aAC9B,MAAM,EAAE,0CAA0C;aAClD,QAAQ;iBAAI,GAAG,EAAE,UAAU;iBAAE,MAAM,EAAE,0CAA0C;;aAC/E,UAAU,EAAE,CAAC;aACb,YAAY,EACV,0GAA0G;aAC5G,cAAc,EAAE,kEAAkE;CAC1E,CAAC;AAEX,2FAA2F;AAC3F,eAAO,MAAM,cAAc;aACzB,gBAAgB;iBAAI,KAAK,EAAE,KAAK;iBAAE,MAAM,EAAE,kEAAkE;;aAC5G,WAAW;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aACxG,aAAa;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aAC1G,eAAe;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;aAC7G,aAAa;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aAC1G,eAAe;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;aAC7G,qBAAqB;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;CAC3G,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAC"}
1
+ {"version":3,"file":"artefact-pins.d.ts","sourceRoot":"","sources":["../src/artefact-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;aAC3B,UAAU,EAAE,2BAA2B;aACvC,GAAG,EAAE,aAAa;aAClB,IAAI,EAAE,6BAA6B;aACnC,MAAM,EAAE,0CAA0C;aAClD,QAAQ;iBAAI,GAAG,EAAE,YAAY;iBAAE,MAAM,EAAE,0CAA0C;;aACjF,UAAU,EAAE,CAAC;aACb,YAAY,EACV,0GAA0G;aAC5G,cAAc,EAAE,kEAAkE;CAC1E,CAAC;AAEX,2FAA2F;AAC3F,eAAO,MAAM,cAAc;aACzB,gBAAgB;iBAAI,KAAK,EAAE,KAAK;iBAAE,MAAM,EAAE,kEAAkE;;aAC5G,WAAW;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aACxG,aAAa;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aAC1G,eAAe;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;aAC7G,aAAa;iBAAI,KAAK,EAAE,MAAM;iBAAE,MAAM,EAAE,kEAAkE;;aAC1G,eAAe;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;aAC7G,qBAAqB;iBAAI,KAAK,EAAE,OAAO;iBAAE,MAAM,EAAE,kEAAkE;;CAC3G,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAC"}
package/dist/build.d.ts CHANGED
@@ -4,7 +4,8 @@ import type { PostgresModule } from "./host/emscripten";
4
4
  /**
5
5
  * The C build's identity, recorded in every data directory it creates (ADR-0063). Its release and data
6
6
  * format are the pinned pgwasm-postgres release's (`bun run pgwasm:pin` writes both; ADR-0064): the
7
- * release is the build's name in version(), and `pgwasm:pin` refuses a release of another data format.
7
+ * release is the build's name in version(). Changing formats is an explicit fresh-store adoption;
8
+ * existing directories and backups still have to match this build's format and PostgreSQL major.
8
9
  */
9
10
  export declare const C_BUILD_IDENTITY: BuildIdentity;
10
11
  /**
@@ -43,9 +44,9 @@ export declare function createCBuild(options?: CBuildOptions): PostgresBuild;
43
44
  /**
44
45
  * @internal A C build on the given artefacts, recording the given identity: what {@link createCBuild}
45
46
  * builds on the pinned release's. Not exported from the package; the IndexedDB browser lane reaches it
46
- * from source to boot an earlier release's glue and files, so the stores that release wrote can be opened
47
- * by the current build (tests/e2e/pgwasm-idb/continuity-builds.ts). That list starts empty at 18.6.2: its
48
- * filesystem root changed, so no earlier release's stores open under it; 18.6.2 is the first entry.
47
+ * from source to boot earlier compatible releases' glue and files, then checks that the current build
48
+ * can reopen their stores (tests/e2e/pgwasm-idb/continuity-builds.ts). PG19's format-2 list starts empty:
49
+ * format-1 PG18 stores are explicitly refused, and future entries must preserve the PG19 host ABI too.
49
50
  */
50
51
  export declare function createCBuildFrom(identity: BuildIdentity, artefacts: CBuildArtefactSet, options?: CBuildOptions): PostgresBuild;
51
52
  /** The C build with its defaults: the artefacts load from next to this module when first booted. */
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,aAAa,EAGb,aAAa,EAKd,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAM9B,CAAC;AAUF;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IACjD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,WAAW,CA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C,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/E,qFAAqF;IACrF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7E,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACxC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7D,iEAAiE;IACjE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAkKD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,aAAkB,GAAG,aAAa,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,iBAAiB,EAC5B,OAAO,GAAE,aAAkB,GAC1B,aAAa,CA6Ef;AAED,oGAAoG;AACpG,eAAO,MAAM,MAAM,EAAE,aAA8B,CAAC"}
@@ -111,26 +111,26 @@ export interface EmscriptenModuleBase {
111
111
  stringToUTF8OnStack(value: string): number;
112
112
  _fopen(path: number, mode: number): number;
113
113
  _fclose(stream: number): number;
114
- _pgl_set_system_fn(fn: number): void;
115
- _pgl_set_popen_fn(fn: number): void;
116
- _pgl_set_pclose_fn(fn: number): void;
117
- _pgl_freopen(path: number, mode: number, stream: number): number;
114
+ _pgwasm_set_system_fn(fn: number): void;
115
+ _pgwasm_set_popen_fn(fn: number): void;
116
+ _pgwasm_set_pclose_fn(fn: number): void;
117
+ _pgwasm_freopen(path: number, mode: number, stream: number): number;
118
118
  }
119
119
  /** The Postgres module (`postgres.js`). */
120
120
  export interface PostgresModule extends EmscriptenModuleBase {
121
121
  readonly PROXYFS: EmscriptenFilesystemType;
122
- _pgl_set_rw_cbs(readCallback: number, writeCallback: number): void;
123
- _pgl_pq_flush(): void;
124
- _pgl_setPGliteActive(value: number): number;
125
- _pgl_startPGlite(): void;
126
- _pgl_getMyProcPort(): number;
127
- _pgl_sendConnData(): void;
128
- _pgl_run_atexit_funcs(): void;
129
- _pgl_setPGliteExitStatus(status: number): number;
122
+ _pgwasm_set_rw_cbs(readCallback: number, writeCallback: number): void;
123
+ _pgwasm_pq_flush(): void;
124
+ _pgwasm_setPostgresActive(value: number): number;
125
+ _pgwasm_startPostgres(): void;
126
+ _pgwasm_getMyProcPort(): number;
127
+ _pgwasm_sendConnData(): void;
128
+ _pgwasm_run_atexit_funcs(): void;
129
+ _pgwasm_setPostgresExitStatus(status: number): number;
130
130
  _PostgresMainLoopOnce(): void;
131
131
  _PostgresMainLongJmp(): void;
132
132
  _PostgresSendReadyForQueryIfNecessary(): void;
133
- _ProcessStartupPacket(port: number, sslDone: boolean, gssDone: boolean): number;
133
+ _ProcessStartupPacket(port: number): number;
134
134
  _pq_buffer_remaining_data(): number;
135
135
  _emscripten_force_exit(status: number): void;
136
136
  }
@@ -1 +1 @@
1
- {"version":3,"file":"emscripten.d.ts","sourceRoot":"","sources":["../../src/host/emscripten.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,oFAAoF;AACpF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IAC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B,SAAS,CAAC,EAC9B,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,KAAK,EACL,SAAS,GACV,EAAE;IACD,6EAA6E;IAC7E,QAAQ,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACrE,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD,GAAG,OAAO,CAAC,YAAY,CAAC,CA2HxB"}
@@ -6,7 +6,7 @@ export declare const DEFAULT_START_PARAMS: readonly string[];
6
6
  /**
7
7
  * Whether `error` is one of the exceptions the Emscripten runtime throws on purpose to unwind the wasm
8
8
  * stack back to the main loop, which handles them:
9
- * - `'unwind'` from emscripten_exit_with_live_runtime(): how pgl_longjmp (pglitec.c) delivers Postgres'
9
+ * - `'unwind'` from emscripten_exit_with_live_runtime(): how pgwasm_longjmp (pgwasmc.c) delivers Postgres'
10
10
  * siglongjmp to its main-loop error handler, and how a Terminate message ends the loop;
11
11
  * - what an emscripten-mode longjmp throws, should one pass every invoke_* frame: an instance of the
12
12
  * glue's (unexported) `EmscriptenSjLj` class on Emscripten 6.0.10 (pgwasm-postgres 18.6.1 onwards), a
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { cBuildArtefacts } from "./artefacts";
2
2
  export { C_BUILD_IDENTITY, cBuild, createCBuild, type CBuildAssets, type CBuildOptions } from "./build";
3
3
  export { idbDatabaseName } from "./host/mounts/idb";
4
+ export { PostgresVersionMismatchError } from "./postgres-version";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -6,22 +6,22 @@ import createPostgresModule from "../artefacts/postgres.js";
6
6
  // packages/pgwasm-c/src/artefact-pins.ts
7
7
  var ARTEFACT_RELEASE = {
8
8
  repository: "pgxsinkit/pgwasm-postgres",
9
- tag: "18.6.2",
10
- name: "pgwasm-postgres 18.6.2",
11
- commit: "bf7938ad6acd51e1f68a9cb14fee9fea879a3b48",
12
- upstream: { tag: "REL_18_6", commit: "724edf9bde9d356724ad384a2e196edc3c9f80f7" },
13
- dataFormat: 1,
14
- builderImage: "ghcr.io/pgxsinkit/pgwasm-builder@sha256:0c4d5255c5f1824216d1eb347cc231a6f881574c3d5b8172796a8cbe5f9f63c8",
15
- manifestSha256: "571b72a31003f89510f1bcbb37b5f70c142a5271cfdf24b7229423f9975d621d"
9
+ tag: "19.0.0-rc.1",
10
+ name: "pgwasm-postgres 19.0.0-rc.1",
11
+ commit: "df4458a4fd3c0a546af29eb399bdfaa54eee70dd",
12
+ upstream: { tag: "REL_19_RC1", commit: "0b8bff042a997fe50fcd1c4c83b9ef1cc9ed8a89" },
13
+ dataFormat: 2,
14
+ builderImage: "ghcr.io/pgxsinkit/pgwasm-builder@sha256:cbb378a50de43cd2fbd8718b72ce4c7595ffe421148a3c32435906f096bc5130",
15
+ manifestSha256: "3451d5f8c0cc67c9dc8dd7d69862bebf81c700907f0a7d42860acc7a7548222a"
16
16
  };
17
17
  var ARTEFACT_FILES = {
18
- "amcheck.tar.gz": { bytes: 21850, sha256: "6151f1f4ff507dd4401dc3dff9e5ad769727c2eb3d510e9fe75329bf52667c3f" },
19
- "initdb.js": { bytes: 106390, sha256: "a402bd734fda0faf36696b68324471f853d52bd248ab8219893a6344386f6fac" },
20
- "initdb.wasm": { bytes: 298938, sha256: "0fdc9cb46e2efe6dc1fc957c47c0c7364022c98d327eb8072af3f7fb75237d3e" },
21
- "postgres.data": { bytes: 6246509, sha256: "012a2ed052fc0a05d50b9920afb5cb1692b3fbf9e09d486da61e4a59bb8f249a" },
22
- "postgres.js": { bytes: 335115, sha256: "1bfb5740bd836121c0444d058593bbc7fa0de625596214a8e4805414191a23b2" },
23
- "postgres.wasm": { bytes: 9140085, sha256: "f2d217be96e05dd01c02a6b62e89110d3658ac5be6032fe1d28effc9348b15ac" },
24
- "prepopulated.tar.gz": { bytes: 4404457, sha256: "f5228a3690329edf675f630bedad6a4f6196f40c277f34aec3ac4d1ee426e0b3" }
18
+ "amcheck.tar.gz": { bytes: 21881, sha256: "200978d0b73e9d5b254088625f9975a61bbbfd584558d4b53acb8bc667f26a02" },
19
+ "initdb.js": { bytes: 105130, sha256: "cf3fff4109879f3be1ba321f19b126c4f8d518d9909846927d3104b1ec0a8129" },
20
+ "initdb.wasm": { bytes: 308968, sha256: "71b468843c8b75dea04a5c3775606ca8d0612f0d3240953159b44132d29e0015" },
21
+ "postgres.data": { bytes: 6330058, sha256: "be7b9fd708ddffcc627aefaff8fdc35310978d8f274a87046cfd232e306a861b" },
22
+ "postgres.js": { bytes: 336823, sha256: "49f427bd890b89ba5b29cf96e3032dcc13cbaf5aadf62b782290480317ea0178" },
23
+ "postgres.wasm": { bytes: 9451369, sha256: "3caccc979114e3ac7177a77bdc4511dab775738ea397bcdde04e6959ce682eb3" },
24
+ "prepopulated.tar.gz": { bytes: 4443562, sha256: "7542c86ecdb058aa18553087b28ebf155b6270773abfb206ddcb05a446266052" }
25
25
  };
26
26
 
27
27
  // packages/pgwasm-c/src/artefacts.ts
@@ -368,15 +368,16 @@ async function runInitdb({
368
368
  env["HOME"] = "/home/postgres";
369
369
  env["USER"] = "postgres";
370
370
  env["LOGNAME"] = "postgres";
371
+ env["TZ"] = "UTC";
371
372
  env["ICU_DATA"] = ICU_DATA_PATH;
372
373
  },
373
374
  (module) => {
374
375
  module.onRuntimeInitialized = () => {
375
- module._pgl_set_system_fn(module.addFunction((command) => {
376
+ module._pgwasm_set_system_fn(module.addFunction((command) => {
376
377
  postgresArgs = commandArgs(module, command);
377
378
  return callPgMain(postgresArgs);
378
379
  }, "pi"));
379
- module._pgl_set_popen_fn(module.addFunction((command, mode) => {
380
+ module._pgwasm_set_popen_fn(module.addFunction((command, mode) => {
380
381
  const openMode = module.UTF8ToString(mode);
381
382
  postgresArgs = commandArgs(module, command);
382
383
  if (openMode === "r") {
@@ -389,7 +390,7 @@ async function runInitdb({
389
390
  }
390
391
  throw new Error(`Unexpected popen mode ${openMode}`);
391
392
  }, "ppi"));
392
- module._pgl_set_pclose_fn(module.addFunction((stream) => {
393
+ module._pgwasm_set_pclose_fn(module.addFunction((stream) => {
393
394
  if (stream === initdbStdinFd || stream === initdbStdoutFd) {
394
395
  if (needToCallPgMain) {
395
396
  needToCallPgMain = false;
@@ -399,8 +400,8 @@ async function runInitdb({
399
400
  }
400
401
  return module._pclose(stream);
401
402
  }, "pi"));
402
- pg._pgl_freopen(pg.stringToUTF8OnStack(PG_STDIN_PATH), pg.stringToUTF8OnStack("r"), 0);
403
- pg._pgl_freopen(pg.stringToUTF8OnStack(PG_STDOUT_PATH), pg.stringToUTF8OnStack("w"), 1);
403
+ pg._pgwasm_freopen(pg.stringToUTF8OnStack(PG_STDIN_PATH), pg.stringToUTF8OnStack("r"), 0);
404
+ pg._pgwasm_freopen(pg.stringToUTF8OnStack(PG_STDOUT_PATH), pg.stringToUTF8OnStack("w"), 1);
404
405
  initdbStdinFd = module._fopen(module.stringToUTF8OnStack(PG_STDOUT_PATH), module.stringToUTF8OnStack("r"));
405
406
  initdbStdoutFd = module._fopen(module.stringToUTF8OnStack(PG_STDIN_PATH), module.stringToUTF8OnStack("w"));
406
407
  };
@@ -980,15 +981,15 @@ class PostgresInstance {
980
981
  }
981
982
  #onRuntimeInitialized() {
982
983
  const mod = this.module;
983
- mod._pgl_set_system_fn(this.#addFunction((command) => {
984
+ mod._pgwasm_set_system_fn(this.#addFunction((command) => {
984
985
  this.#log(`Postgres tried to execute ${mod.UTF8ToString(command)}, returning 1.`);
985
986
  return 1;
986
987
  }, "pi"));
987
- mod._pgl_set_popen_fn(this.#addFunction((command, mode) => {
988
+ mod._pgwasm_set_popen_fn(this.#addFunction((command, mode) => {
988
989
  this.#externalCommandStream = this.#handleExternalCommand(mod.UTF8ToString(command), mod.UTF8ToString(mode));
989
990
  return this.#externalCommandStream;
990
991
  }, "ppp"));
991
- mod._pgl_set_pclose_fn(this.#addFunction((stream) => {
992
+ mod._pgwasm_set_pclose_fn(this.#addFunction((stream) => {
992
993
  if (stream !== this.#externalCommandStream)
993
994
  throw new Error(`Unhandled pclose ${stream}`);
994
995
  mod._fclose(stream);
@@ -1004,7 +1005,7 @@ class PostgresInstance {
1004
1005
  this.#readOffset += length;
1005
1006
  return length;
1006
1007
  }, "iii");
1007
- mod._pgl_set_rw_cbs(read, write);
1008
+ mod._pgwasm_set_rw_cbs(read, write);
1008
1009
  }
1009
1010
  #handleExternalCommand(command, mode) {
1010
1011
  if (command.startsWith("locale -a") && mode === "r") {
@@ -1066,16 +1067,16 @@ class PostgresInstance {
1066
1067
  }
1067
1068
  startSingleMode(startParams) {
1068
1069
  const mod = this.module;
1069
- mod._pgl_setPGliteActive(1);
1070
+ mod._pgwasm_setPostgresActive(1);
1070
1071
  this.callMain([...startParams, "-D", PGDATA, mod.ENV["PGDATABASE"] ?? "postgres"]);
1071
- const exitStatus = mod._pgl_setPGliteExitStatus(-3);
1072
+ const exitStatus = mod._pgwasm_setPostgresExitStatus(-3);
1072
1073
  if (exitStatus !== PGWASM_EXIT_ALIVE) {
1073
1074
  const output = this.#stderr.join(`
1074
1075
  `).trim();
1075
1076
  throw new Error(`Postgres failed to start (single-user mode exit status ${exitStatus})${output ? `:
1076
1077
  ${output}` : ""}`);
1077
1078
  }
1078
- mod._pgl_startPGlite();
1079
+ mod._pgwasm_startPostgres();
1079
1080
  }
1080
1081
  exchange(message, onData) {
1081
1082
  if (this.#failed)
@@ -1117,12 +1118,12 @@ ${output}` : ""}`, { cause: error });
1117
1118
  }
1118
1119
  #processStartupPacket() {
1119
1120
  const mod = this.module;
1120
- const result = this.#call(() => mod._ProcessStartupPacket(mod._pgl_getMyProcPort(), true, true));
1121
+ const result = this.#call(() => mod._ProcessStartupPacket(mod._pgwasm_getMyProcPort()));
1121
1122
  if (result !== 0)
1122
1123
  throw new Error("Cannot process the startup packet");
1123
1124
  this.#call(() => {
1124
- mod._pgl_sendConnData();
1125
- mod._pgl_pq_flush();
1125
+ mod._pgwasm_sendConnData();
1126
+ mod._pgwasm_pq_flush();
1126
1127
  });
1127
1128
  }
1128
1129
  #runMainLoop(message) {
@@ -1136,14 +1137,14 @@ ${output}` : ""}`, { cause: error });
1136
1137
  this.#stack.restore(stack);
1137
1138
  if (!isEmscriptenUnwind(error))
1138
1139
  throw error;
1139
- if (mod._pgl_setPGliteExitStatus(-2) === POSTGRES_MAIN_LONGJMP) {
1140
+ if (mod._pgwasm_setPostgresExitStatus(-2) === POSTGRES_MAIN_LONGJMP) {
1140
1141
  this.#call(() => mod._PostgresMainLongJmp());
1141
1142
  }
1142
1143
  }
1143
1144
  }
1144
1145
  this.#call(() => {
1145
1146
  mod._PostgresSendReadyForQueryIfNecessary();
1146
- mod._pgl_pq_flush();
1147
+ mod._pgwasm_pq_flush();
1147
1148
  });
1148
1149
  } catch (error) {
1149
1150
  this.#failed = true;
@@ -1154,8 +1155,8 @@ ${output}` : ""}`, { cause: error });
1154
1155
  const mod = this.module;
1155
1156
  try {
1156
1157
  preservingExitCode(() => {
1157
- mod._pgl_setPGliteActive(0);
1158
- this.#call(() => mod._pgl_run_atexit_funcs());
1158
+ mod._pgwasm_setPostgresActive(0);
1159
+ this.#call(() => mod._pgwasm_run_atexit_funcs());
1159
1160
  });
1160
1161
  } catch (error) {
1161
1162
  const exit = error;
@@ -1179,6 +1180,31 @@ ${output}` : ""}`, { cause: error });
1179
1180
  }
1180
1181
  }
1181
1182
 
1183
+ // packages/pgwasm-c/src/postgres-version.ts
1184
+ import { PgwasmError } from "@pgxsinkit/pgwasm";
1185
+ var C_POSTGRES_MAJOR = /^REL_(\d+)_/.exec(ARTEFACT_RELEASE.upstream.tag)?.[1];
1186
+
1187
+ class PostgresVersionMismatchError extends PgwasmError {
1188
+ name = "PostgresVersionMismatchError";
1189
+ expected;
1190
+ found;
1191
+ detail;
1192
+ constructor(expected, found) {
1193
+ super(`This C build requires PostgreSQL ${expected}, but the data directory's PG_VERSION is ` + `${found === undefined ? "missing" : JSON.stringify(found)}. Use a separately named fresh PostgreSQL ${expected} store; ` + "the existing directory is not migrated or replaced.");
1194
+ this.expected = expected;
1195
+ this.found = found;
1196
+ this.detail = { expected, found };
1197
+ }
1198
+ }
1199
+ function checkPostgresVersion(bytes) {
1200
+ if (C_POSTGRES_MAJOR === undefined)
1201
+ throw new Error("The pinned C build has no PostgreSQL major version.");
1202
+ const found = bytes === undefined ? undefined : new TextDecoder().decode(bytes).trim();
1203
+ if (found === C_POSTGRES_MAJOR)
1204
+ return;
1205
+ throw new PostgresVersionMismatchError(C_POSTGRES_MAJOR, found);
1206
+ }
1207
+
1182
1208
  // packages/pgwasm-c/src/build.ts
1183
1209
  var C_BUILD_IDENTITY = {
1184
1210
  name: "c",
@@ -1256,7 +1282,11 @@ class CMountedDataDirectory {
1256
1282
  return this.#instance.module.FS;
1257
1283
  }
1258
1284
  async readFile(path) {
1259
- return readDataDirFile(this.#FS, path);
1285
+ const bytes = readDataDirFile(this.#FS, path);
1286
+ if (path === "/PG_VERSION" && bytes !== undefined && readDataDirFile(this.#FS, "/PGWASM_BUILD") === undefined) {
1287
+ checkPostgresVersion(bytes);
1288
+ }
1289
+ return bytes;
1260
1290
  }
1261
1291
  async createCluster() {
1262
1292
  const scratch = await PostgresInstance.create({
@@ -1284,6 +1314,11 @@ class CMountedDataDirectory {
1284
1314
  }
1285
1315
  }
1286
1316
  async writeEntries(entries) {
1317
+ const versions = entries.filter((entry) => entry.path === "/PG_VERSION" && entry.type === "file");
1318
+ if (versions.length === 0)
1319
+ checkPostgresVersion(undefined);
1320
+ for (const version of versions)
1321
+ checkPostgresVersion(version.data);
1287
1322
  writeDataDirEntries(this.#FS, entries);
1288
1323
  }
1289
1324
  async writeFile(path, data) {
@@ -1293,6 +1328,7 @@ class CMountedDataDirectory {
1293
1328
  await this.#mount.persist(this.#instance.module, false);
1294
1329
  }
1295
1330
  async start(options) {
1331
+ checkPostgresVersion(readDataDirFile(this.#FS, "/PG_VERSION"));
1296
1332
  const log = (...args) => {
1297
1333
  if (this.#request.debug > 0)
1298
1334
  console.log(...args);
@@ -1384,10 +1420,11 @@ function createCBuildFrom(identity, artefacts, options = {}) {
1384
1420
  var cBuild = createCBuild();
1385
1421
  export {
1386
1422
  C_BUILD_IDENTITY,
1423
+ PostgresVersionMismatchError,
1387
1424
  cBuild,
1388
1425
  cBuildArtefacts,
1389
1426
  createCBuild,
1390
1427
  idbDatabaseName
1391
1428
  };
1392
1429
 
1393
- //# debugId=EDEC7B4CD83CB87064756E2164756E21
1430
+ //# debugId=1C7A0C07F8587C2D64756E2164756E21