Re: Trying to update a box data type column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yonatan Ben-Nes <yonatan(at)epoch(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trying to update a box data type column
Date: 2006-05-23 17:40:41
Message-ID: 16669.1148406041@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yonatan Ben-Nes <yonatan(at)epoch(dot)co(dot)il> writes:
> I can't figure out how I can update the box column using the values at
> the nleft & nright columns.

Use the provided constructor functions:

regression=# select box(point(1,2),point(3,4));
box
-------------
(3,4),(1,2)
(1 row)

As a general rule, converting something to text and back is not the way
to convert data from one type to another; if it's not a really
outlandish conversion, there'll be a function or cast to help.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-23 18:08:47 Re: [GENERAL] autovacuum "connections" are hidden
Previous Message Michael Fuhr 2006-05-23 17:36:44 Re: Trying to update a box data type column