Re: uuid c function contrib

Поиск
Список
Период
Сортировка
От Ron Peterson
Тема Re: uuid c function contrib
Дата
Msg-id 20061018203157.GA1149@yellowbank.com
обсуждение исходный текст
Ответ на Re: uuid c function contrib  (Ron Peterson <ron.peterson@yellowbank.com>)
Ответы Re: uuid c function contrib
Список pgsql-general
On Tue, Oct 17, 2006 at 09:07:08PM -0400, Ron Peterson wrote:
> On Tue, Oct 17, 2006 at 03:25:05PM -0400, Ron Peterson wrote:
>
> > I've written some PostgreSQL C functions which expose the functionality
> > of Theodore Ts'o's UUID library.

% select y_uuid_time( y_uuid_generate_time() );
         y_uuid_time
----------------------------
 2006-10-17 20:59:25.101671

My y_uuid_time function returns text.  It would be better to have it
return a timestamp.  What internal functions does PostgreSQL use for
timestamp manipulation?

int64 or maybe float atimestamp
atimestamp = convert_seconds+usecs_since_epoch( somedata )
PG_RETURN_TIMESTAMP( atimestamp )

I'm having a hard time finding any examples of functions returning
timestamps I can study to see how they are handled internally.  I'm sure
it's only a line or two of code.

TIA.

--
Ron Peterson
https://www.yellowbank.com/

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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Drop All the Databases
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Stats Collector Won't Start