On April 9, 2003 09:35 am, Richard Huxton wrote:
> On Wednesday 09 Apr 2003 12:25 pm, Joshua Moore-Oliva wrote:
> > I needed to apply this... for some reason when I do timetamp related
> > queries without executing that a segfault occurs.
> >
> > UPDATE pg_proc SET prorettype = 1114 WHERE prosrc = 'timestamptz_izone';
>
> Hmm - mine reads 1186 (interval). Two questions:
>
> 1. Did you notice what value it had before?
Yea it had an interval before.
> 2. Have you made the same change in template0/1 (and what values did they
> have)?
no I didn't touch template 0 or 1, but it just dawned on me that doing so may
save a step for me having to run that command with every database I install.
>
> Actually, a third question: how did you ever figure that out?
A whle ago I had this problem..
SELECT now() AT TIME ZONE interval '-5 hours'
returns type interval not timestamp with//out time zone.
A prety knowledgable guy Tom Lane suggested the above fix.
When I was getting a segfault on a query similar to that it dawned on me that
i may need to run that command again since I had moved the database to a new
server, and presto it worked :)
Josh.