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,

[SQL] unsubscribe

2006-03-13 Thread RaFaeL
unsubscribe

[SQL] problem with postgres

2005-02-02 Thread Luiz Rafael Culik Guimaraes
inside psql with no other people connected the only changes i has on postgresql.conf is max_connection=512 shared_buffers=8192 sort_mem=8192 vacuum_mem=31792 Regards Luiz Rafael ---(end of broadcast)--- TIP 6: Have you searched our list archives

[SQL] problem with postgres

2005-02-02 Thread Luiz Rafael Culik Guimaraes
inside psql with no other people connected the only changes i has on postgresql.conf is max_connection=512 shared_buffers=8192 sort_mem=8192 vacuum_mem=31792 Regards Luiz Rafael ---(end of broadcast)--- TIP 2: you can get off all lists at once with the

Re: [SQL] number os commands inside transaction block

2005-01-31 Thread Luiz Rafael Culik Guimaraes
Hi Michael Fuhr how i can increse the number of commands in an transaction block What do you mean? What problem are you trying to solve? i´m trying to solve the follow message current transaction is aborted, queries ignored until end of transaction block some one tell me this is defined inside pos

[SQL] number os commands inside transaction block

2005-01-31 Thread Luiz Rafael Culik Guimaraes
Dear Friends how i can increse the number of commands in an transaction block i use postgres 7.4.5 on linux Regards Luiz - Original Message - From: "Stephan Szabo" <[EMAIL PROTECTED]> To: "Don Drake" <[EMAIL PROTECTED]> Cc: Sent: Monday, January 31, 2005 7:31 PM Subject: Re: [SQL] plpgsql

[SQL] query optimizer dont treat correctly OR

2004-04-27 Thread Luiz Rafael Culik Guimaraes
Hello folks See the command bellow. I use some thing simmilar about an decade on Oracle, Sybase, MSSQL, DB2, etc. But with Postgresql , he generate an FULL TABLE SCAN, and consequenyly it take about 10 minutes to run (Very big table..)

Re: [SQL] Diferent databases on same query...

2001-10-23 Thread Douglas Rafael da Silva
>> Hi, >> >> I'd like to do a query where can be possible I access tables from >> diferent databases on the same query. >> On MySQL, I do: >> >> SELECT People1.PersID, People1.Name, Result1.Value, Result1.Date FROM >> Database1.People1, Database2.Result1 WHERE ... >> >> I think on ORACLE works lik

[SQL] Diferent databases on same query...

2001-10-19 Thread Douglas Rafael da Silva
ople1.PersID, People1.Name, Result1.Value, Result1.Date FROM People1@Database1, Result1@Database2 WHERE ... But Who I can to do this on Postgresql ? Thank you. Douglas Rafael. ---(end of broadcast)--- TIP 6: Have you searched our list archives?