Re: Boxes - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Boxes
Date
Msg-id 20040915180009.GA29550@wolff.to
Whole thread Raw
In response to Boxes  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
List 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@boutiquenumerique.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

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: division by zero issue
Next
From: Vivek Khera
Date:
Subject: Re: disk performance benchmarks