From: Rodrigo E. De León Plicet <rdeleonp@gmail.com>
To: Shawn <postgres@xmtservices.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Date: Wed, 26 Mar 2008 18:12:07 -0500
Message-ID: <a55915760803261612n16a87064y6abca46a0cdc42f8@mail.gmail.com> (raw)
In-Reply-To: <200803262245.53968.postgres@xmtservices.net>
References: <032620081632.25756.47EA7AA200070FAB0000649C22007374789D0A900E04050E@comcast.net>
<29426.1206551668@sss.pgh.pa.us>
<200803262245.53968.postgres@xmtservices.net>
On Wed, Mar 26, 2008 at 5:45 PM, Shawn <postgres@xmtservices.net> wrote:
> obviously it doesn't like the extra single quotes around the 1 msec. Any
> suggestions for a work around?
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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rdeleonp@gmail.com, postgres@xmtservices.net
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
In-Reply-To: <a55915760803261612n16a87064y6abca46a0cdc42f8@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox