[SQL] Writing a generic delete rule for a view

2009-03-05 Thread Scott Cain
chema_delete_foo AS ON DELETE TO testschema.foo DO INSTEAD (DELETE FROM testschema._foo WHERE $where); So, what I want to know is, is there a "magic" way to get that $where? Thanks, Scott -- -------- Scott Cai

Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-09 Thread Scott Cain
Oh, and I forgot to mention: it's highly compressed (bzip2 -9) and is 109M. Scott On Tue, 2003-08-05 at 11:01, Scott Cain wrote: > Joe, > > Good idea, since I may not get around to profiling it this week. I > created a dump of the data set I was working with. It is av

Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-06 Thread Scott Cain
set available (external-storage > case) that we can play with? > > Joe -- ---- Scott Cain, Ph. D. [EMAIL PROTECTED] GMOD Coordinator (http://www.gmod.org/) 216-392-3087

Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-04 Thread Scott Cain
On Mon, 2003-08-04 at 11:53, Tom Lane wrote: > Scott Cain <[EMAIL PROTECTED]> writes: > > At least this appears to work and is much faster, completing substring > > operations like above in about 0.27 secs (that's about two orders of > > magnitude improvement!) &g

Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-04 Thread Scott Cain
On Mon, 2003-08-04 at 11:55, Richard Huxton wrote: > On Monday 04 August 2003 16:25, Scott Cain wrote: > [snip] > > [snip] > > You might want some checks to make sure that smin < smax, otherwise looks like > it does the job in a good clean fashion. Good point--smin <

Re: [SQL] [PERFORM] EXTERNAL storage and substring on long strings

2003-08-04 Thread Scott Cain
erations like above in about 0.27 secs (that's about two orders of magnitude improvement!) Thanks, Scott -- Scott Cain, Ph. D. [EMAIL PROTECTED] GMOD Coordinator (http://www.gmod.org/) 216-392-3087 Cold Spring

[SQL] Cannot insert dup id in pk

2003-07-19 Thread Scott Cain
8] ERROR: Cannot insert a duplicate key into unique index pk_fdata Note that I do not try to insert anything into fid, the primary key on this table. Why does Postgres think I am? Thanks much, Scott -- Scott Cain, Ph. D.

Re: [SQL] OR vs UNION

2003-07-17 Thread Scott Cain
. > > For readability, you could use an IN() statement rather than a bunch of ORs > ... this would not help performance, but would make your query easier to > type/read. -- Scott Cain, Ph. D.

[SQL] OR vs UNION

2003-07-17 Thread Scott Cain
Scott -- ---- Scott Cain, Ph. D. [EMAIL PROTECTED] GMOD Coordinator (http://www.gmod.org/) 216-392-3087 Cold Spring Harbor Laboratory ---(end of broadcast)--- TIP 4: Don't &#

Re: [SQL] Cannot insert dup id in pk

2003-07-15 Thread Scott Cain
27;t realize it. I'll have to change my "bulk loading" script to update the sequence after the load is done. Thanks much, Scott -- ---- Scott Cain, Ph. D. [EMAIL PRO

[SQL] Cannot insert dup id in pk

2003-07-15 Thread Scott Cain
27;1000.007327','41',NULL,'+',NULL,'12358',NULL,NULL) Jul 14 12:48:47 localhost postgres[2998]: [108] ERROR: Cannot insert a duplicate key into unique index pk_fdata Note that I do not try to insert anything into fid, the primary key on this table. Why does Post