Search Postgresql Archives

Re: Setting expire date on insert/modify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 25, 2006, at 9:45 , Foster, Stephen wrote:

ERROR:  invalid input syntax for type date: "StartDate"
CONTEXT:  SQL statement "SELECT  (date 'StartDate' + integer
'NumOfDays')"
PL/pgSQL function "TF_BannerAd_Ads_InsMod" line 8 at assignment

Why are you single-quoting StartDate and NumOfDays? Single-quotes are generally used for string literals (e.g., text and varchar types). If you are trying to preserve the case of the variable name, you need to (always) use double-quotes, including when you define them.

Hope this helps a bit. I haven't looked through all of the code, so there may be other bugs lurking, but this is definitely one of the problems.

Michael Glaesemann
grzm myrealbox com





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux