Key violation. ERROR: type "lo" does not exist. - Mailing list pgsql-hackers

From Fernando.Figueiredo@vivo.net.br
Subject Key violation. ERROR: type "lo" does not exist.
Date
Msg-id 06AAC9BEDC6A9E4B88D28FF1035B87874C5480@cabaksede01.tco.net.br
Whole thread Raw
Responses Re: Key violation. ERROR: type "lo" does not exist.
List pgsql-hackers
Hi ,
 
I need to insert in one database archives JPG.  I am using C++Builder.  How I could make this?
 
I created the following table:
 
CREATE TABLE tbimagens
(
  callid numeric(11) ,
  imagem bytea
)
 
E I try to insert given of the following form:
 
        TQuery *q;
        q = new TQuery(FDatabase1);
        try
        {
            q->DatabaseName = FDatabase1->DatabaseName;
            q->Close();
            q->SQL->Clear();
            q->SQL->Add("insert into tbimagens (callid,imagem) ");
            q->SQL->Add("values (:callid,:imagem) ");
            q->ParamByName("callid")->AsInteger = callid;
            q->ParamByName("imagem")->LoadFromFile(filename,ftBlob);
            q->Prepare();
            q->ExecSQL();
            q->Close();
        }__finally
        {
            delete q;
        }
I receive the mesagem from error: Key violation. ERROR: type "lo" does not exist.
 
Can You help me ? Thank You.
 
ASS: Fernando.
 
 
> --> 
> Hello everyone,

> I have created a table as follows:

> CREATE TABLE document (
> image_id int,
> image bytea
> );

> I want to insert a complete file, let's say an open office document
> into this table.  Anyone know how I would doe this?

You need to use the bytea functions allocated to your language API.
Which language are you using for this?

 
 

pgsql-hackers by date:

Previous
From: Katherine Stoovs
Date:
Subject: tuning seqscan costs
Next
From: Douglas McNaught
Date:
Subject: Re: Key violation. ERROR: type "lo" does not exist.