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 16:00:55
Message-ID: a47902760608160900u292010c9pf4d17884c1d19c04@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

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 Guy Rouillier 2006-08-16 16:37:23 Re: [NOVICE] DB insert Error
Previous Message Harpreet Dhaliwal 2006-08-16 15:55:39 Triggers invoking a stored procedure or a C function

Browse pgsql-novice by date

  From Date Subject
Next Message Guy Rouillier 2006-08-16 16:37:23 Re: [NOVICE] DB insert Error
Previous Message Jasbinder Bali 2006-08-16 15:40:40 Re: [NOVICE] DB insert Error