Re: Changing user - Mailing list pgsql-general

From Richard Huxton
Subject Re: Changing user
Date
Msg-id 200312161054.25639.dev@archonet.com
Whole thread Raw
In response to Re: Changing user  ("C G" <csgcsg39@hotmail.com>)
List pgsql-general
On Tuesday 16 December 2003 10:12, C G wrote:
> Thanks for your help but I still have a small problem. I'm try to do as you
> suggested and use prepare/execute but I'm doing something silly.
>
> I'm using:
>
> PREPARE my_prep1(name) AS SET SESSION AUTHORIZATION $1;
>
> and get the error message:
> ERROR: syntax error at or near "set" at character 27

You want EXECUTE. Something like:

DECLARE
  set_qty text;
...
set_qry := ''SET SESSION AUTHORIZATION '' || $1;
EXECUTE set_qry;


--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Marek Lewczuk
Date:
Subject: UTF support in WIN32 native and Lower/Upper in 7.5 release
Next
From: "K. Deepa"
Date:
Subject: passing array as argument and returning an array in plpgsql