Re: Unexpected error in grant/revoke script

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Unexpected error in grant/revoke script
Date: 2008-03-14 17:37:44
Message-ID: 20080314173744.GA6002@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Fri, dem 14.03.2008, um 10:00:05 -0700 mailte Webb Sprague folgendes:
> Hi all,
>
> I have the following function:
>
> create function new_student (text) returns text as $$
> declare
> wtf integer := 1;
> begin
> execute 'create schema ' || $1;
> execute 'create role ' || $1 || 'LOGIN';

Assume, $1 contains 'foobar', you create role 'foobarlogin' now. Insert
a space before 'LOGIN' -> ' LOGIN'.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2008-03-14 17:57:33 Re: postgre vs MySQL
Previous Message Tom Lane 2008-03-14 17:32:22 Re: Unexpected error in grant/revoke script