Re: Divergences in view source code - both servers 9.3.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Edson Richter <edsonrichter(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Divergences in view source code - both servers 9.3.5
Date: 2014-12-08 18:53:35
Message-ID: 31674.1418064815@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Edson Richter <edsonrichter(at)hotmail(dot)com> writes:
> I do have two servers running 9.3.5.
> One server is CentOS 6.5 x64 with all updates.
> The other server is Ubuntu 14.04-1 x64 with all updates.
> Both run PostgreSQL 9.3.5 x64 - one installed using YUM, other with APT.

> When I compare source code of the same view, I get the following
> differences:

> *_On "Ubuntu" server:_*

> ( ( ( ( select
> e.id,
> e.nome as "empresa",
> '1. nfe'::text as "tipo",
> ( select sum(arquivosimportados.contasucesso) as sum

> _*On CentOS server:*_

> select
> e.id,
> e.nome as "empresa",
> '1. nfe'::text as "tipo",
> ( select sum(arquivosimportados.contasucesso) as sum

> Why does the same CREATE VIEW statement result in different source codes
> in the server side?

You've not shown us the whole output, but is this the first select
in a UNION (or INTERSECT or EXCEPT) nest? If so, I'll bet a nickel
that that Ubuntu server is not actually running 9.3.5; try
"select version()" to confirm. The CentOS server is returning what
I'd expect after commit 0652d77fb067137be22dc3e42aa60bffa26726ac.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2014-12-08 19:09:00 Re: Divergences in view source code - both servers 9.3.5
Previous Message Jeff Janes 2014-12-08 18:17:37 Re: Speeding up an in-progress wraparound-preventing vacuum