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?

2
  • 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. Commented Nov 22, 2013 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? Commented Nov 22, 2013 at 7:40

1 Answer 1

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
1
  • yeah it was 'ON' on one server 'Off' on the other Thanks, Peter.. I can't vote up. My reputation is too low Commented Nov 22, 2013 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.