Re: Creating a function with single quotes

From: Shawn Tayler <stayler(at)washoecounty(dot)us>
To: "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
Cc: PostgreSQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Creating a function with single quotes
Date: 2009-02-20 14:22:33
Message-ID: 1235139753.13564.19.camel@shop.telecom.co.washoe.nv.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi Leif!

Thank you to you and the group. Worked like a charm. The SQL language
was the key....

Shawn

On Fri, 2009-02-20 at 15:12 +0100, Leif B. Kristensen wrote:
> You should place a semicolon at the end of the RETURN line, and
> remove
> the one after END,
>
> BTW, simple functions as this are better written in the SQL language.
> I
> can't speak for the validity of the code itself, but you can rewrite
> it
> as
>
> create function f_csd_interval(integer) returns interval as $$
> SELECT $1 * interval '1 msec'
> $$ LANGUAGE SQL;
--
Sincerely,

Shawn Tayler
Radio Network Administrator
Washoe County Regional Communications System
Telecommunications Division
Technology Services Department
County of Washoe
State of Nevada
Ofc (775)858-5952
Cell (775)771-4241
FAX (775)858-5960

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2009-02-20 14:27:07 Fwd: Re: Creating a function with single quotes
Previous Message Leif B. Kristensen 2009-02-20 14:13:03 Re: Creating a function with single quotes