Re: [GENERAL] psql reports back wrong number of affected rows.

2011-06-17 Thread Erwin Moller
FROM and WHERE clauses. Agree 100%. I am not a big fan of CASCADING effects (I rather do it 'by hand'), but in this case it was a really easy solution. Thanks you for your response. Regards, Erwin Moller David J. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

[GENERAL] psql reports back wrong number of affected rows.

2011-06-14 Thread Erwin Moller
rows that had a 1 for parentissueid. (5 in my testcase). That was correct, and as I intended, but why does Postgres answer DELETE 1 instead of DELETE 6? Can somebody explain that to me please? Thanks for your time. Regards, Erwin Moller PS: I found a few possible relevant postings. One of them

[GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Erwin Moller
. :-/ Can anybody comment on this behaviour? Am I missing something? Thanks! Regards, Erwin Moller -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Erwin Moller
Alvaro Herrera schreef: Erwin Moller wrote: I thought a transaction that is rolled back, rolls back *everything* done in that transaction. Appearantly sequences are not included. Hi Alvaro, Thanks for your reply. Yes. This is actually a desirable property, because it allows

[GENERAL] create a 'range' of dates/numbers?

2008-12-19 Thread Erwin Moller
been looking through the manual, but cannot find anything. Maybe it doesn't exist. Thanks for your time. Regards, Erwin Moller -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] create a 'range' of dates/numbers?

2008-12-19 Thread Erwin Moller
A. Kretschmer schreef: In response to Erwin Moller : Hi, Is it possible to create a range of dates or numbers inside a query without wrining in procedural language? I am looking for something that creates some kind of 'temp table' inside a query. eg: generate_Series(): test

[GENERAL] noobquestion: How does Postgres delete 'smart' when deleting with FK contraints?

2008-12-10 Thread Erwin Moller
, Erwin Moller -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Foreign Key 'walker'?

2008-11-19 Thread Erwin Moller
Craig Ringer schreef: Erwin Moller wrote: No, that is not the kind of chicken I was talking about. ;-) My chicken is more along these lines: I often have some tables to which everything is related (eg tblcourse that contains everything belonging to a certain course). I don't want to make

Re: [GENERAL] Foreign Key 'walker'?

2008-11-19 Thread Erwin Moller
Hi Pavel, Thanks for that. But I already wrote a nice extension to my DB-class in PHP that uses Thomas Kellerer's approach. It was simple once you know how to retrieve the info from the systemtables. :-) Regards, Erwin Moller Pavel Stehule schreef: Hello I used this code CREATE

Re: [GENERAL] Foreign Key 'walker'?

2008-11-19 Thread Erwin Moller
Erwin Moller schreef: Craig Ringer schreef: Erwin Moller wrote: No, that is not the kind of chicken I was talking about. ;-) My chicken is more along these lines: I often have some tables to which everything is related (eg tblcourse that contains everything belonging to a certain course). I

[GENERAL] Foreign Key 'walker'?

2008-11-18 Thread Erwin Moller
kind of FK 'walker'. I want this because: 1) I hate DELETE CASCADE because I am chicken (So I use a script to delete all related records in the right order in a transaction) 2) I have a lot of tables and am afraid I miss some. And I am also a bit lazy .-) Thanks for your time. Regards, Erwin

Re: [GENERAL] Foreign Key 'walker'?

2008-11-18 Thread Erwin Moller
ries van Twisk schreef: On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote: Hi group, Considering following (simplified) example: CREATE TABLE tblnr1( nr1id SERIAL PRIMARY KEY, firstname TEXT ); CREATE TABLE tblnr2( nr2id SERIAL PRIMARY KEY, nr1id INTEGER REFERENCES tblnr1(nr1id) ); CREATE

Re: [GENERAL] Foreign Key 'walker'?

2008-11-18 Thread Erwin Moller
Thomas Kellerer schreef: Erwin Moller, 18.11.2008 15:47: Suppose I want to delete a record in tblnr1. Does Postgres has some command/procedure/function to list tables that have FK constraints on that table (tblnr1) That could be resolved with a query against the INFORMATION_SCHEMA Something

Re: [GENERAL] Foreign Key 'walker'?

