Hello,

New functions gda_postgres_provider_create_index() and gda_postgres_provider_drop_index() are implemented and ready for testing. Some notes; In PostgreSQL, PRIMARY KEY can only be added as a CONSTRAINT and not by using the CREATE INDEX command. Therefore I have split the 3 Index options in the following:

-1 PRIMARY KEY -> ALTER TABLE table_name ADD CONSTRAINT index_name PRIMARY KEY (cols ....)
-2 UNIQUE INDEX -> ALTER TABLE table_name ADD CONSTRAINT index_name UNIQUE (cols ....)
-3 INDEX -> CREATE INDEX idx_name ON table_name

The UNIQUE can also be created by using CREATE INDEX, so if you believe it is better to change that, let me know.

Because of this, I use both methods as well when calling drop_index method:

ALTER TABLE table_name DROP CONSTRAINT index_name
DROP INDEX index_name

Let me know any issues.

Thanks,
Bas.

_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to