8000 feat: update oriole extension to beta9 (#1407) · hscmgroup/postgres@608d579 · GitHub
[go: up one dir, main page]

Skip to content

Commit 608d579

Browse files
authored
feat: update oriole extension to beta9 (supabase#1407)
* feat: update oriole extension to beta9 * chore: testing suffix * chore: rm staging suffix * chore: update pg_regres for changes in oriole sql ext interface * chore: fix test database/dbmate tool to work with new start-server (supabase#1410)
1 parent f9bb095 commit 608d579

File tree

5 files changed

+39
-48
lines changed

5 files changed

+39
-48
lines changed

ansible/vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ postgres_major:
88

99
# Full version strings for each major version
1010
postgres_release:
11-
postgresorioledb-17: "17.0.1.018-orioledb"
12-
postgres15: "15.8.1.028"
11+
postgresorioledb-17: "17.0.1.019-orioledb"
12+
postgres15: "15.8.1.029"
1313

1414
# Non Postgres Extensions
1515
pgbouncer_release: "1.19.0"

migrations/schema-orioledb-17.sql

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ CREATE SCHEMA auth;
2424
CREATE SCHEMA extensions;
2525

2626

27+
--
28+
-- Name: graphql; Type: SCHEMA; Schema: -; Owner: -
29+
--
30+
31+
CREATE SCHEMA graphql;
32+
33+
2734
--
2835
-- Name: graphql_public; Type: SCHEMA; Schema: -; Owner: -
2936
--
@@ -94,6 +101,20 @@ CREATE EXTENSION IF NOT EXISTS orioledb WITH SCHEMA public;
94101
COMMENT ON EXTENSION orioledb IS 'OrioleDB -- the next generation transactional engine';
95102

96103

104+
--
105+
-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
106+
--
107+
108+
CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql;
109+
110+
111+
--
112+
-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: -
113+
--
114+
115+
COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support';
116+
117+
97118
--
98119
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
99120
--
@@ -484,39 +505,6 @@ $_$;
484505
COMMENT ON FUNCTION extensions.set_graphql_placeholder() IS 'Reintroduces placeholder function for graphql_public.graphql';
485506

486507

487-
--
488-
-- Name: graphql(text, text, jsonb, jsonb); Type: FUNCTION; Schema: graphql_public; Owner: -
489-
--
490-
491-
CREATE FUNCTION graphql_public.graphql("operationName" text DEFAULT NULL::text, query text DEFAULT NULL::text, variables jsonb DEFAULT NULL::jsonb, extensions jsonb DEFAULT NULL::jsonb) RETURNS jsonb
492-
LANGUAGE plpgsql
493-
AS $$
494-
DECLARE
495-
server_version float;
496-
BEGIN
497-
server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);
498-
499-
IF server_version >= 14 THEN
500-
RETURN jsonb_build_object(
501-
'errors', jsonb_build_array(
502-
jsonb_build_object(
503-
'message', 'pg_graphql extension is not enabled.'
504-
)
505-
)
506-
);
507-
ELSE
508-
RETURN jsonb_build_object(
509-
'errors', jsonb_build_array(
510-
jsonb_build_object(
511-
'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'
512-
)
513-
)
514-
);
515-
END IF;
516-
END;
517-
$$;
518-
519-
520508
--
521509
-- Name: get_auth(text); Type: FUNCTION; Schema: pgbouncer; Owner: -
522510
--
@@ -625,7 +613,7 @@ CREATE FUNCTION vault.secrets_encrypt_secret_secret() RETURNS trigger
625613

626614
SET default_tablespace = '';
627615

628-
SET default_table_access_method = heap;
616+
SET default_table_access_method = orioledb;
629617

630618
--
631619
-- Name: audit_log_entries; Type: TABLE; Schema: auth; Owner: -

nix/ext/orioledb.nix

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@ stdenv.mkDerivation rec {
66
src = fetchFromGitHub {
77
owner = "orioledb";
88
repo = "orioledb";
9-
rev = "beta8";
10-
sha256 = "sha256-niyTQr1FQYEsKdxl/uVrKSiIR0DCnnT+DDkW47lsc80=";
9+
rev = "beta9";
10+
sha256 = "sha256-z2EHWsY+hhtnYzAxOl2PWjqfyJ+wp9SCau5LKPT2ec0=";
1111
};
12-
version = "beta8";
12+
version = "beta9";
1313
buildInputs = [ curl libkrb5 postgresql python3 openssl ];
1414
buildPhase = "make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=5";
1515
installPhase = ''
1616
runHook preInstall
17+
1718
mkdir -p $out/{lib,share/postgresql/extension}
1819
842F 19-
cp *${postgresql.dlSuffix} $out/lib
20-
cp *.sql $out/share/postgresql/extension
21-
cp *.control $out/share/postgresql/extension
20+
# Copy the extension library
21+
cp orioledb${postgresql.dlSuffix} $out/lib/
22+
23+
# Copy sql files from the sql directory
24+
cp sql/*.sql $out/share/postgresql/extension/
25+
26+
# Copy control file
27+
cp orioledb.control $out/share/postgresql/extension/
2228
2329
runHook postInstall
2430
'';

0 commit comments

Comments
 (0)
0