support_functions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
support_functions [2012/08/22 23:56] – Add tag_id() daniel | support_functions [2012/08/25 07:53] – [tag_id(text): returns the ID of a tag from its full hierarchical name] daniel | ||
---|---|---|---|
Line 49: | Line 49: | ||
</ | </ | ||
- | ====== tag_id(text): | + | ====== tag_id(text): |
This is the inverse function of tag_path(int). | This is the inverse function of tag_path(int). | ||
If the name is not found, it returns null. | If the name is not found, it returns null. | ||
Line 61: | Line 61: | ||
FOR component IN SELECT regexp_split_to_table(in_tag_path, | FOR component IN SELECT regexp_split_to_table(in_tag_path, | ||
LOOP | LOOP | ||
- | SELECT tag_id FROM tags WHERE NAME=component AND parent_id is not distinct from id | + | SELECT tag_id FROM tags WHERE upper(NAME)=upper(component) AND parent_id is not distinct from id |
INTO id; | INTO id; | ||
END LOOP; | END LOOP; |
support_functions.txt · Last modified: 2018/04/20 11:17 by daniel