- Архив списков рассылки pgsql-interfaces

Поиск
Список
Период
Сортировка
От Cal McPherson
Тема
Дата
Msg-id 65ED19764468D411A6AF006094EA0F3B275D61@SERVER
обсуждение исходный текст
Список pgsql-interfaces
Regarding libpq:
I have a table defined as follows to log instances of a service. 

CREATE TABLE service_instance(service_instance_id serial PRIMARY KEY,started timestamp,finished timestamp,indial
text,pin_intext,FOREIGN KEY(indial, pin_in) REFERENCES service(indial, pin_in)
 
);

I would like to insert a row into the table to log the current service
instance.  I believe I simply leave out the serial primary key from the
insert statement to get the next default value.  However, directly after the
insert I need to know the default value used for this field.  
Is this possible with the libpq interface.  Can I somehow use object
PQoidValue(res) to find the serial id of the inserted row, or is there
another way?

calsa


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inserting timestamp values from windowz application
Следующее
От: "Arthur Ward"
Дата:
Сообщение: 7.4 and Pygresql