Re: Need feedback on new feature (\for)

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Scott Lamb <slamb(at)slamb(dot)org>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need feedback on new feature (\for)
Date: 2003-08-18 15:33:50
Message-ID: 20030818083253.Q27257-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 18 Aug 2003, Scott Lamb wrote:

> Martijn van Oosterhout wrote:
>
> > On Sun, Aug 17, 2003 at 02:04:03PM -0600, Scott Lamb wrote:
> >
> >>Martijn van Oosterhout wrote:
> >>
> >>>grant select on ":2" to ":1"
> >>>\for select usename, relname from pg_catalog.pg_user, pg_catalog.pg_class
> >>>where relname not like 'pg_%';
> >>
> >>That's definitely a useful thing to do, but I'm not sure I like your
> >>syntax. As someone else mentioned, the ":2" is confusing; it's like a
> >>bind variable, but isn't. And real bind variables don't work, as you are
> >>substituting identifiers, not literals.
> >>
> >>You're not completely out in the cold doing something like this without
> >>a patch. Right now, I believe you can do something like (in Oracle
> >>PL/SQL-ish syntax; it's more familiar to me):
> >
> >
> > Hmm, I didn't know you could execute pl/sql from the prompt like that.
> > Still, I was looking for something that was short and easy to type. Not to
> > mention something I can remember :)
>
> You can in Oracle, so I can assume you can in PostgreSQL, too, but the
> exact syntax escapes me.

AFAIK there isn't a way to do that currently apart from generating a
function, calling it, and dropping it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2003-08-18 15:34:06 Re: Simulating sequences
Previous Message Dennis Gearon 2003-08-18 15:13:25 Re: Simulating sequences