title: Insert point into a PostGis enabled Postgres db
body: <p>I have this (non working) query:</p>
  
  <pre><code>"INSERT INTO notes (
           lat, 
           lng, 
           point)
        VALUES (
           :lat,
           :lng,
           ST_GeometryFromText('POINT(:lat :lng)'))"
  </code></pre>
  
  <p>Which I am running against this table:</p>
  
  <pre><code>CREATE TABLE notes
  (
    id serial NOT NULL,
    lat real NOT NULL,
    lng real NOT NULL,
    point point NOT NULL,
    CONSTRAINT notes_pkey PRIMARY KEY (id )
  )
  </code></pre>
  
  <p>The query is prepared with PDO (php) but that is not the point I think. The result I get back is an exception claiming that: </p>
  
  <pre><code>SQLSTATE[42804]: Datatype mismatch: 7 ERROR:  column "point" is of type point but expression is of type geometry
  LINE 8:          $8, $9, $10, $11, $12, ST_GeometryFromText('POINT(:...
                                          ^
  HINT:  You will need to rewrite or cast the expression.
  </code></pre>
  
  <p>How can I cast the expression as suggested?</p>