Re: bytea question

From: mjp(at)ornl(dot)gov
To: mikeo <mikeo(at)spectrumtelecorp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bytea question
Date: 2000-08-15 20:38:56
Message-ID: 20000815163856.A11670@grail.lsd.ornl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try

substr(text,int4) or
substr(text, int4, int4)

For example,

% select substr('hi there',4,3);
substr
--------
the
(1 row)

Morey Parang
ORNL

On Tue, Aug 15, 2000 at 03:34:27PM -0400, mikeo wrote:
> hi all,
> in the pg_trigger table the tgargs column is defined
> as type "BYTEA". i can split this up in perl, once
> retrieved, but can't figure out how to "substring"
> it in sql. is there an SQL way to select pieces of
> a column of this type?
>
> any help is appreciated,
>
> mikeo

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mikeo 2000-08-15 21:23:38 Re: bytea question
Previous Message Campbell, Scott 2000-08-15 20:38:00 accessing field properties