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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Is there a better way to do this?



Wei Weng wrote:
I want to implement something like the following:
CREATE OR REPLACE FUNCTION AddDays

You don't know how many seconds are in a day, so just add the days using SQL.

	RETURN time + (days || ' days')::INTERVAL;

You don't even need to make that a function, just do that you your SQL directly.

-- Dante



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group