Re: [HACKERS] Eliminating unnecessary left joins

2007-04-12 Thread Stephan Szabo
On Wed, 11 Apr 2007, Jim Nasby wrote: > I agree with others that the way that query is constructed is a bit > odd, but it does bring another optimization to mind: when doing an > inner-join between a parent and child table when RI is defined > between them, if the query only refers to the child ta

Re: [HACKERS] Can't ri_KeysEqual() consider two nulls as equal?

2007-04-17 Thread Stephan Szabo
On Tue, 17 Apr 2007, Tom Lane wrote: > A recent discussion led me to the idea that FK triggers are fired > unnecessarily during an UPDATE if the foreign-key column(s) contain > any NULLs, because ri_KeysEqual() treats two nulls as unequal, > and therefore we conclude the row has changed when it ha

Re: [HACKERS] Can't ri_KeysEqual() consider two nulls as equal?

2007-04-18 Thread Stephan Szabo
On Tue, 17 Apr 2007, Tom Lane wrote: > A recent discussion led me to the idea that FK triggers are fired > unnecessarily during an UPDATE if the foreign-key column(s) contain > any NULLs, because ri_KeysEqual() treats two nulls as unequal, > and therefore we conclude the row has changed when it ha

Re: [HACKERS] regexp_matches and regexp_split are inconsistent

2007-08-11 Thread Stephan Szabo
On Fri, 10 Aug 2007, Tom Lane wrote: > I noticed the following behavior in CVS HEAD, using a pattern that is > capable of matching no characters: > > regression=# SELECT foo FROM regexp_matches('ab cde', $re$\s*$re$, 'g') AS > foo; > foo > --- > {""} > {""} > {" "} > {""} > {""} > {"

Re: [HACKERS] Polymorphic arguments and composite types

2007-10-05 Thread Stephan Szabo
On Fri, 5 Oct 2007, Simon Riggs wrote: > Because we already do exactly that here: > > select 1, (select col2 from c), 3; > > The inner select returns a ROW, yet we treat it as a single column > value. The inner select does not return a row. It's not a , it's a . ---

Re: [HACKERS] Polymorphic arguments and composite types

2007-10-05 Thread Stephan Szabo
On Fri, 5 Oct 2007, Simon Riggs wrote: > On Fri, 2007-10-05 at 10:32 -0700, Stephan Szabo wrote: > > On Fri, 5 Oct 2007, Simon Riggs wrote: > > > > > Because we already do exactly that here: > > > > > > select 1, (select col2 from c), 3; > > >

Re: [HACKERS] Polymorphic arguments and composite types

2007-10-05 Thread Stephan Szabo
On Fri, 5 Oct 2007, Simon Riggs wrote: > On Fri, 2007-10-05 at 10:59 -0700, Stephan Szabo wrote: > > On Fri, 5 Oct 2007, Simon Riggs wrote: > > > > > On Fri, 2007-10-05 at 10:32 -0700, Stephan Szabo wrote: > > > > On Fri, 5 Oct 2007, Simon Riggs wrote: >

Re: [HACKERS] Polymorphic arguments and composite types

2007-10-06 Thread Stephan Szabo
On Fri, 5 Oct 2007, Simon Riggs wrote: > On Fri, 2007-10-05 at 11:24 -0700, Stephan Szabo wrote: > > On Fri, 5 Oct 2007, Simon Riggs wrote: > > > > > On Fri, 2007-10-05 at 10:59 -0700, Stephan Szabo wrote: > > > > On Fri, 5 Oct 2007, Simon Riggs wrote: > &

Re: [HACKERS] Polymorphic arguments and composite types

2007-10-06 Thread Stephan Szabo
On Sat, 6 Oct 2007, Simon Riggs wrote: > On Sat, 2007-10-06 at 10:15 -0700, Stephan Szabo wrote: > > > > Yeh, it does, but you're forgetting that my original complaint was that > > > you couldn't use it in an ANY clause, which 4.2 does not exclude. > >

Re: [HACKERS] incoherent view of serializable transactions

2008-12-23 Thread Stephan Szabo
On Tue, 23 Dec 2008, Kevin Grittner wrote: > The page locking provides this because every index page or data page > the serializable transaction looks at is locked against updates until > the end of the transaction. If it can see all the COLUMN=0 rows > through an index, the index locks protect

Re: [HACKERS] Trigger with WHEN clause (WIP)

2009-10-16 Thread Stephan Szabo
On Fri, 16 Oct 2009, Tom Lane wrote: > I note BTW that we have some ad-hoc logic already that arranges to > suppress queuing of AFTER events for FK triggers, if the FK column > value has not changed. It might be interesting to look at whether > that hack could be unified with the user-accessible

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Stephan Szabo
On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: > As I explained to Tom, if the after row trigger is called asynchronously > I get a relcache leak on the child table at the end of the copy > operation. If the trigger is called synchronously (like a before row > trigger) it works fine. Also calling t

