Re: trying to learn plpqsql... so please forgive..

Поиск
Список
Период
Сортировка
От Luis Sousa
Тема Re: trying to learn plpqsql... so please forgive..
Дата
Msg-id 3DDB5995.7060403@ualg.pt
обсуждение исходный текст
Ответ на trying to learn plpqsql... so please forgive..  (Michiel Lange <michiel@minas.demon.nl>)
Список pgsql-sql
> When I do an 'INSERT INTO <table> VALUES <row1,row2,row3>'
> and on the table is a serial primary key named p_key.
> As I want this number to be auto-generated, but use it as a 'customer 
> number', I want to create this function to return the value of this 
> insert. 


Try this:

SELECT currval(<sequence name from table>);

Luis Sousa



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

Предыдущее
От: Luis Sousa
Дата:
Сообщение: Re: Problems invoking psql. Help please.
Следующее
От: Thrasher
Дата:
Сообщение: Date trunc in UTC