Search Postgresql Archives

Re: date and time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux