Re: pg/plsql question

From: Fred Blaise <fred(dot)blaise(at)excilan(dot)com>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg/plsql question
Date: 2005-03-15 15:19:16
Message-ID: 1110899956.3954.12.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2005-03-15 at 09:58 -0500, John DeSoi wrote:
> Hi Fred,
>
> On Mar 15, 2005, at 9:35 AM, Fred Blaise wrote:
>
> > I am trying to grant privs to a user on all tables. I think I
> > understood
> > there was no command to do that.... :// so I wrote the following:
>
> You can find some code to do this here:
>
> http://pgedit.com/node/view/20
nice :)
>
> >
> > I then login to psql, and do a \i myscript.sql. It returns CREATE
> > FUNCTION, but I cannot see anything. The tables are not granted, etc...
> > Also I am trying to find out how to debug this. How can I print out to
> > STDOUT the value of t for example?
> >
>
>
> Unfortunately, you can't print to stdout because the procedure is
> executed on the database server. About the best you can do is to is to
> use a raise log statement:
>
> raise log ''t is %'', t;
Yes, that's what I thought... but oddly nothing gets written. I see
other things get written to the postgres log, but not those. I have
tried raise log and raise notice.
>
> This will write to the PostgreSQL log. Be sure to declare t -- this may
> be one of your problems.
Declared now as varchar.

Just to make sure... Once the function is created, you would call it as
'execute function()' from psql, correct?
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
Thanks a lot

fred

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2005-03-15 15:24:16 Re: pg/plsql question
Previous Message Alvaro Herrera 2005-03-15 15:17:19 Re: plpython function problem workaround