473,511 Members | 17,673 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

restore error - language "plperlu" is not trusted

Greetings,

I just had to dump and restore one of my DBs (7.4RC2), and I got an
interesting message.

I first did:

pg_dump dbname > db_restore.sql

Then at console did the following:

\i db_restpre.sql

which performed everything as expected with the following ERROR
message:

ERROR: language "plperlu" is not trusted

and it gave a line number, which contained the following:

GRANT ALL ON LANGUAGE plperlu TO postgres WITH GRANT OPTION;

Now, my plperlu functions seem to behaving as expected (they read from
and write to /tmp). Should I be worried?

Cheers,

Chris

--
Christopher Murtagh
Enterprise Systems Administrator
ISR / Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax: (514) 398-2017

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #1
7 3030
On 17 Dec 2003, Christopher Murtagh wrote:
Greetings,

I just had to dump and restore one of my DBs (7.4RC2), and I got an
interesting message.

I first did:

pg_dump dbname > db_restore.sql

Then at console did the following:

\i db_restpre.sql

which performed everything as expected with the following ERROR
message:

ERROR: language "plperlu" is not trusted

and it gave a line number, which contained the following:

GRANT ALL ON LANGUAGE plperlu TO postgres WITH GRANT OPTION;

Now, my plperlu functions seem to behaving as expected (they read from
and write to /tmp). Should I be worried?


Did you install plperlu ahead of time as the super user, then run your
restore as the regular database owner?
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #2
On Wed, 2003-12-17 at 10:55, scott.marlowe wrote:
which performed everything as expected with the following ERROR
message:

ERROR: language "plperlu" is not trusted

and it gave a line number, which contained the following:

GRANT ALL ON LANGUAGE plperlu TO postgres WITH GRANT OPTION;

Now, my plperlu functions seem to behaving as expected (they read from
and write to /tmp). Should I be worried?


Did you install plperlu ahead of time as the super user, then run your
restore as the regular database owner?


No, I hadn't, I guess I had assumed that the restore would do that.
More interestingly, I did the restore on a different
machine/architecture (PPC instead of Intel) running 7.4 final release
(instead of RC2) and I didn't get the error message. However all of my
plperlu triggers seem to behaving normally. When I tried to install
plperlu afterwards I got this:

createlang plperlu a
createlang: language "plperlu" is already installed in database "a"

Hrm... Ah well. I'll know for next time to install the language first,
I just hope it won't bit me in the ass before then. :-)

Cheers,

Chris

--
Christopher Murtagh
Enterprise Systems Administrator
ISR / Web Communications Group
McGill University
Montreal, Quebec
Canada

Tel.: (514) 398-3122
Fax: (514) 398-2017

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #3
Christopher Murtagh <ch*****************@mcgill.ca> writes:
[ pg_dump script failed with ]
ERROR: language "plperlu" is not trusted
and it gave a line number, which contained the following:
GRANT ALL ON LANGUAGE plperlu TO postgres WITH GRANT OPTION;


Hm. The backend flat-out rejects all attempts at GRANT on untrusted
languages, even if you are superuser and the grantee is too. I'm not
totally sure about the rationale for that (Peter?) but in any case
pg_dump has evidently not gotten the word. If we think the backend's
behavior is right then we'd better change pg_dump to suppress trying
to GRANT permissions on untrusted languages.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #4
Tom Lane wrote:
Hm. The backend flat-out rejects all attempts at GRANT on untrusted
languages, even if you are superuser and the grantee is too. I'm not
totally sure about the rationale for that (Peter?)
Why would you need it? It's only going to create fuss about useless
functionality.
but in any case
pg_dump has evidently not gotten the word. If we think the backend's
behavior is right then we'd better change pg_dump to suppress trying
to GRANT permissions on untrusted languages.


There should not be any permissions, so there should be nothing to dump.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #5
Peter Eisentraut <pe*****@gmx.net> writes:
Tom Lane wrote:
pg_dump has evidently not gotten the word. If we think the backend's
behavior is right then we'd better change pg_dump to suppress trying
to GRANT permissions on untrusted languages.
There should not be any permissions, so there should be nothing to dump.


Uh, no, because you can say something like
revoke all on language plperlu from public;
and end up with non-null lanacl (because it instantiates the default
assumption that the owner has all privileges).

We could possibly hack the backend to avoid that, but I think pg_dump
will need the special-case test anyway since it has to be able to cope
with existing databases, wherein lanacl may be non-null.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #6
Tom Lane wrote:
Uh, no, because you can say something like
revoke all on language plperlu from public;
and end up with non-null lanacl (because it instantiates the default
assumption that the owner has all privileges).
OK, that needs to be disallowed.
We could possibly hack the backend to avoid that, but I think pg_dump
will need the special-case test anyway since it has to be able to
cope with existing databases, wherein lanacl may be non-null.


So far we know of 1 such database. I'd like to see some more before we
bother about it.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #7
Peter Eisentraut <pe*****@gmx.net> writes:
Tom Lane wrote:
Uh, no, because you can say something like
revoke all on language plperlu from public;
and end up with non-null lanacl (because it instantiates the default
assumption that the owner has all privileges).
OK, that needs to be disallowed.
Fair enough. I thought it was a bit odd to disallow GRANT but allow
REVOKE anyway.
We could possibly hack the backend to avoid that, but I think pg_dump
will need the special-case test anyway since it has to be able to
cope with existing databases, wherein lanacl may be non-null.

So far we know of 1 such database. I'd like to see some more before we
bother about it.


It's a one-line addition --- just put the dumpACL call inside
"if (lanpltrusted)". I think it is a reasonable change. We'd have to
do something anyway, because the existing pg_dump code is certainly
broken for dumping untrusted languages from pre-7.3 databases (it
assumes a nonempty lanacl setting in that case).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1613
by: Chris Albertson | last post by:
I do the following as the user "postgres" alberts=# CREATE FUNCTION foobar(CSTRING) alberts-# RETURNS opaque alberts-# AS '$libdir/mystuff' , 'foobar' alberts-# LANGUAGE 'c' alberts-#...
5
33552
by: Thomas LeBlanc | last post by:
I copied an example from the help: CREATE FUNCTION somefunc() RETURNS integer AS ' DECLARE quantity integer := 30; BEGIN RAISE NOTICE ''Quantity here is %'', quantity; -- Quantity here is 30...
3
25602
by: Rituraj Kirti | last post by:
Hi all I am getting the following error when trying to a restore "SQL1035N The database is currently in use.SQLSTATE=57019" Only get this once in a while. I have the following in my script...
1
1591
by: Rahamaz | last post by:
IBM DB2 UDB 7.2 Red Hat Linux 7.3 Restore from backup image on tape returns: db2 "backup db test to /dev/st0 buffer 32" db2 "restore db test from /dev/st0 into test1 buffer 32" SQL2025N An...
6
4907
by: SS | last post by:
Hi I am trying to restore my database in V8 FP8. The first restore attempt failed(because of an incorrect parameter I defined), so I issued the command again(after correction!!). In version 7 this...
0
1708
by: Cláudia Morgado | last post by:
Good afternoon lists! Somebody that it works with the Pl/Phyton language could in helping them? We create the language python, however a common user, does not obtain to create a function using...
0
1262
by: sueamus | last post by:
Hi, Am trying to do a restore of a database but am getting this error " SQL2009C There is no enough memory available to run the utility". When backing up, i increased util_heap_sz and dbheap...
6
26317
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
1
1578
by: tvnaidu | last post by:
Scripts with extension .lua for database update/restore - what language it is?, I can see some functions like C, but not C lang, any idea?
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.