-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Ah thanks. I think I`ll change all sequences to default sequence name,
to avoid mistakes.
- -- Jan
> If you define the sequence name yourself, try using the "lastSequenceId()"
> method, and pass the name of the sequence as the argument to that method.
>
> Regards,
> Bill Karwin.
>
>
> Jan Pieper wrote:
> I tried to use Zend_Db with PDO_PGSQL. After inserting a new row to
> database i try to get last insert id by lastInsertId() method but I even
> get bool(false). My tables create statement:
>
> CREATE SEQUENCE seq_article_id;
> CREATE TABLE article (
> article_id integer NOT NULL DEFAULT nextval('seq_article_id')
> PRIMARY KEY
> ...
> );
>
> PostgreSQL's manual says, that SERIAL is an autoincrementing integer,
> but i read that is the same as above (~helper).
>
> So, what i have todo to get a valid last insert id from lastInsertId()?
> Could it be that the sequence name must have a specific name? In
> Example: <table_name>_<column_name>_seq? I actually define the sequence
> name by myself.
>
> -- Jan
>>
>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
iEYEAREDAAYFAkd3dlMACgkQd3s9o1H9MZ57VACgjid8OqAH7RbwpGv1R3YiiuMT
tTYAnjVGH+dpxnuFeZ2Vn5yC/qBed3Lz
=aryS
-----END PGP SIGNATURE-----