pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: George Woodring <george.woodring@iglass.net>
To: pavel.stehule@gmail.com
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Plpgsql search_path issue going from 9.3 to 9.6
Date: Tue, 13 Nov 2018 06:45:49 -0800
Message-ID: <f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com> (raw)
In-Reply-To: <CACi+J=Q1q6vvYBGeFHR-rNpq4A1J3AX6nsv7TnOB7DdjtubM5w@mail.gmail.com>
References: <CACi+J=TiP-mLHTe9EY=pi8Y1JwnhggKLGWbaRU19txdd1tVCow@mail.gmail.com>
	<CAFj8pRCuA29y=VfT9wGMWDW32-7aNOiPZs3VqkyXWp0ff7wN5w@mail.gmail.com>
	<CACi+J=Q1q6vvYBGeFHR-rNpq4A1J3AX6nsv7TnOB7DdjtubM5w@mail.gmail.com>

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




view thread (11+ messages)  latest in thread

Message-ID: <f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com>
Permalink:  ../f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com/
Also on:    postgresql.org/message-id/f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, george.woodring@iglass.net, pavel.stehule@gmail.com
  Subject: Re: Plpgsql search_path issue going from 9.3 to 9.6
  In-Reply-To: <f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com>
  References: <CACi+J=TiP-mLHTe9EY=pi8Y1JwnhggKLGWbaRU19txdd1tVCow@mail.gmail.com> <CAFj8pRCuA29y=VfT9wGMWDW32-7aNOiPZs3VqkyXWp0ff7wN5w@mail.gmail.com> <CACi+J=Q1q6vvYBGeFHR-rNpq4A1J3AX6nsv7TnOB7DdjtubM5w@mail.gmail.com> <f9c5644c-bf68-19a8-e563-21cdf642e95f@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox