Re: Comparing Dates
От | Guy Fraser |
---|---|
Тема | Re: Comparing Dates |
Дата | |
Msg-id | 419E19AF.9030405@incentre.net обсуждение исходный текст |
Ответ на | Re: Comparing Dates (Thomas F.O'Connell <tfo@sitening.com>) |
Список | pgsql-sql |
You should use single quotes for all literals. Examples: select '2004-06-08' ; ?column? ------------2004-06-08 select 'user' ;?column? ----------user Failing to quote literals will cause unexpected results. Examples: select 2004-06-08 ;?column? ---------- 1990 select user ;current_user --------------guy "Thomas F.O'Connell" <tfo@sitening.com> writes: > select 2004-06-08; > ?column? > ---------- > 1990 > > I'm not exactly sure how the bare string is converted internally, but > it's > clearly not a complete date like you're expecting. -- Guy Fraser Network Administrator The Internet Centre 780-450-6787 , 1-888-450-6787 There is a fine line between genius and lunacy, fear not, walk the line with pride. Not all things will end up as you wanted, but you will certainly discover things the meek and timid will miss out on.
В списке pgsql-sql по дате отправления: