Re: How To Get Bytea Data Instead Of Its Oid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "CN LIOU" <cnliou(at)graffiti(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How To Get Bytea Data Instead Of Its Oid
Date: 2002-09-19 16:46:38
Message-ID: 26880.1032453998@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"CN LIOU" <cnliou(at)graffiti(dot)net> writes:
> SELECT * FROM test LIMIT 1
> returns, I guess, the OID of c2 instead of the binary data to which the OID points.

I don't think so...

regression=# create table test (c1 text,c2 bytea);
CREATE TABLE
regression=# insert into test values ('some text', 'some binary data \\000\\001');
INSERT 284058 1
regression=# select * from test;
c1 | c2
-----------+---------------------------
some text | some binary data \000\001
(1 row)

I see no OID here.

Perhaps you should show us an example of what you are doing, rather than
your interpretation of what's going wrong.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Joseph Krogh 2002-09-19 17:42:54 Re: Stripping white-space in SELECT statments
Previous Message PostgreSQL Server 2002-09-19 15:56:04 Table Copy.