Extract Function

Поиск
Список
Период
Сортировка
От Derrick Betts
Тема Extract Function
Дата
Msg-id 004201c40dc0$acc65ee0$0200a8c0@main
обсуждение исходный текст
Ответы Re: Extract Function  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Extract Function  (Bruno Wolff III <bruno@wolff.to>)
Re: Extract Function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
I am trying to use the EXTRACT function in pl/pgsql and running into a problem.
 
This is the command:
 
SELECT EXTRACT(EPOCH FROM TIMESTAMP variable_name) INTO Temp;
 
The variable_name is of type text (I've also tried it as type timestamp), but the parser breaks when it attempts to perform this function.  It works great when I substitute the variable_name with '2004-1-10 00:00:00' , however, when I use a variable, it doesn't.
 
Any one have any ideas on how I can get variable substitution to work in my function using EXTRACT?
 
Thanks,
Derrick
 

В списке pgsql-novice по дате отправления:

Предыдущее
От: joe@tsolucio.com (Joe Bordes)
Дата:
Сообщение: how to test string against regular expression contained in postgresql database field?
Следующее
От: CoL
Дата:
Сообщение: Re: how to test string against regular expression contained in postgresql