Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-16 Thread Alban Hertroys
> > Caused by: org.postgresql.util.PSQLException: ERROR: column "docdta" is of > type bytea but expression is of type oid > Hint: You will need to rewrite or cast the expression." > Looks like that table has a column of type BYTEA, while the code expects it to be a LOB. Perhaps the easiest fix i

Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-16 Thread Jayadevan M
> > Thank you. We are working on an Oracle to PostgreSQL migration project. > > BLOB columns got converted to BYTEA in PostgreSQL and we ran into problems. > > We used this to convert the data type to OID. Thank you. > > you probably should detail the problems you ran into. large objects > no

Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-15 Thread John R Pierce
On 09/15/11 11:23 PM, Jayadevan wrote: Thank you. We are working on an Oracle to PostgreSQL migration project. BLOB columns got converted to BYTEA in PostgreSQL and we ran into problems. We used this to convert the data type to OID. Thank you. you probably should detail the problems you ran int

Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-15 Thread Jayadevan
Thank you. We are working on an Oracle to PostgreSQL migration project. BLOB columns got converted to BYTEA in PostgreSQL and we ran into problems. We used this to convert the data type to OID. Thank you. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-convert-By

Re: [GENERAL] How to convert ByteA to Large Objects

2011-03-11 Thread loamy
Brilliant Sam! I'm migrating a Firebird legacy app into Postgres, and your SQL works well. Question - the number of bytes is not specified in the write - could this be an issue? lowrite appears undocumented (as opposed to lo_write). -- View this message in context: http://postgresql.1045698.n5

Re: [GENERAL] How to convert ByteA to Large Objects

2009-01-23 Thread Francisco Figueiredo Jr.
On Fri, Jan 23, 2009 at 11:25 AM, Howard Cole wrote: > Francisco Figueiredo Jr. wrote: >> >> About the memory issue of Npgsql, did you try to use a prepared >> statement for this? We have some performance improvements when >> handling bytea values but only when the NpgsqlCommand.Prepare() method >

Re: [GENERAL] How to convert ByteA to Large Objects

2009-01-23 Thread Sam Mason
On Fri, Jan 23, 2009 at 12:08:02PM +, Howard Cole wrote: > Is there some nice SQL I can use to convert a BYTEA field into large > objects? You may be able to do something like: SELECT oid, lowrite(lo_open(oid, 131072), (SELECT byteafield FROM tbl WHERE x) FROM lo_create(NULL) o(oid); Yo

Re: [GENERAL] How to convert ByteA to Large Objects

2009-01-23 Thread Howard Cole
Francisco Figueiredo Jr. wrote: About the memory issue of Npgsql, did you try to use a prepared statement for this? We have some performance improvements when handling bytea values but only when the NpgsqlCommand.Prepare() method is called. I hope it helps. Hi Francisco, Yes it did help. T

Re: [GENERAL] How to convert ByteA to Large Objects

2009-01-23 Thread Francisco Figueiredo Jr.
On Fri, Jan 23, 2009 at 10:08 AM, Howard Cole wrote: > Hi All, > Hi, Howard! > Is there some nice SQL I can use to convert a BYTEA field into large > objects? > > I am having some memory problems handling bytea parameters in Npgsql - > getting out of memory errors. From reading various posts on

[GENERAL] How to convert ByteA to Large Objects

2009-01-23 Thread Howard Cole
Hi All, Is there some nice SQL I can use to convert a BYTEA field into large objects? I am having some memory problems handling bytea parameters in Npgsql - getting out of memory errors. From reading various posts on this I see that bytea's can consume much more memory than the size of the o