Re: Insert hex / octal literals in a query? - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Insert hex / octal literals in a query?
Date
Msg-id ba3af552cda95682da98417574e7c7df4554ae31.camel@cybertec.at
Whole thread Raw
In response to Insert hex / octal literals in a query?  ("S.Bob" <sbob@quadratum-braccas.com>)
List pgsql-admin
On Wed, 2019-12-11 at 21:07 -0700, S.Bob wrote:
> we have a client that needs us to pull data via sql and stage it in a 
> file with odd hex / octal characters as the field delimiter (Hex 1F or 
> Oct 31)
> 
> Is there an easy way to do this ?

No problem:

COPY uni TO ... (FORMAT 'csv', DELIMITER E'\u001F')

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-admin by date:

Previous
From: Shrikant Bhende
Date:
Subject: Re: Slow running query
Next
From: "S.Bob"
Date:
Subject: Parse / print all elements of a json data column -