Re: Plpgsql search_path issue going from 9.3 to 9.6 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Plpgsql search_path issue going from 9.3 to 9.6
Date
Msg-id f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com
Whole thread Raw
In response to Re: Plpgsql search_path issue going from 9.3 to 9.6  (George Woodring <george.woodring@iglass.net>)
Responses Re: Plpgsql search_path issue going from 9.3 to 9.6
List pgsql-general
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.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Plpgsql search_path issue going from 9.3 to 9.6
Next
From: George Woodring
Date:
Subject: Re: Plpgsql search_path issue going from 9.3 to 9.6