Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Lee Kindness
Bruce, the attached source reproduces this on 7.2, I don't have a later version at hand to test if it's been fixed: createdb floattest echo CREATE TABLE tab1(col1 FLOAT); | psql floattest ecpg insert-float.pgc gcc insert-float.c -lecpg -lpq ./a.out floattest results in: col1: -0.06

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Bruce Momjian
OK, I have reproduced the problem on my machine: #$ ./a.out floattest col1: -0.06 *!*!* Error -220: No such connection NULL in line 21. Wow, how did that A get into the query string: insert into tab1 ( col1 ) values ( -6.002122251e-06A ) Quite

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Lee Kindness
Bruce, after checking the libecpg source i'm fairly sure the problem is due to the malloc buffer that the float is being sprintf'd into being too small... It is always allocated 20 bytes but with a %.14g printf specifier -6e-06 results in 20 characters: -6.0e-06 and the NULL

[BUGS] Bug #689: Bug at moving cursor on joined tables

2002-06-11 Thread pgsql-bugs
Robert Grabowski ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description Bug at moving cursor on joined tables Long Description I have problems with moving cursors on joined tables. On Simple tables all is ok... See example code...

[BUGS] PostGres Doubt

2002-06-11 Thread vikas p verma
Hi , I am extremely new to PostGreSql. If any one can please answer this question of mine. I want to insert/update records into the postgres database through C or perl code. The only condition is that it should be efficient. Can anybody tell me the difference between ecpg and libpq and which

[BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Stephen R. van den Berg
Should the following piece of code cause an: ERROR: unnamed referential integrity violation - key referenced from b not found in a Or should it work because the check is deferred and in the end no violations are present? create table a(ia int primary key); create table b(ia int references a

[BUGS] referential integrity error

2002-06-11 Thread Matej HollĂ˝
/* If a table contains two or more foreign keys referencing the same table and they reference the same record in the other table, the record's primary key cannot be changed even if the keys have the ON UPDATE CASCADE clause (see example below). It will say that referential integrity

Re: [BUGS] Bug #689: Bug at moving cursor on joined tables

2002-06-11 Thread Tom Lane
[EMAIL PROTECTED] writes: I have problems with moving cursors on joined tables. Most of the more complex plan node types don't really support moving backwards. I suppose it'd be an idea to error out rather than silently doing the wrong thing. Fixing the code to actually do the right thing is

Re: [BUGS] referential integrity error

2002-06-11 Thread Stephan Szabo
On Tue, 11 Jun 2002, [ISO-8859-1] Matej HollĂ˝ wrote: /* If a table contains two or more foreign keys referencing the same table and they reference the same record in the other table, the record's primary key cannot be changed even if the keys have the ON UPDATE CASCADE clause (see

Re: [BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Stephan Szabo
On Mon, 10 Jun 2002, Stephen R. van den Berg wrote: Should the following piece of code cause an: ERROR: unnamed referential integrity violation - key referenced from b not found in a Or should it work because the check is deferred and in the end no violations are present? It should work

Re: [BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Billy O'Connor
From billy Tue Jun 11 13:38:51 2002 Date: Tue, 11 Jun 2002 10:54:27 -0700 (PDT) From: Stephan Szabo [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] On Mon, 10 Jun 2002, Stephen R. van den Berg wrote: Should the following piece of code cause an:

Re: [BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Tom Lane
Stephan Szabo [EMAIL PROTECTED] writes: On Mon, 10 Jun 2002, Stephen R. van den Berg wrote: ERROR: unnamed referential integrity violation - key referenced from b not found in a Or should it work because the check is deferred and in the end no violations are present? It should work (and

Re: [BUGS] 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: On Mon, 10 Jun 2002, Stephen R. van den Berg wrote: ERROR: unnamed referential integrity violation - key referenced from b not found in a Or should it work because the check is deferred and in the end no

Re: [BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Victor Wagner
On 2002.06.11 at 14:43:17 -0400, Tom Lane wrote: Stephan Szabo [EMAIL PROTECTED] writes: It should work (and does in current sources). If you look in the archives you should be able to get info on how to patch 7.2 (it came up recently, I'm not sure which list, and Tom Lane sent the

Re: [BUGS] Referential integrity problem postgresql 7.2 ?

2002-06-11 Thread Tom Lane
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 result can be reached by doing another query which may be better than the

[BUGS] Bug #690: pg_ctl doesn't act properly for option -w

2002-06-11 Thread pgsql-bugs
shangwu ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description pg_ctl doesn't act properly for option -w Long Description If you start postmaster at some port number other than 5432 by pg_ctl with option -w, it doesn't block any

Re: [BUGS] Bug #690: pg_ctl doesn't act properly for option -w

2002-06-11 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: shangwu ([EMAIL PROTECTED]) reports a bug with a severity of 3 The lower the number the more severe it is. Short Description pg_ctl doesn't act properly for option -w Long Description If you start postmaster at some port number other than 5432 by pg_ctl with

Re: [BUGS] createdb comments

2002-06-11 Thread Bruce Momjian
The following patch fixes the problem. Applied. --- Nigel J. Andrews wrote: Head of development branch (7.3devel) has a problem applying a comment to a database at the sametime as the database is created using the