Brian Knox <[EMAIL PROTECTED]> writes:
> Is it possible within pl/pgsql, to convert an integer to an interval in
> months? IE, if num_months is an INT set to 48, can it be converted to an
> interval?
Sure, just multiply by the appropriate interval value:
regression=# select 48 * '1 month'::inte
On Fri, Feb 27, 2004 at 11:54:04 -0500,
Brian Knox <[EMAIL PROTECTED]> wrote:
> Is it possible within pl/pgsql, to convert an integer to an interval in
> months? IE, if num_months is an INT set to 48, can it be converted to an
> interval?
Can you use num_months * '1 month'::interval ?
---
Hi elin thanks for advice, i looked at your website but i didnt really
understand the information given, sorry. However i looked at the postgres
documentation and realised what i had to do
select * from species where location[1] @ polygon '((0,0), (1000,0),
(1000,1000), (0,1000))':
This works fin
On Fri, 27 Feb 2004, Brian Knox wrote:
> Is it possible within pl/pgsql, to convert an integer to an interval in
> months? IE, if num_months is an INT set to 48, can it be converted to an
> interval?
You should be able to say something like
num_months * INTERVAL '1 month'
I believe.
---
Is it possible within pl/pgsql, to convert an integer to an interval in
months? IE, if num_months is an INT set to 48, can it be converted to an
interval?
Thanks,
Brian
---(end of broadcast)---
TIP 7: don't forget to increase your free space map se
I am going to try to move this over the sql list, since it doesn't belong
on bugs.
On Tue, Feb 24, 2004 at 23:47:48 +1300,
Martin Langhoff <[EMAIL PROTECTED]> wrote:
> Tom Lane wrote:
>
> >How about
> >
> >SELECT nextval('seq'); -- ignore result
> >
> >INSERT INTO ... VALUES (currval('seq