Divergences in view source code - both servers 9.3.5

Started by Edson Richterover 11 years ago4 messagesgeneral
Jump to latest
#1Edson Richter
edsonrichter@hotmail.com

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?

Regards,

--
Atenciosamente,

Edson Carlos Ericksson Richter

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Edson Richter (#1)
Re: Divergences in view source code - both servers 9.3.5

Edson Richter <edsonrichter@hotmail.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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Edson Richter
edsonrichter@hotmail.com
In reply to: Tom Lane (#2)
Re: Divergences in view source code - both servers 9.3.5

Right, Tom! (again :-) )
Ubuntu is running 9.3.4 (I've installed 9.3.5 - but for some reason, it
have not started).
I suppose I'll uninstall 9.3.4 and then install 9.3.5. Since it is a
development machine, I can do that safely.

Thanks for your fast and precise answer, as always!

Atenciosamente,

Edson Carlos Ericksson Richter

On 08-12-2014 16:53, Tom Lane wrote:

select version()

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Edson Richter (#3)
Re: Divergences in view source code - both servers 9.3.5

Edson Richter <edsonrichter@hotmail.com> writes:

Ubuntu is running 9.3.4 (I've installed 9.3.5 - but for some reason, it
have not started).

You probably just didn't restart the server after updating the package.
I know that on Red Hat it's not customary for package updates to forcibly
restart daemons, and the same is likely true on Debian derivatives.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general