Another date/time question using libpq

Поиск
Список
Период
Сортировка
От Thuffman00@aol.com
Тема Another date/time question using libpq
Дата
Msg-id 195.2d5b0256.2e534d15@aol.com
обсуждение исходный текст
Список pgsql-novice
Using a stored procedure (function in Postgres), I insert data which contains a column called "creation_dt". Here I insert that date/time the row was created. With psql I can view and confirm the data with a select statement. My problem is retrieving the columns infornation from the result using PQgetvalue. More specificly, how/what data type to use. PQgetvalue returns a char * and I'm unfamilar with how to or what to cast this as that will return the result I need. If someone could demonstrate what data type to return/cast from the PQgetvalue and how to format that inot a date format I would be very appreciative.  Here's the function and insert statement I'm using:
 
.
.
.
BEGIN
v_creation_date := CURRENT_TIMESTAMP;
 
insert into mytable (creation_dt) values v_creation_date;
 
END;
 
TIA
Tom
 
BTW I'm not subscribed.

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

Предыдущее
От: michael@floog.net
Дата:
Сообщение: DATE column doesn't like empty string or null value
Следующее
От: the inquirer
Дата:
Сообщение: Authentication problems