Re: Boxes

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Boxes
Date: 2004-09-15 18:00:09
Message-ID: 20040915180009.GA29550@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please don't reply to existing threads to start a new thread. This makes the
archives less usable.

On Tue, Sep 14, 2004 at 14:00:43 +0200,
Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com> wrote:
>
> I have a table containing coordinates and I want to insert these
> into another table, converting them to boxes.
>
> I would like to use the same syntax as arrays :
>
> INSERT INTO ... (coords) SELECT ARRAY[a,b,c] FROM ...
>
> But I want boxes. Is there a way to do this ?
>
> SELECT BOX[[a,b],[c,d]] FROM ...

You want something like box(point(a,b),point(c,d)) .

> raises a Syntax Error.
> And I'd like to avoid to concatenate strings to build a box
> representation like
> '((1,2),(3,4))'::box;
>
> Is there a way ?
>
> Thanks !
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

In response to

  • Boxes at 2004-09-14 12:00:43 from Pierre-Frédéric Caillaud

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-15 18:01:23 Re: division by zero issue
Previous Message John Sidney-Woollett 2004-09-15 17:59:29 Re: psql + autocommit