Re: [HACKERS] Partitioning option for COPY

2009-11-22 Thread Stephan Szabo
On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: > Stephan Szabo wrote: > > On Sun, 22 Nov 2009, Emmanuel Cecchet wrote: > > > > > >> As I explained to Tom, if the after row trigger is called asynchronously > >> I get a relcache leak on the child table at the

Re: [HACKERS] [GENERAL] deadlock with truncate and foreing keys

2008-02-18 Thread Stephan Szabo
On Mon, 18 Feb 2008, Tom Lane wrote: > Alexey Nalbat <[EMAIL PROTECTED]> writes: > > create table t1 ( id integer primary key, name text ); > > create table t2 ( id integer references t1 ); > > insert into t1 values ( 1 ); > > insert into t2 values ( 1 ); > > > Then two concurrent transactions sta

Re: [HACKERS] cardinality()

2009-03-01 Thread Stephan Szabo
On Sun, 1 Mar 2009, Tom Lane wrote: > I wrote: > > The standard doesn't have multi-dimensional arrays, so it's entirely > > possible that somewhere in it there is wording that makes cardinality() > > equivalent to the length of the first dimension. But I concur with > > Andrew that this is flat w

Re: [HACKERS] Deadlock situation using foreign keys (reproduceable)

2002-04-11 Thread Stephan Szabo
On Thu, 11 Apr 2002, Mario Weilguni wrote: > As promised here's an example of deadlock using foreign keys. > > create table lang ( > id integer not null primary key, > name text > ); > insert into lang values (1, 'English'); > insert into lang values (2, 'German'); > > create table country (

Re: [HACKERS] Foreign Key woes -- 7.2 and ~7.3

2002-04-16 Thread Stephan Szabo
On Tue, 16 Apr 2002, Rod Taylor wrote: > b=# create table stuff (stuff_id serial unique); > NOTICE: CREATE TABLE will create implicit sequence > 'stuff_stuff_id_seq' for SERIAL column 'stuff.stuff_id' > NOTICE: CREATE TABLE / UNIQUE will create implicit index > 'stuff_stuff_id_key' for table 's

Re: [HACKERS] Index Scans become Seq Scans after VACUUM ANALYSE

2002-04-16 Thread Stephan Szabo
On Tue, 16 Apr 2002, Michael Loftis wrote: > I know I know, replying to myself is bad and probably means I'm going > insane but thought of one other thing... > > Realistically the system should choos *ANY* index over a sequential > table scan. Above a fairly low number of records any indexed que

Re: [HACKERS] Odd(?) RI-trigger behavior

2002-04-18 Thread Stephan Szabo
On Thu, 18 Apr 2002, Tom Lane wrote: > This particular test involves a table with a foreign-key reference to > itself, ie, it's both PK and FK. What apparently is happening is that > the two RI triggers are now being fired in a different order than > before. While either of them would have dete

Re: [HACKERS] Odd(?) RI-trigger behavior

2002-04-18 Thread Stephan Szabo
On Thu, 18 Apr 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > Didn't someone (Peter?) say that the mandated firing order was based on > > creation order/time in SQL99? > > It does say that: > > The order of execution of a

Re: [HACKERS] DROP TABLE hangs because of same table foreign key

2002-05-02 Thread Stephan Szabo
On Thu, 2 May 2002, Louis-David Mitterrand wrote: > > Hi, > > On 7.2.1 debian-unstable PG hangs when trying to drop a table which > contains a field referencing another field in the same table as a > foreign key. > > Is it legal/orhtodox to use a "references" on another field of the same > table?

Re: [HACKERS] set constraints behavior

2002-05-03 Thread Stephan Szabo
On Fri, 3 May 2002, Neil Conway wrote: > Hi all, > > The SQL92 spec has this to say about SET CONSTRAINTS DEFERRED: > > a) If ALL is specified, then the constraint mode in TXN of all >constraints that are DEFERRABLE is set to deferred. > > b) Otherwise, the constraint mode in TXN

Re: [HACKERS] set constraints behavior

2002-05-03 Thread Stephan Szabo
On Fri, 3 May 2002, Neil Conway wrote: > On Fri, 3 May 2002 10:39:28 -0700 (PDT) > "Stephan Szabo" <[EMAIL PROTECTED]> wrote: > > > > On Fri, 3 May 2002, Neil Conway wrote: > > > My reading of this: if you specify ALL, only the constraints marked >

Re: [HACKERS] Nested transactions RFC