2008-11-18 Thread Erwin Moller
Shane Ambler schreef: ries van Twisk wrote: On Nov 18, 2008, at 9:47 AM, Erwin Moller wrote: Hi group, Considering following (simplified) example: snip Suppose I want to delete a record in tblnr1. Does Postgres has some command/procedure/function to list tables that have FK constraints

[GENERAL] missing FROM-clause entry for table

2008-11-12 Thread Erwin Moller
because that makes sense in my current project.) I Googled a little for the errormessage, but to no avail. The second query is also good enough for me, but I am curious what I am missing here. What is causing this? Thanks for your time. Regards, Erwin Moller -- Sent via pgsql-general mailing

Re: [GENERAL] missing FROM-clause entry for table

2008-11-12 Thread Erwin Moller
Raymond O'Donnell schreef: On 12/11/2008 18:08, Erwin Moller wrote: LEFT OUTER JOIN tblcategorypropertylang AS CPL ON ((CLP.languageid=DRV1.languageid) AND (CPL.categorypropertyid=DRV1.categorypropertyid)); ERROR: missing FROM-clause entry for table clp You've a typo in the query

[GENERAL] UTF8 in commandprompt (CMD) on XP fails. Tips?

2008-08-15 Thread Erwin Moller
(probably the latter) Anyway, Is it possible to have psql working with UTF8 in a windows commandprompt? TIA! Regards, Erwin Moller -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Strange error while working with derived table

2007-11-12 Thread Erwin Moller
' on the fly, I should tell WHAT I am using. What I don't understand is why Postgres8.1 need the cast to TEXT for 1 entry in my derived table, and NOT when I use more (using UNION)?? Any clues much appriciated. :-) Regards and TIA, Erwin Moller -- --- Erwin Moller Darwine BV

Re: [GENERAL] Postgres8: subselect and optimizer/planner

2007-10-04 Thread Erwin Moller
Erwin Moller wrote: SELECT U.userid, U.username, (SELECT G.groupname FROM tblgroup WHERE (G.userid=U.userid)) AS ingroup typo, that should be 'tblgroup as G' of course. FROM tbluser WHERE (bla..bla...); --- Erwin Moller Darwine BV Groenendaal 25f 3011 SK Rotterdam tel

[GENERAL] Postgres8: subselect and optimizer/planner

2007-10-04 Thread Erwin Moller
general and is the answer 'it depends'? I found a lot of queries I wrote like that in earlier projects, and I wonder if I should fix them. Thanks for any insights! Regards, Erwin Moller -- --- Erwin Moller Darwine BV Groenendaal 25f 3011 SK Rotterdam tel 010-2133996

Re: [GENERAL] Tutorial EXPLAIN for idiots?

2007-09-07 Thread Erwin Moller
A. Kretschmer wrote: am Fri, dem 07.09.2007, um 12:30:06 +0200 mailte Erwin Moller folgendes: Hi group, Does anybody know of an tutorial for EXPLAIN for idiots like me? (I am fairly confortable with Postgres, but never used EXPLAIN before.) I need to optimize a few slow running queries

[GENERAL] Tutorial EXPLAIN for idiots?

2007-09-07 Thread Erwin Moller
/performance-tips.html A bit hard for starters. :-/ Any tips/sites? TIA Regards, Erwin -- --- Erwin Moller Darwine BV Groenendaal 25f 3011 SK Rotterdam tel 010-2133996 --- ---(end of broadcast)--- TIP 6: explain

Re: [GENERAL] TSEARCH2: disable stemming in indexes and triggers

2007-06-05 Thread Erwin Moller
it worked for some reason beyound my meager knowledge. Thanks to Oleg Bartunov too for his suggestion about writing my own procedure. This solution seemed simpler and worked the first time right away. Thanks for your help! Regards, Erwin Moller If your locale setting is not C then mark needed

[GENERAL] TSEARCH2: disable stemming in indexes and triggers

2007-05-31 Thread Erwin Moller
, divafdelingwerkgever); Step 2 worked fine: no stemming. But how do I cange my step6 (trigger) so it keeps using 'simple'? Or do I have to change the index itself (step4) too? Or both? Please advise. Thanks for your time. Regards, Erwin Moller --- PS: This is my