Retrieving the new "nextval" for primary keys....

Поиск
Список
Период
Сортировка
От Greg Patnude
Тема Retrieving the new "nextval" for primary keys....
Дата
Msg-id ak6lse$a9a$1@news.hub.org
обсуждение исходный текст
Список pgsql-sql
I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be
able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL
return the id of the newly inserted record (new.id) directly to the Perl
script for further processing... Anyone with a solution / idea ???

Nearly EVERY table I create in postgreSQL (7.2) has the following minimum
structure:

create table "tblName" (
   id int4 primary key nextval ("tblName_id_seq"),
   ..field...   ..field...   ..field...
   create_dt date default 'CURRENT_DATE',   change_dt timestamptz default 'now()',   active_flag bool default 'TRUE'

)








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

Предыдущее
От: Mathieu Arnold
Дата:
Сообщение: Re: triggers and plpgsql question
Следующее
От: "OU"
Дата:
Сообщение: Re: Separating data sets in a table