Re: [GENERAL] Trying to update a box data type column

2006-05-23 Thread Tom Lane
Yonatan Ben-Nes <[EMAIL PROTECTED]> 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 rul

Re: [GENERAL] Trying to update a box data type column

2006-05-23 Thread Michael Fuhr
On Tue, May 23, 2006 at 07:13:08PM +0200, Yonatan Ben-Nes wrote: > UPDATE treecategory SET box = > '('||"nleft"||','||"nright"||'),('||"nleft"||','||"nright"||')'; > ERROR: column "box" is of type box but expression is of type text > HINT: You will need to rewrite or cast the expression. > > An

[GENERAL] Trying to update a box data type column

2006-05-23 Thread Yonatan Ben-Nes
Hi all, I got the following table: CREATE TABLE treecategory ( nleft INT4 NOT NULL, nright INT4 NOT NULL, box BOX NOT NULL ); I can't figure out how I can update the box column using the values at the nleft & nright columns. For example if I try: UPDATE treecategory SET box = '('||"nleft"||