Re: [NOVICE] DB insert Error

From: "Jasbinder Bali" <jsbali(at)gmail(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] DB insert Error
Date: 2006-08-16 18:42:46
Message-ID: a47902760608161142x4e3cf257v3b43e5c38a01057@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Tried everthing but nothing seems to work.
:(

On 8/16/06, Jasbinder Bali <jsbali(at)gmail(dot)com> wrote:
>
> Also, i tried to mannualy run the insert query in the query tool
>
> ------------------------------------------------------------
>
> insert into raw_email ( id , raw_email ) values ( 1 , 'From
> simon(at)simon-cozens(dot)org Tue Apr 15 20:24:47 2003
> X-MultiHeader: one
> X-MultiHeader: two
> X-MultiHeader: three
> From: Simon Cozens <simon(at)simon-cozens(dot)org>
> To: test
> Bcc: simon(at)twingle(dot)net
> Subject: foo
> Mime-Version: 1.0
> Content-Type: image/gif
> Content-Disposition: attachment; filename="1.gif"
> Content-Transfer-Encoding: base64
> X-Operating-System: Linux deep-dark-truthful-mirror 2.4.9
> X-POM: The Moon is Waxing Gibbous (98% of Full)
> X-Addresses: The simon(at)cozens(dot)net address is deprecated due to being
> broken. simon(at)brecon(dot)co(dot)uk still works, but simon-cozens.org or
> netthink.co.uk are preferred.
> X-Mutt-Fcc: =outbox-200304
> Status: RO
> Content-Length: 1205
> Lines: 17
>
> R0lGODlhDAAMAPcAAAAAAAgICBAQEBgYGCkpKTExMTk5OUpKSoyMjJSUlJycnKWlpbW1tc7O
> zufn5+/v7/f39///////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> ////////////////////////////////////////////////////////////////////////
> /////////////////////////////////ywAAAAADAAMAAAIXwAjRICQwIAAAQYUQBAYwUEB
> AAACEIBYwMHAhxARNIAIoAAEBBAPOICwkSMCjBAXlKQYgCMABSsjtuQI02UAlC9jFgBJMyYC
> CCgRMODoseFElx0tCvxYIEAAAwkWRggIADs=
>
> ' )
>
>
> ------------------------------------------------------------
>
> But it doesn't store the full raw_email field contents
>
> raw_email field has just the follwing stored in it
>
> -----------------------------------------------
> "From simon(at)simon-cozens(dot)org Tue Apr 15 20:24:47 2003
> X-MultiHeader: one
> X-MultiHeader: two
> X-MultiHeader: three
> From: Simon Cozens <simon(at)simon-cozens(dot)org>
> To: test
> Bcc: simon(at)twingle(dot)net
> Subject: foo
> Mime-Version: 1.0
> Content-Type: image/gif
> Content-Dispo (..)"
> -----------------------------------------------
>
> Also, as i've already told, even after i commit my transaction, it doesn't
> insert the record.
>
> Thanks,
> ~Jas
>
> On 8/16/06, Jasbinder Bali <jsbali(at)gmail(dot)com> wrote:
>
> > I did commit the transaction by writing
> EXEC SQL COMMIT; right after the insert statement.
>
> Then also its not inserting the record and says:
> [2998]: ECPGexecute line 97 Ok: INSERT 0 1
> and SQLCODE is still 0
>
> ~Jas
>
> On 8/1/06, Michael Fuhr < mike(at)fuhr(dot)org> wrote:
>
> > On Wed, Aug 16, 2006 at 01:46:30AM -0400, Jasbinder Bali wrote:
> > > I changed the datatype from varchar[] to varchar
> > > ECPGdebug(1,stderr) says
> > > [2998]: ECPGexecute line 97 Ok: INSERT 0 1
> > >
> > > Its not inserting any record even though sqlcode is 0.
> >
> > Are you committing the transaction? See the bottom of the
> > following page:
> >
> > http://www.postgresql.org/docs/8.1/interactive/ecpg-commands.html
> >
> > "In the default mode, statements are committed only when EXEC SQL
> > COMMIT is issued."
> >
> > --
> > Michael Fuhr
> >
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Curtis Scheer 2006-08-16 19:36:44 Re: plpgsql dynamic queries and optional arguments
Previous Message Julian Scarfe 2006-08-16 18:41:52 Re: Timezones -- what comes out does not go in?

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2006-08-16 19:48:50 Re: [NOVICE] DB insert Error
Previous Message Michael Fuhr 2006-08-16 17:38:41 Re: [NOVICE] DB insert Error