You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACE FUNCTION get_completion_job_failures(job_id INT)
278
276
RETURNS TABLE (row_id INT, value TEXT)
279
277
STRICT IMMUTABLE PARALLEL SAFE
280
-
SECURITY DEFINER
281
278
LANGUAGE plpgsql
282
279
AS $$
283
280
BEGIN
@@ -296,7 +293,6 @@ extension_sql!(
296
293
CREATE OR REPLACE FUNCTION get_embedding_jobs()
297
294
RETURNS TABLE (id INT, status TEXT, progress SMALLINT, error TEXT)
298
295
STRICT IMMUTABLE PARALLEL SAFE
299
-
SECURITY DEFINER
300
296
LANGUAGE plpgsql
301
297
AS $$
302
298
BEGIN
@@ -316,7 +312,6 @@ extension_sql!(
316
312
CREATE OR REPLACE FUNCTION get_completion_jobs()
317
313
RETURNS TABLE (id INT, status TEXT, progress SMALLINT, error TEXT)
318
314
STRICT IMMUTABLE PARALLEL SAFE
319
-
SECURITY DEFINER
320
315
LANGUAGE plpgsql
321
316
AS $$
322
317
BEGIN
@@ -528,6 +523,8 @@ pub mod tests {
528
523
"
529
524
CREATE TABLE t1 (id serial primary key, title text);
530
525
SET lantern_extras.openai_token='test';
526
+
CREATE ROLE test_role1;
527
+
SET ROLE test_role1;
531
528
",
532
529
None,
533
530
None,
@@ -569,6 +566,8 @@ pub mod tests {
569
566
(1, 1, '1test1'),
570
567
(1, 2, '1test2'),
571
568
(2, 1, '2test1');
569
+
CREATE ROLE test_role1;
570
+
SET ROLE test_role1;
572
571
",
573
572
None,
574
573
None,
@@ -657,6 +656,7 @@ pub mod tests {
657
656
client.update(
658
657
"
659
658
CREATE TABLE t1 (id serial primary key, title text);
659
+
CREATE ROLE test_role1;
660
660
",
661
661
None,
662
662
None,
@@ -666,7 +666,9 @@ pub mod tests {
666
666
let id:i32 = id.first().get(1)?.unwrap();
667
667
668
668
// queued
669
+
client.update("SET ROLE test_role1;",None,None,)?;
669
670
let rows = client.select("SELECT status, progress, error FROM get_embedding_job_status($1)",None,Some(vec![(PgBuiltInOids::INT4OID.oid(), id.into_datum())]))?;
0 commit comments