pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ZIP function
3+ messages / 3 participants
[nested] [flat]

* ZIP function
@ 2013-03-16 19:50  Victor Sterpu <victor@caido.ro>
  0 siblings, 2 replies; 3+ messages in thread

From: Victor Sterpu @ 2013-03-16 19:50 UTC (permalink / raw)
  To: pgsql-sql

Is there a function that will give the resulting zip content for a 
string?
Like SELECT zip('test data');?

Thank you.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ZIP function
@ 2013-03-16 23:37  Jasen Betts <jasen@xnet.co.nz>
  parent: Victor Sterpu <victor@caido.ro>
  1 sibling, 0 replies; 3+ messages in thread

From: Jasen Betts @ 2013-03-16 23:37 UTC (permalink / raw)
  To: pgsql-sql

On 2013-03-16, Victor Sterpu <victor@caido.ro> wrote:
>
> --------=_MBF521B7A8-BC31-4E93-BC62-8C86007F2089
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain; format=flowed; charset=utf-8
>
> Is there a function that will give the resulting zip content for a=20
> string?
> Like SELECT zip('test data');?

no. you could write one that calls gzip in one of the untrusted
languages.  or in C you could call zlib.


-- 
⚂⚃ 100% natural



-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ZIP function
@ 2013-03-17 01:36  Ben Morrow <ben@morrow.me.uk>
  parent: Victor Sterpu <victor@caido.ro>
  1 sibling, 0 replies; 3+ messages in thread

From: Ben Morrow @ 2013-03-17 01:36 UTC (permalink / raw)
  To: pgsql-sql

Quoth jasen@xnet.co.nz (Jasen Betts):
> On 2013-03-16, Victor Sterpu <victor@caido.ro> wrote:
> >
> > Is there a function that will give the resulting zip content for a=20
> > string?
> > Like SELECT zip('test data');?
> 
> no. you could write one that calls gzip in one of the untrusted
> languages.  or in C you could call zlib.

You can call Compress::Zlib or Archive::Zip (depending on which sort of
'zip' you mean) from (trusted) PL/Perl, provided you load the modules
from plperl.on_init.

Ben



-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-03-17 01:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 19:50 ZIP function Victor Sterpu <victor@caido.ro>
2013-03-16 23:37 ` Jasen Betts <jasen@xnet.co.nz>
2013-03-17 01:36 ` Ben Morrow <ben@morrow.me.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox