Re: [SQL] Tuple insert missing query in ongoing transaction

2005-08-24 Thread Szűcs Gábor
Dear DAQ, Thanks for the native answer ;) For those who have concerns reading Hungarian, here is an excerpt including my answer. You adviced me to issue an ACCESS EXCLUSIVE lock on table "shift" in transaction B, before issuing the actual insert, so that the insert will wait till the end of

[SQL] Tuple insert missing query in ongoing transaction

2005-08-23 Thread Szűcs Gábor
Dear Gurus, I know this is the typical case of transaction use, I just seem to lack the appropriate education of what exactly happens and whether I may be able to detect it. I have two queries, one affecting the other. 1. INSERT INTO barcode. A BEFORE INSERT/UPDATE trigger checks if there's

Re: [SQL] could not devise a query plan

2005-05-24 Thread Szűcs Gábor
Dear Gnanavel, (please reply to the lists...) Indeed it works! Still, I think it's a bug. As for this solution being a workaround, it's a bit of pain, since the subselect names (effectively, the included subselects) are not constant. As for my workaround, I used a condition to not include t

Re: [SQL] could not devise a query plan

2005-05-24 Thread Szűcs Gábor
Dear Gurus, Sorry for upping a 13-month-old thread; please tell if I should've opened another one. Here I come again, with another silly join. Please forgive me, but our queries are built from blocks :) VERSION: 7.4.6, 7.4.8, 8.0.0rc4 (sorry, no newer installed right now) ABSTRACT: The fol

[SQL] failed to find conversion function from "unknown" to text

2005-01-12 Thread Szűcs Gábor
Dear Gurus, Version: 8.0.0rc4 The scene below might look funny but it's essential for our project: [local]:tir=# select 'a' as asdf; asdf -- a (1 row) [local]:tir=# select case 'a' when 'a' then 1 else 2 end as asdf; ERROR: failed to find conversion function from "unknown" to t

Re: [SQL] Delayed result from another connection

2004-11-05 Thread SZŰCS Gábor
Dear Tom, Thanks for the explanation, it's more than enough. Some more questions if you don't mind: - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> Sent: Thursday, November 04, 2004 6:46 PM > =?iso-8859-2?B?U1rbQ1MgR+Fib3I=?= <[EMAIL PROTECTED]> writes: > > The php connects t

[SQL] Delayed result from another connection

2004-11-04 Thread SZŰCS Gábor
Dear Gurus, I have a strange scenario that doesn't seem to work flawlessly. I think I can produce a full working example if needed. We use postgresql 7.4.5 It's something like this: %--- cut here ---% CREATE TABLE php_retval(id serial PRIMARY KEY, retval v

Re: [SQL] Constraint->function dependency and dump in 7.3

2004-07-13 Thread SZŰCS Gábor
Dear Rod, That sounds as good as simple ;) As for as patching, we do something like that. Developed a PHP script that compares schema files (not dumps, but source codes instead) to the actual. Say, it creates a temp table and compares it to the existing one, examining pg_attributes, pg_indexes, pg

[SQL] Certain COPY's ignored from dump?

2004-07-13 Thread SZŰCS Gábor
Dear Gurus, Dumping from 7.3 to 7.4 seems to omit some of the COPY commands, without any warning or error. The table is created, there are notices about indexes in the log, but COPY doesn't seem to happen-- the table remains empty at the end of the dump. As far as we discovered, these are a couple

Re: [SQL] Constraint->function dependency and dump in 7.3

2004-07-13 Thread SZŰCS Gábor
Dear Rod, Thanks. It'll be a pain to have two versions between the prod and devel servers, but I'll forward this info to the chief. Thanks again, G. %--- cut here ---% \end - Original Message - From: "Rod Taylor" <[EMAIL PROTECTED]> Sent: Tuesday,

Re: [SQL] Constraint->function dependency and dump in 7.3

2004-07-13 Thread SZŰCS Gábor
ything. G. %--- cut here ---% \end - Original Message - From: "Rod Taylor" <[EMAIL PROTECTED]> Sent: Monday, July 12, 2004 2:51 PM Subject: Re: [SQL] Constraint->function dependency and dump in 7.3 > On Mon, 2004-07-12 at 08:29, SZ

Re: [SQL] Constraint->function dependency and dump in 7.3

2004-07-12 Thread SZŰCS Gábor
Dear Fellow Countymen, I fear none of your answers are acceptable for me. Also, from Csaba's answer, this sounds to me more like a bug in pg_dump v7.3. (1) I wish to transfer the full dump for daily mirroring. Thus, data-only isn't an option. (2) Dumping functions first won't work for SQL functi

[SQL] Constraint->function dependency and dump in 7.3

2004-07-08 Thread SZŰCS Gábor
Dear Gurus, Just recently realized that our daily dump from a 7.3 (production) db to a 7.4 (development) server has problems. I have no idea where to search for an answer so please feel free to point me to the appropriate thread, doc or TFM :) Below is two portions of the dump, which seems to be

[SQL] Immutable function in index

2004-07-06 Thread SZŰCS Gábor
Dear Gurus, Version: PostgreSQL 7.3.3 Log: %--- cut here ---% tir=# CREATE INDEX ajanlat_cikk ON ajanlat (antinuller(cikk), antinuller(minoseg), tol); ERROR: parser: parse error at or near "," at character 55 tir=# CREATE INDEX ajanlat_szolg ON ajanlat (ant

Re: [SQL] could not devise a query plan

2004-04-09 Thread SZŰCS Gábor
-% \end - Original Message - From: "SZŰCS Gábor" <[EMAIL PROTECTED]> Sent: Tuesday, April 06, 2004 3:12 PM ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] could not devise a query plan

2004-04-06 Thread SZŰCS Gábor
Dear Gurus, I couldn't find the string of my email's subject on the web, except for one place: the PostgreSQL source :) So I'm desperate. -- VERSION I'm using "PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC 2.95.4" with the patch for "shown aggregate columns is 0" (if you know what I me

Re: [SQL] numeric and float converts to int differently?

2003-10-28 Thread SZŰCS Gábor
Dear Ken, reply goes to the list if you don't mind :) - Original Message - From: "Kenneth Marshall" <[EMAIL PROTECTED]> To: "SZŰCS Gábor" <[EMAIL PROTECTED]> Sent: Tuesday, October 28, 2003 4:45 PM > Postgres is using the standard definit

[SQL] numeric and float converts to int differently?

2003-10-28 Thread SZŰCS Gábor
Dear Gurus, I'm using PostgreSQL 7.3.3. I was wondering if this is undefined, intentional or to be changed/fixed in the future. See the snippit at the end of this mail. QUESTION 1: Is it intentional that converting 0.5 to int4 - from numeric: rounds *away from* zero - from float: rounds *towards

[SQL] Order of triggers - totally lost

2003-08-14 Thread SZŰCS Gábor
Dear Gurus, Please help to solve this chaos: I have a simple query that triggers several plpgsql triggers on several tables. Table A has a BIUD (Before Insert or Update or Delete) trigger (henceforth A_BIUD and analogues). Table B has triggers BIUD, AI and AU. Table B1 has triggers BIUD and AD.

Re: [SQL] Order of triggers - totally lost

2003-08-14 Thread SZŰCS Gábor
Dear Josh, thanks for the guidelines. - Original Message - From: "Josh Berkus" <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 5:55 PM > My perspective: multiple triggers of the same type on the same table are a > really bad idea if execution order matters. Any setup like this i

Re: [SQL] Order of triggers - totally lost

2003-08-14 Thread SZŰCS Gábor
Dear Jonathan, thanks for your POV. - Original Message - From: "Jonathan Gardner" <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 6:20 PM > I try to avoid triggers unless it is completely obvious what they are > doing and why I should use them. This tends to minimize the number of

Re: [SQL] Order of triggers - totally lost

2003-08-14 Thread SZŰCS Gábor
r" <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 4:54 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 13 August 2003 03:11, SZŰCS Gábor wrote: > > What may be wrong? Any ideas to re-organize parts of the triggers? > May putting the update to an A_A