Re: [GENERAL] LIke and Indicies

2005-02-25 Thread Dave Smith
it out .. The query where the product_desc is in the index condition, returns almost immediately where as the other takes about 10 seconds before the first row is returned. On Fri, 2005-02-25 at 11:44, Peter Eisentraut wrote: > Am Freitag, 25. Februar 2005 17:31 schrieb Dave Smith: > >

[GENERAL] LIke and Indicies

2005-02-25 Thread Dave Smith
text)) I thought that if you used like and the wildcard was at the end it would use the index? -- Dave Smith CANdata Systems Ltd 416-493-9020 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] JDBC and Portals . Clarification

2005-02-25 Thread Dave Smith
Is a portal using the V3 protocol the same as a cursor? I am trying to debug a slow query and I want the JDBC driver to use the cursor syntax. It says it is using a portal but the performance seems like just a regular sql statement. -- Dave Smith CANdata Systems Ltd 416-493-9020

Re: [GENERAL] MOVE

2005-01-14 Thread Dave Smith
insert a row, and if it exists, UPDATES it instead of inserting > it ! > > What do you think ? > > > > > > ---(end of broadcast)--- > TIP 3: if posting/reading through Usenet, please send an appropr

Re: [GENERAL] Adding UNIQUE constraint on NULL column

2005-01-13 Thread Dave Smith
Yes On Thu, 2005-01-13 at 10:12, Doug McNaught wrote: > Dave Smith <[EMAIL PROTECTED]> writes: > > > I am trying to add a unique constraint on a column that can be null. The > > documentation states that null is treated as non equal values but I want > > them to be

[GENERAL] Adding UNIQUE constraint on NULL column

2005-01-13 Thread Dave Smith
I am trying to add a unique constraint on a column that can be null. The documentation states that null is treated as non equal values but I want them to be equal. Is there another way of doing this other than writing a before insert trigger? -- Dave Smith CANdata Systems Ltd 416-493-9020

Re: [GENERAL] to_char(0,'9999.99') -> ".00"

2005-01-10 Thread Dave Smith
---(end of broadcast)--- > TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faqs/FAQ.html -- Dave Smith <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Advice on moving rows to history

2004-12-29 Thread Dave Smith
know what other peoples experiences have been with this problem, and what would you suggest. -- Dave Smith CANdata Systems Ltd 416-493-9020 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

Re: [GENERAL] Using IN with subselect

2004-11-25 Thread Dave Smith
That's what I wanted it to do I just did not understand how to read the explain. So is it HashAggregate that means this already loaded? On Thu, 2004-11-25 at 12:57, Tom Lane wrote: > Dave Smith <[EMAIL PROTECTED]> writes: > > Well here is explain. I would guess that it i

Re: [GENERAL] Using IN with subselect

2004-11-25 Thread Dave Smith
1-31'::date)) -> Hash (cost=5.83..5.83 rows=1 width=13) -> Index Scan using glmast_index3 on glmast (cost=0.00..5.83 rows=1 width=13) Index Cond: ((company_id = 1000) AND ((control_type)::text = 'F'::text)) On Thu, 2004-11-25 at

[GENERAL] Using IN with subselect

2004-11-25 Thread Dave Smith
? -- Dave Smith CANdata Systems Ltd 416-493-9020 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] A strange Vacuum error ...

2004-01-29 Thread Dave Smith
I am running 7.2.4 and when running a vacuum on my database I get NOTICE: Child itemid in update-chain marked as unused - can't continue repair_frag ERROR: No one parent tuple was found vacuumdb: vacuum import failed How do I fix this? -- Dave Smith CANdata Systems Ltd 416-493

Re: [GENERAL] System crash and trying to run vacuum getting errors

2003-11-05 Thread Dave Smith
Yup that's what happened. Dropped them and all is good. I really should get a list of all of the underling files for each index and table and see if any others are missing. On Wed, 2003-11-05 at 11:30, Tom Lane wrote: > Dave Smith <[EMAIL PROTECTED]> writes: > > After a abno

[GENERAL] System crash and trying to run vacuum getting errors

2003-11-05 Thread Dave Smith
elnfd: cannot open relation pg_temp_5821_0: No such file or directory -- Dave Smith CANdata Systems Ltd 416-493-9020 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Vacuum Failed - backend closed the channel unexpectedly

2001-05-22 Thread Dave Smith
Running Linux 2.2.14 postgresql 7.0.3 I am trying to run a vacuum and I get the following output vacuum; NOTICE: FlushRelationBuffers(menudt, 6): block 3 is referenced (private 0, global 2) FATAL 1: VACUUM (vc_vacheap): FlushRelationBuffers returned -2 pqReadData() -- backend closed the channel

Re: [GENERAL] More SCO funnies

2000-12-01 Thread Dave Smith
Larry Rosenman wrote: > * Dave Smith <[EMAIL PROTECTED]> [001201 12:11]: > >> Ok so thanks to Larry I managed to get postgresql compiled and running >> on SCO. Now I'm trying to compile a small 'C' program. When I link I get >> >>

[GENERAL] More SCO funnies

2000-12-01 Thread Dave Smith
Ok so thanks to Larry I managed to get postgresql compiled and running on SCO. Now I'm trying to compile a small 'C' program. When I link I get cc -L/usr/local/pgsql/lib -lpq -lm -o t_postgresql t_postgresql.o post_util.o undefined first referenced symbol

Re: [GENERAL] Database cluster?

2000-12-01 Thread Dave Smith
Have you looked at intermezzo? http://www.inter-mezzo.org/ Valter Mazzola wrote: > I've succesfully pacthed linux kernel 2.2.17 with DIPC and modified > postgresql's src (src/backend/storage/ipc/ipc.c) to create distributed > shm and sem. > > The strategy is then to start a postgresql that cr

[GENERAL] Only updating part of a column

2000-07-24 Thread Dave Smith
I would like to know if I can update part of a column. ie update myfile set substr(direct_key,1,10)='1234567890' where substr(direct_key,1,10)='0987654321'; This does not work. Is this possible? Or am I looking at this the wrong way? -- Dave Smith Candata Systems Ltd. (

Re: [GENERAL] Return PGresult

2000-07-20 Thread Dave Smith
quot;); > *totalrec = PQntuples(res); > } > === > > Out put : > $ > The total rec = 2 // This result is right. > The total rec = 0 // The same result is not showing. > $ Try dbQuery("tempdb","select * from tbltemp",&a