From: | raf(at)raf(dot)org |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Inconsistent compilation error |
Date: | 2018-04-25 11:58:20 |
Message-ID: | 20180425115820.ke6tbyuacxczopqj@raf.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Adrian Klaver wrote:
> On 04/18/2018 06:02 PM, raf(at)raf(dot)org wrote:
> > Hi,
> >
> > postgresql-9.5.12 on debian-9
> >
> > I have a stored function with code that looks like:
> >
> > create or replace function tla_audit_delete_thing()
> > returns boolean stable language plpgsql as $$
> > declare
> > r record;
> > status boolean := 1;
> > begin
> > for r in select _.* from blah_history _ where _.original_id not in (select id from blah)
> > loop
> > raise notice '% %', 'blah_history.original_id', r;
> > status := 0;
> > end loop;
> > [...]
> > end
> > $$
> > security definer
> > set search_path = public, pg_temp;
> > revoke all on function tla_audit_delete_thing() from public;
> > grant execute on function tla_audit_delete_thing() to staff;
>
> So if you cut and paste the above directly into the database via psql on the
> Debian host do you see the same issue?
No. Cutting and pasting the text into psql works fine.
> > And I have a program that loads stored functions from disk
> > when they are different to what's in the database and I have
> > just loaded a very old database backup, brought the schema up
> > to date, and tried to bring the stored functions up to date.
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | raf | 2018-04-25 12:33:11 | Re: Inconsistent compilation error |
Previous Message | raf | 2018-04-25 11:54:01 | Re: Inconsistent compilation error |