title: Single quote in JSON field POSTGRESQL
body: <p>I am trying to manipulate a JSON with a single quote inside, and I am having some troubles:</p>
  
  <p>1.- When I have a function, I cant pass as parameter a JSON string with a single quote inside: 
  This is the function:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION public.give_me_text
  (
    IN  text  json
  )
  RETURNS JSON AS
  $$
  DECLARE
  v_text   varchar;
  begin
  
  RAISE NOTICE 'text: %', text;
  v_text:=text || '- hello';
  return v_text;
  end
  $$
  LANGUAGE 'plpgsql';
  </code></pre>
  
  <p>By calling like this is working:</p>
  
  <pre><code>SELECT * FROM give_me_text
  (
  '{"es":"name 1","en":"name 2","de":"name 3","fr":"name 4","pt":"name 5"}'
  );
  </code></pre>
  
  <p>But when I have got a single quote is not working:</p>
  
  <pre><code>SELECT * FROM give_me_text
      (
      '{"es":"nam'e 1","en":"name 2","de":"name 3","fr":"name 4","pt":"name 5"}'
      );
  </code></pre>
  
  <p>2.- When I am tryhing to insert JSON value with Single quote inside, it is giving me the same error:
  This is working:</p>
  
  <pre><code>INSERT INTO public.my_columns VALUES ('{ "name": "Book the First", "author": { "first_name": "Bob", "last_name": "White" } }');
  </code></pre>
  
  <p>But this is not working:</p>
  
  <pre><code>INSERT INTO public.my_columns VALUES ('{ "name": "Book's the First", "author": { "first_name": "Bob", "last_name": "White" } }');
  </code></pre>
  
  <p>Any ideas how to escape this single quote? Thanks</p>