| От | Gregory Wood |
|---|---|
| Тема | Re: at time zone question in pl/pgSQL |
| Дата | |
| Msg-id | 041101c1b8c0$8683c9e0$7889ffcc@comstock.com обсуждение исходный текст |
| Ответ на | at time zone question in pl/pgSQL ("Heather Grace" <heather@radiovoodoo.com>) |
| Список | pgsql-general |
> I'm trying to write a simple pl/pgsql function that will return the current time for the given time zone ( i have to deal multiple time zones) . But I don't seem to be using the appropriate syntax. I keep getting an error on the 'at time zone...' > DECLARE > new_time TIMESTAMP; > BEGIN > SELECT INTO new_time now() at time zone 'PST'; /*just hard coding the time zone for now */ > return new_time; > END; Assuming that this is a direct cut and paste, the error would appear to be that the single quotes around the timezone are not escaped. Try changing that line to: SELECT INTO new_time now() at time zone ''PST''; /*just hard coding the time zone for now */ If that's not it, nevermind :) Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера