Re: [SQL] 7.4 and 7.3.5 showstopper

2003-10-30 Thread Jan Wieck
Jan Wieck wrote: Confirmed, that's a bug - pgsql-hackers CC'd and scipt for full reproduction attached. Assumptions where correct, bug fixed in REL7_3_STABLE and HEAD. I also added a slightly modified version of the script that reproduced the bug to the foreign_key regression test. Jan This c

Re: [SQL] Using UNION inside a cursor

2003-10-30 Thread Kumar
Hi Tom, I need the parentheses, because the where condition is different for the 1 and 2 nd query . Moreover my actual use includes a 'Limit' clause also. so the parentheses is needed. I have tried with execute but it showed error. But I have managed to fix the problem like this. OPEN ref FOR SEL

7.4 and 7.3.5 showstopper (was: Re: [SQL] Bug in Rule+Foreing key constrain?)

2003-10-30 Thread Jan Wieck
Confirmed, that's a bug - pgsql-hackers CC'd and scipt for full reproduction attached. This can also be reproduced in 7.4-beta5. My guess out of the blue would be, that the rewriter expands the insert into one insert with the where clause, one update with the negated where clause. Executed in

Re: [SQL] strange postgresql failure

2003-10-30 Thread Tomasz Myrta
Dnia 2003-10-30 18:33, Użytkownik Jan Wieck napisał: There is, sort of ... it's called "core" and if your backend and C function shared object have been compiled with symbol information you can use a debugger to get a stack trace and look at variables. If that's not "human readable" ... well ...

Re: [SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Michele Bendazzoli
On Thu, 2003-10-30 at 18:29, Jan Wieck wrote: > Not entirely. On which table(s) are the REFERENCES constraints and are > they separate per column constraints or are they multi-column constraints? here are the constraints of the abilitazione table ALTER TABLE public.abilitazione ADD CONSTRAINT

Re: [SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Jan Wieck
Michele Bendazzoli wrote: I have found a strange behaviour that I don't know if is a bug or not. I have three tables: * abilitazione with a primary key of (comuneid, cassonettoid, chiaveid) * cassonetto with a primary key of (comuneid, cassonettoid) * chiave with a primary key of (comuneid, chi

Re: [SQL] strange postgresql failure

2003-10-30 Thread Jan Wieck
Tomasz Myrta wrote: Dnia 2003-10-30 12:32, Użytkownik Tomasz Myrta napisał: After few seconds all backends were disconnected and postgres restarted. It didn't help :-( Even reboot didn't help... Postgres is 7.3.2-2 on Debian Woody. Sorry for my panic. It was my C function which raised segmentat

Re: [SQL] Using UNION inside a cursor

2003-10-30 Thread Tom Lane
Christoph Haller <[EMAIL PROTECTED]> writes: >> OPEN ref FOR >> (SELECT * FROM history WHERE obs_type =3D \'AA\' ) >> UNION >> (SELECT * FROM history WHERE obs_type =3D \'TA\'); > My suspicion is the plpgsql parser doesn't accept the opening > parenthesis. Yeah. Looking at the plpgsql gr

Re: [SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Stephan Szabo
On Thu, 30 Oct 2003, Michele Bendazzoli wrote: > I have found a strange behaviour that I don't know if is a bug or not. > > I have three tables: > * abilitazione with a primary key of (comuneid, cassonettoid, chiaveid) > * cassonetto with a primary key of (comuneid, cassonettoid) > * chiave with

[SQL] psqlODBC with SSL

2003-10-30 Thread 2000info
Hello, peopleware !!!   psqlODBC with SSL, it´s possible ?       SPS 2000Info  

[SQL] varlena versus null-terminated strings

2003-10-30 Thread sad
Hi Developers. I think the problem is the input/output functions pass CSTRING -- not varlena. this waste all profits of using varlena storage cause values are not transparently passed. then application forced to convert them reverse. ---(end of broadcast)--

Re: [SQL] strange postgresql failure

2003-10-30 Thread Tomasz Myrta
Dnia 2003-10-30 12:32, Użytkownik Tomasz Myrta napisał: After few seconds all backends were disconnected and postgres restarted. It didn't help :-( Even reboot didn't help... Postgres is 7.3.2-2 on Debian Woody. Sorry for my panic. It was my C function which raised segmentation fault. Anyway it

[SQL] strange postgresql failure

2003-10-30 Thread Tomasz Myrta
postgres[666]: [1] LOG: server process (pid 3166) was terminated by signal 11 postgres[666]: [2] LOG: terminating any other active server processes postgres[806]: [591-1] WARNING: Message from PostgreSQL backend: postgres[806]: [591-2] ^IThe Postmaster has informed me that some other backe

[SQL] Bug in Rule+Foreing key constrain?

2003-10-30 Thread Michele Bendazzoli
I have found a strange behaviour that I don't know if is a bug or not. I have three tables: * abilitazione with a primary key of (comuneid, cassonettoid, chiaveid) * cassonetto with a primary key of (comuneid, cassonettoid) * chiave with a primary key of (comuneid, chiaveid) and two foreign key

Re: [SQL] Using UNION inside a cursor

2003-10-30 Thread Kumar
Hi Christoph Haller, Thanks you very much. It worked. - Original Message - From: "Christoph Haller" <[EMAIL PROTECTED]> To: ""Kumar"" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 30, 2003 3:56 PM Subject: Re: [SQL] Using UNION inside a cursor > > > > Dear Friends

Re: [SQL] Using UNION inside a cursor

2003-10-30 Thread Christoph Haller
> > Dear Friends, > > I am working on Postgresql 7.3.4 on RH Linux Server 7.3.=20 > > I have problem in executing the following procedure > > CREATE OR REPLACE FUNCTION list_history() > RETURNS refcursor AS > 'DECLARE > ref REFCURSOR; > BEGIN > OPEN ref FOR > (SELECT * FROM history WHE

[SQL] Using UNION inside a cursor

2003-10-30 Thread Kumar
Dear Friends,   I am working on Postgresql 7.3.4 on RH Linux Server 7.3.   I have problem in executing the following procedure   CREATE OR REPLACE FUNCTION list_history()  RETURNS refcursor AS'DECLARE ref   REFCURSOR;BEGIN OPEN ref FOR (SELECT  * FROM history  WHERE obs_type = \'AA\' ) UN