title: Postgres bytea column is returning string (char array) instead of byte array
body: <p>I have been using C# to write a concrete provider implementation for our product for different databases. W/out getting into details, one of the columns is of byte array type (bytea in postgres - due to the preferences bytea was chosen over blob). The only problem, is that it does not return same value that was inserted. When I insert Int32 ("0") I get 8 [92 and 8x 48] (instead of [0,0,0,0]). I need a performance wise solution, that will return pure bytes I have inserted, instead of ASCII representation of value "0" on 8 bytes. </p>
  
  <p>I am using Npgsql to retrive data. If someone knows solution for c# I will be happy to learn it as well.</p>
  
  <p><strong>Edit:</strong>
  Postgres 9.0, .Net 3.5</p>
  
  <p>Simplification</p>
  
  <p>Command query: - inside it only does an insert statment</p>
  
  <pre><code>select InsertOrUpdateEntry(:nodeId, :timeStamp, :data)
  </code></pre>
  
  <p>Data parameter:</p>
  
  <pre><code>byte [] value = BitConverter.GetBytes((int)someValue);
  </code></pre>
  
  <p>Parameter is assigned as below</p>
  
  <pre><code>command.Parameters.Add(new NpgsqlParameter("data", NpgsqlDbType.Bytea) 
  { Value = value });
  </code></pre>
  
  <p>Select statments:</p>
  
  <pre><code>select * from Entries
  </code></pre>
  
  <p>Same byte array I have entered, I want to get back. I would really appreciate your help.</p>
  
  <p>Input: 0 0 0 0 <br />
  Current Output: 92 48 48 48 48 48 48 48 48 <br />
  Expected Output: 0 0 0 0 <br /></p>