mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-28 17:38:54 +01:00
Quote reserver 'type' keyword for pgsql to fix e300f80
This commit is contained in:
parent
e300f8095d
commit
3820aaa421
@ -202,7 +202,7 @@ get_subnodes_tree(Host, Node) ->
|
|||||||
?SQL("select @(node)s, @(parent)s, @(type)s, @(nodeid)d from "
|
?SQL("select @(node)s, @(parent)s, @(type)s, @(nodeid)d from "
|
||||||
"pubsub_node where host=%(H)s"
|
"pubsub_node where host=%(H)s"
|
||||||
" and node like %(N)s escape '^'"
|
" and node like %(N)s escape '^'"
|
||||||
" and type='hometree'"))
|
" and \"type\"='hometree'"))
|
||||||
of
|
of
|
||||||
{selected, RItems} ->
|
{selected, RItems} ->
|
||||||
[raw_to_node(Host, Item) || Item <- RItems];
|
[raw_to_node(Host, Item) || Item <- RItems];
|
||||||
@ -264,7 +264,7 @@ delete_node(Host, Node) ->
|
|||||||
catch ejabberd_sql:sql_query_t(
|
catch ejabberd_sql:sql_query_t(
|
||||||
?SQL("delete from pubsub_node where host=%(H)s"
|
?SQL("delete from pubsub_node where host=%(H)s"
|
||||||
" and (node=%(Node)s"
|
" and (node=%(Node)s"
|
||||||
" or (type = 'hometree' and node like %(N)s escape '^'))")),
|
" or (\"type\"='hometree' and node like %(N)s escape '^'))")),
|
||||||
Removed.
|
Removed.
|
||||||
|
|
||||||
%% helpers
|
%% helpers
|
||||||
|
Loading…
Reference in New Issue
Block a user