title: Change column datatype from String to Float in Postgres. Error
body: <p>I have two columns of latitude and longitude in a table with the column datatypes as string. There also some entries which are 'blank' but I think saved as a &quot;&quot; string.</p>
  <p>I have had a look through the some of the similar questions here but I can't find an exact answer.</p>
  <p>When I try to alter the column datatype I get the following error.</p>
  <pre><code>ALTER TABLE listings ALTER COLUMN latitude TYPE FLOAT USING latitude::float;                                                                                                                                
  ERROR:  invalid input syntax for type double precision: &quot;&quot;
  </code></pre>
  <p>I think this is because the blanks/nulls are being considered as a string &quot;&quot;.</p>
  <p>Whats the best way to deal with this?</p>
  <p>Thanks</p>