How tnaslate kode from MySQL to Postgres? - Mailing list pgsql-general

From Witold Rak
Subject How tnaslate kode from MySQL to Postgres?
Date
Msg-id 9d1123$cft$1@news.tpi.pl
Whole thread Raw
List pgsql-general
I create universal module to use databases. MySQL haw extra method
AUTO_INCREMENT and function LAST_INSERT_ID().

CREATE TABLE baza (
  id integer unsigned NOT NULL auto_increment PRIMARY KEY,
  id_parent integer unsigned NOT NULL,
  id_children integer unsigned NOT NULL,
  data    blob );

INSERT INTO baza (id_parent,id_children,data) VALUES (0,0,"text");
UPDATE baza SET id_parent=LAST_INSERT_ID() WHERE id=LAST_INSERT_ID();

Question:
How create this method in Postgres?
----
WRaq





pgsql-general by date:

Previous
From: Roger Wernersson
Date:
Subject: optimizing
Next
From: hciR nellA
Date:
Subject: Re: [MacPerl] Perl Scope problem