Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
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 7: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? –  RAJASEKHAR Nov 22 '13 at 7:40

1 Answer 1

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
share|improve this answer
    
yeah it was 'ON' on one server 'Off' on the other Thanks, Peter.. I can't vote up. My reputation is too low –  RAJASEKHAR Nov 22 '13 at 8:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.