Re: Plpgsql search_path issue going from 9.3 to 9.6

From: George Woodring <george(dot)woodring(at)iglass(dot)net>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pavel(dot)stehule(at)gmail(dot)com, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Plpgsql search_path issue going from 9.3 to 9.6
Date: 2018-11-13 14:54:38
Message-ID: CACi+J=R2GSam6cyNxSQLMDbnhh9rnDYJa+_PB=JYp2+ge36Usg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The tickets view restricts which tickets can be seen by the schema.

9.3 must have created the view in the same column order as the table (which
is the case looking at one of our 9.3 databases which we have not updated
yet), which is why we never saw the issue before.

George
iGLASS Networks
www.iglass.net

On Tue, Nov 13, 2018 at 9:46 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 11/13/18 6:27 AM, George Woodring wrote:
> > I think the issue is that the function is not putting the data into the
> > tickets%ROWTYPE correctly. When I do \d on public.tickets and
> > iss-hackers.tickets, the columns are in a different order.
> >
>
> >
> > The error message is saying column2 is not a timestamp, which the public
> > table is a timestamp for column2. If I change my SELECT in the function
> > from SELECT * to SELECT opendate I can fix my issue easily.
>
> Or change this:
>
> SELECT * INTO ticket FROM tickets WHERE ticketsid=tid;
>
> to:
>
> SELECT * INTO ticket FROM public.tickets WHERE ticketsid=tid;
>
> This will match the ROWTYPE:
>
> ticket public.tickets%ROWTYPE;
>
> >
> > George
> > iGLASS Networks
> > www.iglass.net <http://www.iglass.net>
> >
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-11-13 15:32:53 Re: Plpgsql search_path issue going from 9.3 to 9.6
Previous Message Adrian Klaver 2018-11-13 14:45:49 Re: Plpgsql search_path issue going from 9.3 to 9.6