Re: Large Object => invalid input syntax for integer: ""

Поиск
Список
Период
Сортировка
От grupos
Тема Re: Large Object => invalid input syntax for integer: ""
Дата
Msg-id 42A44F4D.8080402@carvalhaes.net
обсуждение исходный текст
Ответ на Re: Large Object => invalid input syntax for integer: ""  (Douglas McNaught <doug@mcnaught.org>)
Ответы Re: Large Object => invalid input syntax for integer: ""  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-general
Hi Doug!

Thanks for your e-mail BUT the point is how I insert data on a table
when the column lo have no value ( NULL), to insert the lo I have no
problem BUT the problem is when the column should have no value...

Regards,

Rodrigo Carvalhaes

Douglas McNaught wrote:

>grupos <grupos@carvalhaes.net> writes:
>
>
>
>>I need to use large objects BUT I am having problemns... I instaled
>>PostgreSQL 8.0.3 windows version with lo module.
>>
>>first, I created the table below:
>>CREATE TABLE test
>>(
>>  description varchar(20),
>>  picture lo
>>)
>>WITHOUT OIDS;
>>
>>After trying to make one insert without value for the lo I get the
>>error below:
>>
>>INSERT INTO test VALUES (1);
>>
>>ERROR:  invalid input syntax for integer: ""
>>
>>
>
>This means you're trying to insert an integer value into the
>"description" column, which is text.  It has nothing to do with large
>objects.
>
>To insert an LO into a database, you do the following:
>
>BEGIN a transaction
>Call lo_create() to make a new large object.  The return value is the
>  OID of the LO, which you will need later.
>Call lo_write() and lo_close() to put data into the LO
>Insert the OID you got from lo_create() in the referencing column
>  ("picture", in your case)
>COMMIT the transaction
>
>It's a little annoying but that's how it works.
>
>-Doug
>
>
>

--
Esta mensagem foi verificada pelo sistema de antivírus e
 acredita-se estar livre de perigo.


В списке pgsql-general по дате отправления:

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: transactions
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Large Object => invalid input syntax for integer: ""