Skip site navigation (1) Skip section navigation (2)

Re: FW: Re: Part 1 of several - Converting a varchar to an interval

From: Shawn <postgres(at)xmtservices(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Date: 2008-03-26 23:41:38
Message-ID: 200803262341.38648.postgres@xmtservices.net (view raw or flat)
Thread:
Lists: pgsql-sql
On Wednesday 26 March 2008 23:12:07 Rodrigo E. De León Plicet wrote:
> Use dollar quoting, e.g.:
>
> create or replace function dur_interval_msec(int) returns interval
> as
> $$
> select ($1 * interval '1 msec');
> $$
> language sql
> immutable
> returns null on null input;

Perfect! Great!  Thank you!

There are so many things about SQL I don't know....

Shawn

In response to

Responses

pgsql-sql by date

Next:From: ShawnDate: 2008-03-27 00:05:48
Subject: Dropping Functions
Previous:From: Rodrigo E. De León PlicetDate: 2008-03-26 23:12:07
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group