Re: How do I create a box from fields in a table?

From: Rob Richardson <RDRichardson(at)rad-con(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I create a box from fields in a table?
Date: 2013-10-18 12:37:32
Message-ID: 67D108EDFAD3C148A593E6ED7DCB4BBDC3FB69A4@RADCONWIN2K8PDC.radcon.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for your reply.

In my opinion, that is ugly to the point of uselessness. I think I would rather just use simple integer arithmetic. It will be easier for others to understand.

RobR

-----Original Message-----
From: Merlin Moncure [mailto:mmoncure(at)gmail(dot)com]
Sent: Thursday, October 17, 2013 5:58 PM
To: Rob Richardson
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] How do I create a box from fields in a table?

you have to construct the string. this is somewhat baroque by modern postgres standards but should work:

select tran_car_identification, format('((%s, 1), (2, 3))', location)::box from transfer_car;

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-10-18 15:05:07 Re: How do I create a box from fields in a table?
Previous Message Vincent Veyron 2013-10-18 09:15:46 Re: Help function to sort string