Re: Is there a better way to do this?

From: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: Wei Weng <wweng(at)kencast(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Is there a better way to do this?
Date: 2007-08-28 22:22:46
Message-ID: 46D4A036.3070506@lorenso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Glaesemann wrote:
>
> On Aug 28, 2007, at 16:55 , D. Dante Lorenso wrote:
>> RETURN time + (days || ' days')::INTERVAL;
> It's bad practice to concatenate like this. Use time + days * interval
> '1 day' and be done with it.

Why? Is this functionality expected to break in the future or has
unexpected side effects? Is it less clear or less efficient? Who
declared it bad practice and where can I read that documentation?

-- Dante

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-08-28 22:26:41 Re: Out of Memory - 8.2.4
Previous Message Scott Marlowe 2007-08-28 22:17:02 Re: Question regarding autovacuum