Re: date and time
| От | Thomas Kellerer |
|---|---|
| Тема | Re: date and time |
| Дата | |
| Msg-id | fs8ffb$ji1$1@ger.gmane.org обсуждение исходный текст |
| Ответ на | Re: date and time ("Alain Roger" <raf.news@gmail.com>) |
| Ответы |
Re: date and time
|
| Список | pgsql-general |
Alain Roger wrote on 24.03.2008 15:45:
>> SELECT count(*) INTO existing_email FROM cust_portal.tmp_newsletterreg;
>> if (existing_email <>0) then
>> {
>> result = false;
>> }
>> else
>> {
>> result = true;
>> INSERT INTO cust_portal.tmp_newsletterreg VALUES
>> (
>> nextval( 'tmp_newsletterreg_nlreg_id_seq' ),
>> email,
>> session,
>> SELECT CURRENT_TIMESTAMP;
>> )
>> }
>> end if;
>>
>> RETURN(result);
That should be
INSERT INTO cust_portal.tmp_newsletterreg VALUES
(
nextval( 'tmp_newsletterreg_nlreg_id_seq' ),
email,
session,
CURRENT_TIMESTAMP
)
There is no SELECT and no semicolon inside the INSERT
Thomas
В списке pgsql-general по дате отправления: