Overview
Comment: | Simplied function calls and made them nested. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c90fda69e11190ff6042b81aa2187ab5 |
User & Date: | c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 on 2009-10-12 19:43:07.000 |
Other Links: | branch diff | manifest | tags |
Context
2009-10-13
| ||
13:20 | Default values for config file processing, now script doesn't brakes if some fields are not present. check-in: fc934cead1 user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk | |
2009-10-12
| ||
19:43 | Simplied function calls and made them nested. check-in: c90fda69e1 user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk | |
12:58 | Errors targetted with last commit were produced by bad logic of match cycle wich replyed twice to each request which can be blocked. check-in: 7e3418d94f user: c.kworr@d4daf22a-8aaf-11de-a64d-234b64dd91b4 tags: master, trunk | |
Changes
Modified database.sql
from [5af75a9f1f]
to [0dcf65df96].
︙ | ︙ | |||
13 14 15 16 17 18 19 | LANGUAGE sql IMMUTABLE STRICT AS $_$ select array_agg(item) as result from (select distinct unnest($1) as item order by item) a; $_$; -- this function adds tag to domain CREATE or replace FUNCTION mark(domain text, new_tag text) RETURNS void | | < < < < < < < | < < < < < < < < < < < < < < < < < < < < < | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | LANGUAGE sql IMMUTABLE STRICT AS $_$ select array_agg(item) as result from (select distinct unnest($1) as item order by item) a; $_$; -- this function adds tag to domain CREATE or replace FUNCTION mark(domain text, new_tag text) RETURNS void LANGUAGE sql immutable STRICT AS $$ select mark(get_site($1), $2) as result; $$; -- this function adds tag to site by site id CREATE or replace FUNCTION mark(my_id_site integer, new_tag text) RETURNS void LANGUAGE plpgsql STRICT AS $$ declare |
︙ | ︙ | |||
86 87 88 89 90 91 92 | insert into tag (tag) values (usort(my_tag)); select id_tag from tag where usort(my_tag) = tag into tag_id; end if; return tag_id; end; $$; | | > > > > > > | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | insert into tag (tag) values (usort(my_tag)); select id_tag from tag where usort(my_tag) = tag into tag_id; end if; return tag_id; end; $$; -- this functions returns id of site create or replace function get_site(domain text) returns integer language sql immutable strict as $$ select get_site(tripdomain($1)) as result; $$; create or replace function get_site(my_site text[]) returns integer language plpgsql strict as $$ declare site_id integer; begin select id_site from site where my_site = site into site_id; |
︙ | ︙ |