Home » Forums » Suggestions and New Features
 
PostgreSQL and Rules (1202 previews)
PostgreSQL and Rules Posted in 06th, 07/2005 06:08 by bart.degryse
Hi Crercio and Lauro,
On PostgreSQL database (I'm using version 8.0.0) one can create rules. A little example:
CREATE TABLE "tblMedium" (
"ID" serial NOT NULL,
"Description" CHARACTER varying(100) NOT NULL
);

ALTER TABLE ONLY "tblMedium"
ADD CONSTRAINT "PK_tblMedium" PRIMARY KEY ("ID");

CREATE RULE get_pkey_on_insert AS ON INSERT TO "tblMedium" DO SELECT currval('"tblMedium_ID_seq"') AS seq;

The result of these statements is that when I insert a record (eg INSERT INTO "tblMedium" ("Description") VALUES ('Test')) I get a resultset with one record containing one field (seq) which contains the ID (which was generated by the sequence "tblMedium_ID_seq") of the inserted record.
Very handy and quite powerfull.
With DBManager (I'm using version 3.0.3a) I have no problem creating such rules, but afterwards there doesn't seem to be any way to find these rules back or to edit them.
I would appreciate it if something was addes somewhere to make this possible.
Thanks in advance and keep up the good work.
Bart Degryse
Re: PostgreSQL and Rules Posted in 06th, 07/2005 09:24 by support
Hi,

Although this is not possible yet we plan to implement most of the features available in PostgreSQL as it is becoming more and more popular. The DBManager 3.1.0 is finished in terms of development and we are now testing the installation scripts and updating the manuals. If time allows, we will try to implement something in this version, but since we have scheduled the release for this weekend and believe this will not be possible.
Nevertheless, if we are unable to do so in this version, we will implement more features as soon as possible.

Best regards,

Crercio O. Silva
Support / DBTools Software
PostgreSQL and Rules (1202 previews)
Legends

Topic has Replies
Topic With no Replies
 
Home » Forums » Suggestions and New Features