[SQL] Heres a good one...

2001-04-27 Thread Steve Meynell
Ok here is what looks like a good one that has stumped me. Let me set it up... I have two tables in my database test. They are called journal and distrib. journal looks like this (condensed) Table "journal" Attribute | Type | Modifier +-+---

Re: [SQL] Alter Table problems

2001-04-27 Thread Stephan Szabo
On Fri, 27 Apr 2001, Scott David Walter wrote: > I am attempting to add a few attributes to an existing table that already > contains data. The problem that I am having is that the new attributes > that I want to add need to be forgein key references to other tables. I > can't figure out how to

[SQL] Alter Table problems

2001-04-27 Thread Scott David Walter
I am attempting to add a few attributes to an existing table that already contains data. The problem that I am having is that the new attributes that I want to add need to be forgein key references to other tables. I can't figure out how to create the attribute with a reference to another table.

[SQL] anyone use contrib/rserv?

2001-04-27 Thread clayton cottingham
thought id fool around can't seem to get it to replicate properly ive followed the instructions impicitly to no avail manuall it dont work if anyone has any helpful suggestiuoons etc id love to hear from yah!! using the tk interface i get a tk error invalid command name "ConnInfoCmd" wh

Re: [SQL] Regular expressions and indexes

2001-04-27 Thread Stephan Szabo
On Fri, 27 Apr 2001, [iso-8859-1] Hans-Jürgen Schönig wrote: > Is there any possibility to make PostgreSQL use indexes when working > with regular expressions? > > performance=# EXPLAIN SELECT * FROM perftest WHERE id=100; > NOTICE: QUERY PLAN: > > Index Scan using idx_id_perftest on perftest

Re: [SQL] Using Transaction Blocks w/ SELECT

2001-04-27 Thread Peter Eisentraut
[EMAIL PROTECTED] writes: > Goinging throught the libpq docs, I noticed that in all of the examples involving > select statements, transaction blocks are used. I see why this is necessary for > write operations, but I don't see the need in read operations that don't commit. Am > I missing somet

[SQL] Using Transaction Blocks w/ SELECT

2001-04-27 Thread postgres
Goinging throught the libpq docs, I noticed that in all of the examples involving select statements, transaction blocks are used. I see why this is necessary for write operations, but I don't see the need in read operations that don't commit. Am I missing something? Any help appreciated.

[SQL] Regular expressions and indexes

2001-04-27 Thread Hans-Jürgen Schönig
Is there any possibility to make PostgreSQL use indexes when working with regular expressions? performance=# EXPLAIN SELECT * FROM perftest WHERE id=100; NOTICE: QUERY PLAN: Index Scan using idx_id_perftest on perftest (cost=0.00..4.98 rows=1 width=20) EXPLAIN performance=# EXPLAIN SELECT *

Re: [SQL] must I create the function check_primary_key ?

2001-04-27 Thread Peter J. Schoenster
> On Wed, 25 Apr 2001, Peter J. Schoenster wrote: > > > I want to use this referential integrity etc. that I've never used ..snip.. > > CREATE TRIGGER employer_id_exists > > BEFORE INSERT OR UPDATE ON company_profile FOR EACH > > ROW > > EXECUTE PROCEDURE check_primary_key('employer_id', > > 'e

[SQL] Re: MySql 'REPLACE'

2001-04-27 Thread Vivek Khera
> "JD" == Jeffrey Diehl <[EMAIL PROTECTED]> writes: JD> Replace into does an insert by default. If however, there is JD> already a record which would cause a unique index collision, then JD> mysql does an update on that record. I want to prevent my JD> application from having to do all of t