pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: selkovjr@mcs.anl.gov
To: Julian Scarfe <jscarfe@callnetuk.com>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Paths in DBD::Pg
Date: Sun, 16 May 1999 11:29:33 -0400
Message-ID: <199905161628.LAA13696@antares.mcs.anl.gov> (raw)
In-Reply-To: <373EE594.D51FE2BE@callnetuk.com>

> I'd like to deal with geometrical data types, paths in particular,
> efficiently in Perl using Pg. But Pg, understadably I suppose, just
> returns a path as a scalar string like ((1,2),(3,4),(5,6)). Whereas I
> can 'eval' a point fairly efficiently, it's not very efficient to turn a
> long string such as the above into an array of arrays.

You don't need to eval() individual points. If you eval() the whole
thing it will give you one single array:

@a = eval "((1,2),(3,4),(5,6))";
print "@a\n";


--Gene



view thread (4+ messages)  latest in thread

Message-ID: <199905161628.LAA13696@antares.mcs.anl.gov>
Permalink:  ../199905161628.LAA13696@antares.mcs.anl.gov/
Also on:    postgresql.org/message-id/199905161628.LAA13696@antares.mcs.anl.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: selkovjr@mcs.anl.gov, jscarfe@callnetuk.com
  Subject: Re: [INTERFACES] Paths in DBD::Pg
  In-Reply-To: <199905161628.LAA13696@antares.mcs.anl.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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