New answers tagged

3

In short, you want to prove that: bitand(x,y) + bitor(x,y) = x + y Split the x and y numbers into the respective bits. Now, lets prove first that the same stands for bits a and b (a and b can only have the values 0and 1): bitand(a,b) + bitor(a,b) = a + b But for bits these are trivial: bitand(a,b) = least(a,b) bitor(a,b) = greatest(a,b) Therefore (...


3

Explanation I'm going to step through the multiple layers of misunderstandings one by one - arriving at a simple, secure solution. 0. The reason why overlay is escaped is not because it's a function name, but because it's a reserved word. Also, overlay() is not a "PL/pgSQL function" (nor PL/pgSQL keyword), it's a standard SQL function built into the ...


1

The only way I could think was to wrap the call to the format function in a translate as follows: RETURN translate(format('%I_new',old_name),'"',''); This post processes the output of the format and strips the " characters out. I don't know if anybody has a more elegant solution. I thought of btrim, rtrim etc...but it would need a call to each.



Top 50 recent answers are included