How tnaslate kode from MySQL to Postgres?

From: "Witold Rak" <wraq(at)prograk(dot)com(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: How tnaslate kode from MySQL to Postgres?
Date: 2001-05-05 13:58:24
Message-ID: 9d1123$cft$1@news.tpi.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Gyozo Papp 2001-05-05 14:15:52 Re: datetime arithmatic
Previous Message Gyozo Papp 2001-05-05 13:45:51 Re: psql with PHP question