Here, I have a problem in the va开发者_运维问答lue from trim()
function in PostgreSQL
:
Ruby
code:
if(this.modelName=="ClientOffice")
{ this.params="model_name="+this.modelName+"&action_name="+this.actionName+"&
find_condition=btrim(clients_corporate_billings.id,' ') %3D
btrim('"+validString('populateValue0','text')+"',' ')
& object_id="+this.objectId;
}
&action_name="+this.actionName+"
&find_condition=btrim(clients_corporate_billings.id,' ') %3D
btrim('"+validString('populateValue0','text')+"',' ')
In above code, btrim
is function
of PostgreSQL for trimming but it gives/produce error.
From the documentation.
Function: btrim(string text [, characters text])
Return Type: text
Description: Remove the longest string consisting only of characters in characters (a space by default) from the start and end of string
Example: btrim('xyxtrimyyx', 'xy')
Result: trim
So you need to cast as text:
&find_condition=btrim(clients_corporate_billings.id::text,' ') %3D
精彩评论