2002-05-12 Thread Stephan Szabo
On Sun, 12 May 2002, Tom Lane wrote: > Manfred Koizar <[EMAIL PROTECTED]> writes: > > A *stack* of _active_ transaction numbers is not sufficient, we need > > the whole *tree* of _all_ transactions belonging to the current top > > level transaction. This is, want I wanted to model in my pg_subt

Re: [HACKERS] Join of small table with large table

2002-05-13 Thread Stephan Szabo
On Fri, 10 May 2002, large scale wrote: > Hi, > > I have two tables, one has 25000 rows and the other > has 6.5 million rows. > > (25000 rows) > table1 > (id text, > start int, > stop int) > > with seperate index on three individual fiels. > > 6.5 million rows > table2 > (id text, > start

Re: [HACKERS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Stephan Szabo
On Tue, 11 Jun 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > As a related side note. The other part of the original patch (the NOT > > EXISTS in the upd/del no action trigger) was rejected. For match > > full and match unspecified the same res

Re: First Win32 Contribution (Was: Re: [HACKERS] Democracy and

2002-06-20 Thread Stephan Szabo
On Thu, 20 Jun 2002, Jan Wieck wrote: > "Marc G. Fournier" wrote: > > > > On Thu, 20 Jun 2002, Bruce Momjian wrote: > > > > > This line bothers me. With multiple people working on Win32, I would > > > like us to decide how we would _like_ such a port to be implemented. I > > > think this will a

Re: [HACKERS] pg_dump and ALTER TABLE / ADD FOREIGN KEY

2002-06-24 Thread Stephan Szabo
On Sat, 22 Jun 2002, Matthew T. O'Connor wrote: > > However, others don't believe constraints other than foreign keys > > should go unchecked. > > > > That said, is this functionality wanted outside of pg_dump / > > pg_restore? > > pg_dump should reload a database as it was stored in the previou

Re: [HACKERS] Should this require CASCADE?

2002-07-10 Thread Stephan Szabo
On Wed, 10 Jul 2002, Tom Lane wrote: > Consider > > CREATE TABLE foo (f1 int primary key); > > CREATE TABLE bar (f1 int references foo); > > DROP TABLE foo RESTRICT; > > Should this succeed? Or should it be necessary to say DROP CASCADE to > get rid of the foreign-key reference

Re: [HACKERS] Should this require CASCADE?

2002-07-10 Thread Stephan Szabo
On Wed, 10 Jul 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > On Wed, 10 Jul 2002, Tom Lane wrote: > >> DROP TABLE foo RESTRICT; > >> > >> Should this succeed? Or should it be necessary to say DROP CASCADE to > >> get rid

Re: [HACKERS] string cast/compare broken?

2002-07-12 Thread Stephan Szabo
On Fri, 12 Jul 2002, Tom Lane wrote: > "Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: > >> If the conversion where varchar(5) --> char(5) then > >> they would compare equal. > > > I am not sure, since, if the varchar stored 'S ' then the comparison > > to a char 'S' should probably sti

Re: [HACKERS] Outer join differences

2002-07-30 Thread Stephan Szabo
On Tue, 30 Jul 2002, Yuva Chandolu wrote: > Hi, > > I see different results in Oracle and postgres for same outer join queries. > Here are the details. Those probably aren't the same outer join queries. > When I run the query "select yt1_name, yt1_descr, yt2_name, yt2_descr from > yuva_test1 l

Re: [HACKERS] Rules and Views

2002-08-01 Thread Stephan Szabo
On 1 Aug 2002, Hannu Krosing wrote: > On Thu, 2002-08-01 at 12:29, Curt Sampson wrote: > > On Thu, 1 Aug 2002, Zeugswetter Andreas SB SD wrote: > > > > > I had a "union all" view, which is actually a quite different animal than > > > a "union" view which needs to eliminate duplicates before furth

Re: [HACKERS] Rules and Views

2002-08-01 Thread Stephan Szabo
On Thu, 1 Aug 2002, Stephan Szabo wrote: > On 1 Aug 2002, Hannu Krosing wrote: > > > On Thu, 2002-08-01 at 12:29, Curt Sampson wrote: > > > On Thu, 1 Aug 2002, Zeugswetter Andreas SB SD wrote: > > > > > > > I had a "union all" view, which

Re: [HACKERS] Rules and Views

2002-08-01 Thread Stephan Szabo
On Thu, 1 Aug 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > For union, queries that want to do something like use a temporary > > sequence to act sort of like rownum and do row limiting. Admittedly > > that's already pretty much unspecif

Re: [HACKERS] Rules and Views

2002-08-01 Thread Stephan Szabo
On Thu, 1 Aug 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > If we assume two collations one case sensitive one not with the > > except in the non-sensitive and the where in the sensitive and > > a left with 'A' and right with 

Re: [HACKERS] Rules and Views

2002-08-01 Thread Stephan Szabo
On Thu, 1 Aug 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > So if T1 has a #dups>0 and T2 has a #dups>0 we should get > > no rows, but what if T1' (with the clause) has a #dups>0 but > > T2' has a #dups=0? > > Um, yo

[HACKERS] char/varchar truncation

2002-08-02 Thread Stephan Szabo
I wonder if we actually did the right thing with this. For example: select cast('ab' as char(1)); Using sql92's definitions, I read TD as a fixed length character string and SD as the same. Which means I think the section that comes into play is: SQL92 6.10 GR5 c ii ii) If the length in ch

[HACKERS] Alter table add foreign key

2002-08-15 Thread Stephan Szabo
I'm planning on trying out a version of the check done for foreign keys that does a query on the fktable with a NOT EXISTS subselect rather than the current run the trigger for each row (thus doing one query per row of the table). I want to see if this tends to be faster than what we're d

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-19 Thread Stephan Szabo
On Mon, 19 Aug 2002, Bruce Momjian wrote: > Joe Conway wrote: > > Tom Lane wrote: > > > Joe Conway <[EMAIL PROTECTED]> writes: > > >>I agree 100%. If you want an index, unique constraint, or primary key on > > >>a SERIAL, I think you should explicitly add it. SERIAL should give me a > > >>column

Re: [HACKERS] Proposal: make "opaque" obsolete

2002-08-20 Thread Stephan Szabo
On Tue, 20 Aug 2002, Tom Lane wrote: In general I think it sounds good, so I'm only responding to places where I want to say something specific. > I am not by any means wedded to the above type names; does anyone have > suggestions for better names? (In particular, I am wondering if "tuple" > a

Re: [HACKERS] Deadlock situation using foreign keys (reproduceable)

2002-08-25 Thread Stephan Szabo
cates a fix was being worked on. > > Date: Thu, 11 Apr 2002 09:03:06 -0700 (PDT) > From: Stephan Szabo > > Please see past disussions on the fact that the lock grabbed is too > strong. I'm going to (when I get time to work on it) try out a lower > strength lock that Alex Hayward

Re: [HACKERS] Deadlock situation using foreign keys (reproduceable)

2002-08-25 Thread Stephan Szabo
On 26 Aug 2002, Thomas O'Dowd wrote: > Thanks for your feedback Stephan. Seems like a tough fix. Pitty it won't > make it into 7.3. I presume there are other folk out there suffering > from the same problems that I'm having. What approaches if any have > people taken to work around this problem?

Re: [HACKERS] Deadlock situation using foreign keys (reproduceable)

2002-08-26 Thread Stephan Szabo
On Mon, 26 Aug 2002, Mario Weilguni wrote: > I wrote this patch for my system, and it works fine. However, it's a > really ugly workaround. I can publish the source if anybody is > interested. Which, the for update one or a lower strength lock? In either case, certainly.

Re: [HACKERS] Deadlock situation using foreign keys (reproduceable)

2002-08-26 Thread Stephan Szabo
On Mon, 26 Aug 2002, Mario Weilguni wrote: > Not a lower strength lock, I would, but I'm not so familiar with the postgres > internals. I modified ri-triggers.c to exclude certain tables from the > locking itself (because I know the tables are not updated). It might help the op of this thread, s

Re: [HACKERS] PREPARE, FK's and VIEWs

2002-08-28 Thread Stephan Szabo
On Wed, 28 Aug 2002, Christopher Kings-Lynne wrote: > Now that we have prepared statements, should the foreign key code be changed > to use them? I think it's highly likely that they will be reused in a > connection. Might be an idea. It might be worth doing eventually just to standardize, but

Re: [HACKERS] serial type as foreign key referential integrity

2002-09-03 Thread Stephan Szabo
On 31 Aug 2002, Zhicong Leo Liang wrote: > Hi all, > Just briefly describe my problem. > I have two tables. > create table A( >a1 serial primary key, >a2 varchars(10) > ); > create table B( > b1 integer primary key, > b2 Integer, > foreign key(b2) references a(a1)

Re: [HACKERS] locking of referenced table during constraint construction

2002-09-04 Thread Stephan Szabo
On 4 Sep 2002, Scott Shattuck wrote: > Under what conditions would the following statement cause the USERS > table to lock out selects? > > > alter table my_coupons > add constraint FK_mc_user_id > FOREIGN KEY (mc_frn_user_id) > REFERENCES users(user_ID); If I'm reading code correctly, an

Re: [HACKERS] locking of referenced table during constraint

2002-09-04 Thread Stephan Szabo
On 4 Sep 2002, Scott Shattuck wrote: > On Wed, 2002-09-04 at 15:51, Stephan Szabo wrote: > > > > On 4 Sep 2002, Scott Shattuck wrote: > > > > > Under what conditions would the following statement cause the USERS > > > table to lock out selects? &

Re: [HACKERS] Add check constraint bug

2002-09-05 Thread Stephan Szabo
On Thu, 5 Sep 2002, Peter Eisentraut wrote: > The following happens in latest CVS and a fresh database: > > create table test (a int); > insert into test values (1); > alter table test add column b text check (b <> ''); > alter table test add check (a > 0); > alter table test add check (a <> 1);

Re: [HACKERS] Proposal: Solving the "Return proper effected tuple

2002-09-08 Thread Stephan Szabo
On Sun, 8 Sep 2002, Steve Howe wrote: > Here are the proposals for solutioning the "Return proper effected > tuple count from complex commands [return]" issue as seen on TODO. > > Any comments ?... This is obviously open to voting and discussion. As it seems we're voting, I think Tom's scheme i

Re: [HACKERS] Rule updates and PQcmdstatus() issue

2002-09-09 Thread Stephan Szabo
On Mon, 9 Sep 2002, Steve Howe wrote: > JW> Steve Howe wrote: > >> > >> Hello all, > >> > >> PostgreSQL *still* has a bug where PQcmdStatus() won't return the > >> number of rows updated. But that is essential for applications, since > >> without it of course we don't know if the updates/delete/

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-09 Thread Stephan Szabo
On Tue, 10 Sep 2002, snpe wrote: > On Monday 09 September 2002 11:03 pm, Rod Taylor wrote: > > On Mon, 2002-09-09 at 17:04, snpe wrote: > > > I'm use 'autocommit=false' and have problem with psql > > > When any commnad is lost, then next commnad get error for transactions > > > (simple select co

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-09 Thread Stephan Szabo
On Tue, 10 Sep 2002, snpe wrote: > On Tuesday 10 September 2002 03:05 am, Stephan Szabo wrote: > > On Tue, 10 Sep 2002, snpe wrote: > > > On Monday 09 September 2002 11:03 pm, Rod Taylor wrote: > > > > On Mon, 2002-09-09 at 17:04, snpe wrote: > > >

Re: [HACKERS] Rule updates and PQcmdstatus() issue

2002-09-09 Thread Stephan Szabo
On Mon, 9 Sep 2002, Bruce Momjian wrote: > Jan Wieck wrote: > > We should surely keep this on a much more technical level and avoid any > > personal offendings. To do so, please explain to me why you think that > > triggers and constraints are out of focus here? What is the difference > > between

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
> > > > It starts a transaction, failes the first command and goes into the > > > > error has occurred in this transaction state. Seems like reasonable > > > > behavior. > > > > > > Select command don't start transaction - it is not good > > > > I think you need more justification than "it is not

Re: [HACKERS] Rule updates and PQcmdstatus() issue

2002-09-10 Thread Stephan Szabo
On Tue, 10 Sep 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > On Mon, 9 Sep 2002, Bruce Momjian wrote: > >> All the problems here are coming from INSTEAD rules. We don't have > >> INSTEAD triggers or contraints. > > >

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Tue, 10 Sep 2002, scott.marlowe wrote: > On Tue, 10 Sep 2002, Stephan Szabo wrote: > > > > > > > It starts a transaction, failes the first command and goes into the > > > > > > error has occurred in this transaction state.

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Tue, 10 Sep 2002, snpe wrote: > On Tuesday 10 September 2002 07:46 pm, scott.marlowe wrote: > > What if it's a select for update? IF that failed because of a timout on a > > lock, shouldn't the transaction fail? Or a select into? Either of those > > should make a transaction fail, and they

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Tuesday 10 September 2002 11:50 pm, Stephan Szabo wrote: > > On Tue, 10 Sep 2002, snpe wrote: > > > On Tuesday 10 September 2002 07:46 pm, scott.marlowe wrote: > > > > What if it's a select for update? IF that failed be

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > yes, we're going around in circles. > > Ok.I agreed (I think because Oracle do different) > Transaction start > I type invalid command > I correct command > I get error > > Why.If is it transactin, why I get error > I want continue. > I am see this error with JD

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 02:09 am, Stephan Szabo wrote: > > On Wed, 11 Sep 2002, snpe wrote: > > > yes, we're going around in circles. > > > > > > Ok.I agreed (I think because Oracle do different) > > &

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-10 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 02:09 am, Stephan Szabo wrote: > > On Wed, 11 Sep 2002, snpe wrote: > > > yes, we're going around in circles. > > > > > > Ok.I agreed (I think because Oracle do different) > > &

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-11 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 04:58 am, Stephan Szabo wrote: > > On Wed, 11 Sep 2002, snpe wrote: > > > On Wednesday 11 September 2002 02:09 am, Stephan Szabo wrote: > > > > On Wed, 11 Sep 2002, snpe wrote: > > >

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-11 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 03:14 am, Stephan Szabo wrote: > > On Wed, 11 Sep 2002, snpe wrote: > > > On Wednesday 11 September 2002 02:09 am, Stephan Szabo wrote: > > > > On Wed, 11 Sep 2002, snpe wrote: > > >

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-11 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 02:38 pm, Rod Taylor wrote: > > > > > Why rollback.This is error (typing error).Nothing happen. > > > > > I think that we need clear set : what is start transaction ? > > > > > I think that transaction start with change data in da

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-11 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 02:55 pm, Stephan Szabo wrote: > > On Wed, 11 Sep 2002, snpe wrote: > > > > > > If decision (transaction or not) is after parser (before execute) this > > > isn't problem. > > &g

Re: [HACKERS] problem with new autocommit config parameter and jdbc

2002-09-11 Thread Stephan Szabo
On Wed, 11 Sep 2002, snpe wrote: > On Wednesday 11 September 2002 06:11 pm, Stephan Szabo wrote: > > > I again am not sure I understand, are you saying that under serializable > > select should start a transaction but it shouldn't under read committed? > > Tha

Re: [HACKERS] Win32 rename()/unlink() questions

2002-09-19 Thread Stephan Szabo
On Fri, 20 Sep 2002, Mike Mascari wrote: > Bruce Momjian wrote: > > Mike Mascari wrote: > > > >>Actually, looking at the pg_pwd code, you want to determine a > >>way for: > >> > >>1. Process 1 opens "foo" > >>2. Process 2 opens "foo" > >>3. Process 1 creates "bar" > >>4. Process 1 renames "bar"

Re: [HACKERS] Win32 rename()/unlink() questions

2002-09-19 Thread Stephan Szabo
On Fri, 20 Sep 2002, Mike Mascari wrote: > Stephan Szabo wrote: > > On Fri, 20 Sep 2002, Mike Mascari wrote: > >>So far, MoveFileEx("foo", "bar", MOVEFILE_REPLACE_EXISTING) > >>returns "Access Denied" when Process 1 attempts the rename

Re: [HACKERS] Win32 rename()/unlink() questions

2002-09-20 Thread Stephan Szabo
On Fri, 20 Sep 2002, Mike Mascari wrote: > Bruce Momjian wrote: > > I don't think we are not going to be supporting Win9X so there isn't an > > issue there. We will be supporting Win2000/NT/XP. > > > > I don't understand FILE_SHARE_DELETE. I read the description at: > > > > >http://msdn.mi

Re: [HACKERS] [GENERAL] timestamp parse error

2002-09-20 Thread Stephan Szabo
On Fri, 20 Sep 2002, Tomas Lehuta wrote: > Hello! > > i'm using PostgreSQL 7.2.1 and got strange parse errors.. > could somebody tell me what's wrong with this timestamp query example? > > PostgreSQL said: ERROR: parser: parse error at or near "date" > Your query: > > select timestamp(date '1998-

Re: [HACKERS] Reconstructing FKs in pg_dump

2002-09-26 Thread Stephan Szabo
On Thu, 26 Sep 2002, Tom Lane wrote: > Patrick Welche's recent problems (see pgsql-general) point out that the > old CREATE CONSTRAINT TRIGGER syntax that optionally omits a "FROM > table" clause doesn't work anymore --- the system *needs* tgconstrrelid > to be set in an RI constraint trigger rec

Re: [HACKERS] Reconstructing FKs in pg_dump

2002-09-26 Thread Stephan Szabo
On Thu, 26 Sep 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > >> However, if we are going to put that kind of knowledge into pg_dump, > >> it would only be a small further step to have it dump these triggers > >> as ALTER TABLE ADD CONST

Re: [HACKERS] 7.2.3?

2002-09-28 Thread Stephan Szabo
On Sat, 28 Sep 2002, Bruce Momjian wrote: > I have seen no discussion on whether to go ahead with a 7.2.3 to add > several serious fixes Tom has made to the code in the past few days. > > Are we too close to 7.3 for this to be worthwhile? Certainly there will > be people distributing 7.2.X for s

[HACKERS] Request for suggestions

2002-10-09 Thread Stephan Szabo
I've been working on kludging a working for update barrier style lock (*) for reads using HeapTupleSatisfiesDirty to test accessibility to make the foreign keys work better. I'm fairly close to getting a testable kludge for the fk/noaction cases for people to check real sequences against (since

[HACKERS] (Followup) Request for suggestions

2002-10-09 Thread Stephan Szabo
I wasn't particularly clear (sorry, wrote the message 1/2 right before bed, 1/2 right after getting up) so I'm going to followup with details and hope that I'm more awake. A little background just in case there are people that haven't looked. Right now, foreign key checks always default to usi

Re: [HACKERS] Damn slow query

2002-10-09 Thread Stephan Szabo
On Wed, 9 Oct 2002, Magnus Naeslund(f) wrote: > Hello, i've got this query that's really slow... > Figure this: > > testdb=> select now() ; select gid from bs where gid not in ( select x > from z2test ); select now(); Per FAQ suggestion, try something like select gid from bs where not exists (s

Re: [HACKERS] foreign key problem with pg_dump under 7.3b2

2002-10-15 Thread Stephan Szabo
On 15 Oct 2002, John Halderman wrote: > I'm currently using 7.3b2 for test and development. I ran into a problem > using a dumped schema from pg_dump. After importing the dumped schema, > any delete or update involving a foreign key results in a relation 0 > does not exist error. I noticed that a

Re: [HACKERS] Strange cost computation?

2002-10-30 Thread Stephan Szabo
On 29 Oct 2002, Ives Landrieu wrote: > Hi, > > Can anybody explain the following results when using EXPLAIN, > one time with enable_seqscan=on and one time with enable_seqscan=off. > What I don't understand is that the nodes created are the same > (index scan, seq scan), but the costs differ. Ena

Re: [HACKERS] Strange cost computation?

2002-10-30 Thread Stephan Szabo
On Wed, 30 Oct 2002, Stephan Szabo wrote: > On 29 Oct 2002, Ives Landrieu wrote: > > > Hi, > > > > Can anybody explain the following results when using EXPLAIN, > > one time with enable_seqscan=on and one time with enable_seqscan=off. > > What I don't und

Re: [HACKERS] float output precision questions

2002-10-30 Thread Stephan Szabo
On Wed, 30 Oct 2002, Pedro Miguel Frazao Fernandes Ferreira wrote: > In C this is possible: > > #include > #include > > int main(void) > { >double v; >char a[30]; > >v=1.79769313486231571e+308; > >printf(" Stored double number: %25.18g\n",v); >sprintf(a,"%25.18g",v)

Re: [HACKERS] Request for supported platforms

2002-10-26 Thread Stephan Szabo
On 26 Oct 2002, Doug McNaught wrote: > Tom Lane <[EMAIL PROTECTED]> writes: > > > Doug McNaught <[EMAIL PROTECTED]> writes: > > > make[3]: Entering directory >`/home/doug/src/pgsql/src/backend/utils/mb/conversion_procs/ascii_and_mic' > > > gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declaration

Re: [HACKERS] float output precision questions

2002-10-29 Thread Stephan Szabo
On Tue, 29 Oct 2002, Peter Eisentraut wrote: > Pedro Miguel Frazao Fernandes Ferreira writes: > > > Is there a way to set query output precision to maximum precision ? > > For the type of application I mentioned this is crucial. People want to > > get the 'same' numbers, from querys or dumps, as t

Re: [HACKERS] float output precision questions

2002-10-30 Thread Stephan Szabo
On Wed, 30 Oct 2002, Pedro Miguel Frazao Fernandes Ferreira wrote: > Stephan Szabo wrote: > > On Tue, 29 Oct 2002, Peter Eisentraut wrote: > > > > > >>Pedro Miguel Frazao Fernandes Ferreira writes: > >> > >> > >>>Is there a way to se

Re: [HACKERS] float output precision questions

2002-10-30 Thread Stephan Szabo
On Wed, 30 Oct 2002, Pedro M. Ferreira wrote: > Stephan Szabo wrote: > > On Wed, 30 Oct 2002, Pedro Miguel Frazao Fernandes Ferreira wrote: > >> > >>I understand that if people insert a value of 1.1 in a double, they want > >>to get 1.1 without knowi

Re: [HACKERS] float output precision questions

2002-10-30 Thread Stephan Szabo
On Wed, 30 Oct 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > On Wed, 30 Oct 2002, Pedro M. Ferreira wrote: > >> I looked at some of these emails and it seemed to me that the problem > >> was that Tom did'nt want a parameter that would

Re: [HACKERS] [ADMIN] Security question : Database access control

2002-10-22 Thread Stephan Szabo
On Tue, 22 Oct 2002, Igor Georgiev wrote: > > > edit *pg_hba.conf * > > > # Allow any user on the local system to connect to any > > > # database under any username, but only via an IP connection: > > > host all 127.0.0.1 255.255.255.255trust >

Re: [ADMIN] [HACKERS] Security question : Database access control

2002-10-25 Thread Stephan Szabo
On Fri, 25 Oct 2002, Igor Georgiev wrote: > > > Next your going to ask what will stop root from stopping your > > PostgreSQL, compiling a second copy with authentication disabled and > > using your data directory as it's source :) > > He he somebody can blow up ur home with C4, but this don't stop

Re: [HACKERS] [SQL] Problem: Referential Integrity Constraints lost

2002-11-06 Thread Stephan Szabo
On Wed, 6 Nov 2002, Achilleus Mantzios wrote: > > Hi i think a hit a major problem on 7.2.1. > I run 3 systems with postgresql 7.2.1. > Its a redhat 7.1 for development, a redhat 7.3 for production > and a FreeBSD 4.6.1RC2 for testing. > > After long runs (with periodic (daily) vacuum analyze's) >

Re: [HACKERS] PL/PgSQL buglet / doc error

2002-11-07 Thread Stephan Szabo
On 7 Nov 2002, Neil Conway wrote: > The 7.3 docs for the PL/PgSQL return statement say: > > RETURN with an expression is used to return from a PL/pgSQL function > that does not return a set. > > [...] > > If you have declared the function to return void, then the expression > can be omitted,

[HACKERS] Question about row visibility after locks

2002-11-08 Thread Stephan Szabo
I've been wondering (and probably should look through the code, but figured asking would be faster) if there's any guarantee that I'll see rows inserted by a transaction I'm waiting on in the middle of a query. Basically, if I've got a select that's running using HeapTupleSatisfiesDirty so that I

Re: [HACKERS] Question about row visibility after locks

2002-11-09 Thread Stephan Szabo
On Sat, 9 Nov 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > Basically, if I've got a select that's running using > > HeapTupleSatisfiesDirty so that I can see uncommitted rows > > and I block in the middle for another transaction (wai

Re: [HACKERS] [GENERAL] PostgreSQL JDBC and sub-select

2002-11-09 Thread Stephan Szabo
On Sat, 9 Nov 2002, snpe wrote: > Hello, > I work with JDeveloper and PostgreSQL JDBC and I have one problem. > I get error : > sub-SELECT in FORM must have an alias > I can't change SQL command, but it is internal JDeveloper command > > Is it SQL standard (must have alias) or PostgreSQL spec

Re: [HACKERS] RI_FKey_check: foreign key constraint blocks parallel

2002-11-13 Thread Stephan Szabo
On Wed, 13 Nov 2002, Peter Schindler wrote: > But, if a lot of inserts happens into the child table and there is a > mix of short and long running transactions, the likelihood of blocking > is very high, even the inserts are independent and everything is ok > (prim. key etc.). This is even more e

Re: [HACKERS] create or replace view

2002-11-14 Thread Stephan Szabo
On Thu, 14 Nov 2002, Scott Shattuck wrote: > It might just be me but it seems that this discussion is missing the > point if we believe this request is about saving some characters. I > don't think it is. I think it's about being able to write simple SQL > scripts that don't produce errors when yo

Re: [HACKERS] create or replace view

2002-11-14 Thread Stephan Szabo
On Thu, 14 Nov 2002, snpe wrote: > Problem is when I want change view (or functions) with a lot of dependecies > I must drop and recreate all dependent views (or functions) - I want add only > one column in view > I don't know if solution hard for that. Well, doing create or replace as a drop/cr

Re: [HACKERS] create or replace view

2002-11-15 Thread Stephan Szabo
On Fri, 15 Nov 2002, Zeugswetter Andreas SB SD wrote: > > > Problem is when I want change view (or functions) with a lot of dependecies > > I must drop and recreate all dependent views (or functions) - > > I want add only one column in view > > I don't know if solution hard for that. > > I do not

Re: [HACKERS] RI_FKey_check: foreign key constraint blocks parallel

2002-11-15 Thread Stephan Szabo
On Fri, 15 Nov 2002, Manfred Koizar wrote: > On Wed, 13 Nov 2002 14:22:51 -0800 (PST), Stephan Szabo > <[EMAIL PROTECTED]> wrote: > >Right now, I know that it has a hole that lets through invalid data > > Stephan, your patch has been posted to -general (Subject: Re

Re: [HACKERS] RI_FKey_check: foreign key constraint blocks parall

2002-11-15 Thread Stephan Szabo
On Fri, 15 Nov 2002, Mikheev, Vadim wrote: > Just wonder how are you going to implement it - is it by using > some kind of "read-locks", ie FK transaction "locks" PK to prevent > delete (this is known as "pessimistic" approach)? > About two years ago we discussed with Jan "optimistic" approach > w

  1   2   3   4   5   6   >