Re: [SQL] Trigger/Function - one solution - was constraint question (I think)

2008-12-04 Thread Rafael Domiciano
I would develop like this (No so many changes, it is basically a small trigger) create or replace function compound_rows_range_check() returns trigger as $body$ DECLARE BAYNO int4; BEGIN -- First Verification = if changing compound or row fail IF (old.co_id <> new.co_id or old.cr_id <>

Re: [SQL] Can COPY update or skip existing records?

2008-09-30 Thread Rafael Domiciano
Or you could do like this */ delete from temp_01 a where exists (select 1 from table_01 b where a.cod_serial = b.cod_serial) I hope being helpful. Best Regards, Rafael Domiciano Postgres DBA 2008/9/30 Glenn Gillen <[EMAIL PROTECTED]> > Hey all, > > I've got a table with

Re: [SQL] Doubts about FK

2008-09-18 Thread Rafael Domiciano
2008/9/12 Scott Marlowe <[EMAIL PROTECTED]> > On Fri, Sep 12, 2008 at 12:14 PM, Rafael Domiciano > <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > In my DB I have a couple of FK, so the change of referenced columns is a > > quite complicated. >

[SQL] Doubts about FK

2008-09-12 Thread Rafael Domiciano
x27;t know how to use it. Regards, Rafael Domiciano

Re: [SQL] Case Insensitive searches

2008-08-06 Thread Rafael Domiciano
I have read the article... tnks, very helpful. But, can I create a index using function like "substring"? I would like to create something like this: CREATE INDEX indtest_01 ON table_01 ((SUBSTRING(month_year, 3, 4) || SUBSTRING(month_year, 1, 2)) 2008/8/4 Terry Lee Tucker <[EMAIL PROTECTED]> >

Re: [SQL] index find method?

2008-06-18 Thread Rafael Domiciano
Hello, The Default method is btree, that is the commonly method used in the indexes. Rafael Domiciano DBA Postgres Senffnet 2008/6/18 Jorge Medina <[EMAIL PROTECTED]>: > hi list, > when I do: > CREATE INDEX name_index ON some_table (some_col); > what method(hash,btree,