1

When I fire below query on one of our servers

     select null || 'query' ,'|',version

the result is null nothing is displayed

when i fire the same query on another server which has same version of postgresql server

I am getting result as

 query

postgres version on both servers are

  1. EnterpriseDB 9.2.1.3 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 32-bit
  2. EnterpriseDB 9.2.1.3 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 64-bit

Why this different behavior?

Milen A. Radev
  • 60,241
  • 22
  • 105
  • 110
Raj Pannala
  • 67
  • 1
  • 9
  • 1
    These are not both PostgreSQL. They are both EnterpriseDB. Do you also have any Oracle-compatibility enabled on one and not the other? I also think you've missed off two columns of results from your query. – Richard Huxton Nov 22 '13 at 07:28
  • yeah those are EnterpriseDBs and the version column in the query is giving the version that is there at the end in my question . Problem is with first column. can you please tell me How can i check the oracle compatability? – Raj Pannala Nov 22 '13 at 07:40

1 Answers1

2

Check the setting of edb_redwood_strings parameter on both servers.

See more Oracle Compatible Configuration Parameters

edb_redwood_strings – Equates NULL to an empty string for purposes of string concatenation operations. For Oracle compatible behavior, set edb_redwood_strings to TRUE.

SET edb_redwood_strings TO off; -- or on
peterm
  • 91,357
  • 15
  • 148
  • 157