[BUGS] SERIAL type, NOT NULL constraint and rule

2002-07-09 Thread Tomis³aw Kityñski
Hello! I've encountered certain--opposite to documentation--DBMS behavoiur. Let's narrow down my DB schema to few tables, which can reproduce this problem. I have these schemas: CREATE TABLE "users" ( "id_user" SERIAL NOT NULL, "first" VARCHAR(24) NOT NULL DEFAULT '(imi\352)', "last"VAR

[BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Hugo Jonker
Hi, While using Postgres, I encountered some unexpected behaviour. In short: - Upon doing a faulty INSERT which left a column with default value nextval('sequence') unspecified, the INSERT aborted due to an error. However, a call had been placed to nextval('sequence'), thus increasing th

[BUGS] segfault which isn't supposed to happen (including example code)

2002-07-09 Thread eric
hello, this segfault is all about PQclear(); according to the docs libpq-exec.html # PQclear Frees the storage associated with the PGresult. Every query result should be freed via PQclear when it is no longer needed. void PQclear(PQresult *res); You can keep a PGresult object around for as

Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Tom Lane
Hugo Jonker <[EMAIL PROTECTED]> writes: > Upon doing a faulty INSERT which left a column with default value > nextval('sequence') unspecified, the INSERT aborted due to an error. > However, a call had been placed to nextval('sequence'), thus > increasing the sequence, while this value never got us

Re: [BUGS] segfault which isn't supposed to happen (including example code)

2002-07-09 Thread Tom Lane
eric <[EMAIL PROTECTED]> writes: > this segfault is all about PQclear(); If you pass an uninitialized pointer to a library routine, it's likely to segfault. This is *your* bug, not the library's, because the library routine has no way to know that you gave it a random pointer value instead of so

Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Stephan Szabo
On Mon, 8 Jul 2002, Hugo Jonker wrote: > Hi, > > While using Postgres, I encountered some unexpected behaviour. > > In short: > - > Upon doing a faulty INSERT which left a column with default value > nextval('sequence') unspecified, the INSERT aborted due to an error. > However, a call ha

Re: [BUGS] SERIAL type, NOT NULL constraint and rule

2002-07-09 Thread Tom Lane
"Tomis³aw Kityñski" <[EMAIL PROTECTED]> writes: > So it seems, like action in the > rule does not see "id_user" value set to default value in NEW > tuple. Yeah, this is a known bug in 7.2 and 7.2.1 --- ON INSERT rules fail to see values inserted by DEFAULTs. It's fixed in current development sou

Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Bruce Momjian
Well, nextval() doesn't hold a lock for the duration of the transaction, so it still increments. It is a performance optimization. --- Hugo Jonker wrote: > Hi, > > While using Postgres, I encountered some unexpected behav

[BUGS] Possible Bug?

2002-07-09 Thread Francis Reader
We are running pg 7.1.3. x86 Redhat 6.1 with 2.4.17 and glibc 2.2.2. We have several s/w subsystems which keep some pg backends open for a VERY period of time. (Well the whole time the machine is powered up.), and others which have a short lifetime when connected to pg backends. The total amount

[BUGS] dump/restore bug

2002-07-09 Thread Andre Schroeter
dear postgres developers, i have just noticed a big problem with dump/restore from version 6.5.3 to 7.2. but i think it is not version related. if i dump a db with default date format european '-e' and restore that dump into a db without '-e' all dates are wrong. i think the dump/restore should

[BUGS] Bug #705: Invalid UNICODE character sequence found (0xc236)

2002-07-09 Thread pgsql-bugs
Peter Czulak ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description Invalid UNICODE character sequence found (0xc236) Long Description PostgreSQL version 7.2.1 OS: RedHat Linux 7.2 Platform: IBM 220 server Some insert statements are f

[BUGS] Bug #706: Wrong shlib flag for GCC compilation on Solaris

2002-07-09 Thread pgsql-bugs
Richard Cook ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description Wrong shlib flag for GCC compilation on Solaris Long Description In the file .../src/Makefile.shlib, line 178, the "-G" flag is set for compilation of shared librari

Re: [BUGS] Bug #705: Invalid UNICODE character sequence found

2002-07-09 Thread Tatsuo Ishii
> Short Description > Invalid UNICODE character sequence found (0xc236) Are you sure that above error message is for the below example? I got: Invalid UNICODE character sequence found (0xc033) > INSERT INTO ftp_log_t (ftp_log_source, ftp_from_site_id, ftp_file_status, ftp_file, >ftp_log_date, f

Re: [BUGS] Bug #706: Wrong shlib flag for GCC compilation on Solaris

2002-07-09 Thread Bruce Momjian
In current CVS I see this, which looks fine. Does yours look the same? --- ifeq ($(PORTNAME), solaris) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_ VERSION) ifndef cplusplus ifeq

Re: [BUGS] Multibyte characters handling bug in varchar()

2002-07-09 Thread Tatsuo Ishii
I suspect that data stored in your database was not EUC_CN. GB2312(or GBK) is different from EUC_CN. Can you show me the INSERT statement text in gzipped form to prevent accidental changes while relaying the mail chanin? -- Tatsuo Ishii > Hello, > > I am using Postgresql 7.1 on Linux pl