pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shawn <postgres@xmtservices.net>
To: pgsql-sql@postgresql.org
Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
Date: Wed, 26 Mar 2008 23:41:38 +0000
Message-ID: <200803262341.38648.postgres@xmtservices.net> (raw)
In-Reply-To: <a55915760803261612n16a87064y6abca46a0cdc42f8@mail.gmail.com>
References: <032620081632.25756.47EA7AA200070FAB0000649C22007374789D0A900E04050E@comcast.net>
	<200803262245.53968.postgres@xmtservices.net>
	<a55915760803261612n16a87064y6abca46a0cdc42f8@mail.gmail.com>

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



view thread (11+ messages)

Message-ID: <200803262341.38648.postgres@xmtservices.net>
Permalink:  ../200803262341.38648.postgres@xmtservices.net/
Also on:    postgresql.org/message-id/200803262341.38648.postgres@xmtservices.net

 · 

reply

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: postgres@xmtservices.net
  Subject: Re: FW: Re: Part 1 of several - Converting a varchar to an interval
  In-Reply-To: <200803262341.38648.postgres@xmtservices.net>

* 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