Re: pg/plsql question - Mailing list pgsql-general

From John DeSoi
Subject Re: pg/plsql question
Date
Msg-id B6942917-9562-11D9-9497-000A95B03262@pgedit.com
Whole thread Raw
In response to pg/plsql question  (Fred Blaise <fred.blaise@excilan.com>)
Responses Re: pg/plsql question
List pgsql-general
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

>
> 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;

This will write to the PostgreSQL log. Be sure to declare t -- this may
be one of your problems.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpython function problem workaround
Next
From: Tom Lane
Date:
Subject: Re: Filesystem level backup and 32 / 64 bit