Skip to content

Commit b403a70

Browse files
committed
ddl
1 parent 47626be commit b403a70

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

sql/cpres.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set local search_path to cpres, pg_catalog, public;
44

55
\ir roles.sql
66
\ir url.sql
7-
-- \ir ddl.sql
7+
\ir ddl.sql
88
\ir translation.sql
99
\ir gis.sql
1010
\ir view.sql

sql/ddl.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ create table person (
132132
challenge_used_at timestamptz default null
133133
);
134134

135-
136-
137135
grant select (person_id, name, phone) on table person to anon;
138136

139137
grant select (person_id, name, phone),

sql/view.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set search_path to cpres, url, pg_catalog, public;
44

5-
create or replace function cpres._(id_ text, lang_ text = null)
5+
create or replace function _(id_ text, lang_ text = null)
66
returns text
77
immutable parallel safe -- leakproof
88
security definer
@@ -24,6 +24,8 @@ begin atomic
2424
);
2525
end;
2626

27+
grant execute on function _ to anon, httpg;
28+
2729
create or replace function max_interest_price(good good) returns xml
2830
language sql
2931
immutable strict parallel safe -- leakproof
@@ -43,6 +45,8 @@ begin atomic;
4345
where price > 0;
4446
end;
4547

48+
grant execute on function max_interest_price to anon, httpg;
49+
4650
create or replace function interest_control(good good, interest interest) returns xml
4751
language sql
4852
immutable parallel safe -- leakproof

0 commit comments

Comments
 (0)