author | Aurelien Campeas <aurelien.campeas@logilab.fr> |
Fri, 24 Jul 2009 15:30:14 +0200 | |
changeset 2490 | b0771c03f531 |
parent 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
# following functions have been renamed, but keep old definition for bw compat |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
2 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
3 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
4 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
5 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
6 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
7 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
8 |
""" |
0 | 9 |
sql('''CREATE AGGREGATE group_concat ( |
10 |
basetype = anyelement, |
|
11 |
sfunc = array_append, |
|
12 |
stype = anyarray, |
|
13 |
finalfunc = comma_join, |
|
14 |
initcond = '{}' |
|
15 |
)''') |
|
16 |
||
17 |
sql('''CREATE FUNCTION text_limit_size (fulltext text, maxsize integer) RETURNS text AS $$ |
|
18 |
BEGIN |
|
19 |
RETURN limit_size(fulltext, 'text/plain', maxsize); |
|
20 |
END |
|
21 |
$$ LANGUAGE plpgsql; |
|
22 |
''') |
|
23 |
||
24 |
||
25 |
synchronize_rschema('bookmarked_by') |