title: Handling a mixture of encrypted and unencrypted data in a column
body: <p>i was trying to used encryption on my Postgres site, but then again I came a cross some issues about on "ERROR: decrypt error: Data not a multiple of block size". I'm afraid I might have a problem to this issues in the near future. I noticed that when I save a text on the db which was not encrypted the errors occurs. I'll be using some codeigniter on my site, but the problem since we are seven on the team, probably someone will accidentally not encrypted and save on the databased. And these issues will occur again I don't know what to do when that situation comes.</p>
  
  <p>MY option was to delete manually on the database which data was not encrypted, but the problem is when that happens, what if db data was around 60,000 and if we try to check which part were going to delete will take us time to determine which was not encrypted. Please advice sorry for wrong grammar.</p>
  
  <p>Using PostgreSQL 9.3.5</p>
  
  <p>My QUERY Code</p>
  
  <pre><code>INSERT INTO table (text) VALUES (encrypt('my encrypt text here','secretkey','aes'));
  </code></pre>
  
  <p>When displaying a query.</p>
  
  <pre><code>SELECT decrypt(text,'secretkey','aes') from table
  </code></pre>
  
  <p>But when someone accidentally insert some table without "encrypt" , ERROR: decrypt error: Data not a multiple of block size.Anybody can enlighten me.</p>