Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CB9319FB255 for ; Fri, 2 Feb 2007 09:08:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 68700-06 for ; Fri, 2 Feb 2007 09:08:18 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by postgresql.org (Postfix) with ESMTP id 46A929FA6B5 for ; Fri, 2 Feb 2007 09:08:18 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so671770ugf for ; Fri, 02 Feb 2007 05:08:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=oSz/50zEDXaFMZFnOH+N0b4KiFfWzaNw29jy3dkZfwAt7iHdyFJPtxciMmU5ZGW5V+6YLfR03NIFVu2+nwqwFkXgXuPAwbc2iMOeIXWHxIWA/gbXTG8fdll7kAihTDZRymTxqiLc29VhE1MkVdjSdiHuyeV4f/iA4e7d+TCapnA= Received: by 10.66.252.4 with SMTP id z4mr4367018ugh.1170421696243; Fri, 02 Feb 2007 05:08:16 -0800 (PST) Received: by 10.66.217.13 with HTTP; Fri, 2 Feb 2007 05:08:16 -0800 (PST) Message-ID: <55c095e90702020508o70a561ffl8306739f311b8807@mail.gmail.com> Date: Fri, 2 Feb 2007 11:08:16 -0200 From: "Ezequias Rodrigues da Rocha" To: pgsql-sql@postgresql.org Subject: Insert into a date field MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19879_20081325.1170421696196" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/7 X-Sequence-Number: 27341 ------=_Part_19879_20081325.1170421696196 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list, I am trying to insert a record in a table with a date field but the postgresql reports me the following error: ERROR: column "data_nascimento" is of type date but expression is of type integer SQL state: 42804 Hint: You will need to rewrite or cast the expression. I tryed like this: '1963-09-01' '1963-09-01'::date 1963-09-01 And notthing Thanks in advance. --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_19879_20081325.1170421696196 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list,

I am trying to insert a record in a table with a date field= but the postgresql reports me the following error:

ERROR: column &q= uot;data_nascimento" is of type date but expression is of type integer
SQL state: 42804
Hint: You will need to rewrite or cast the expressi= on.


I tryed like this:


'1963-09-01'
'1= 963-09-01'::date
1963-09-01

And notthing
Thanks in advance.
--
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D
          = ;            &n= bsp;           Atenc= iosamente (Sincerely)
        &n= bsp;            = ;   Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
A pior das democracias ainda =E9 melhor do que a melhor das ditadurasThe worst of democracies is still better than the better of dictatorships=
http://ezequiasrocha.blo= gspot.com/ ------=_Part_19879_20081325.1170421696196--