RE: [BUGS] Possible bug in referential integrity system

2000-09-06 Thread Piers Scannell
I'm not sure what the supposed bug is... > From: Alexei E Korneyev [mailto:[EMAIL PROTECTED]] [ reformated by PS] create table t1 (num int4 PRIMARY KEY, name text); create table t2 (ref int4 references t1 (num) NOT NULL, val text); insert into t1 values (1

[BUGS] Error with union in sub-selects

2000-09-06 Thread pgsql-bugs
Martin Neimeier ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description Error with union in sub-selects Long Description Version: PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2 If i try to use unions in a subselect, pos

Re: [BUGS] Error with union in sub-selects

2000-09-06 Thread Martin Neimeier
Hello, some additional informations: - if i execute the subselect alone, it works fine !. - The same select statement works with sybase and oracle, so i think its a legal statement. - After reading in the sql2-standard, i have found nothing which restricts unions in sub-selects. (I don't want

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Tom Lane
Karel Zak <[EMAIL PROTECTED]> writes: > it's not date_part() bug, it's to_date() bug: > test=# select to_date('26.03.2000','dd.mm.')::timestamp; > ?column? > > 2000-03-25 23:00:00+01 > ^^^ >! Bug ! > test=# select to_timestamp('2

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Karel Zak
> > Looks to me like an off-by-one kind of problem in deciding which > timezone applies to midnight of a transition day. > > regards, tom lane Hmm ... really cool solution. You are right! I was sure that in the my to_() code can't be bug :-)) Thanks.

Re: [BUGS] /usr/include/pgsql/os.h does not exist

2000-09-06 Thread Tom Lane
[EMAIL PROTECTED] writes: > /usr/include/pgsql/os.h does not exist Yeah, this is a recently-noticed defect in the RPM distribution. A symlink was installed as a symlink, instead of as the referenced file. Until a new RPM can be issued, the simplest fix is to replace the os.h symlink with the cor

RE: [BUGS] Possible bug in referential integrity system

2000-09-06 Thread Piers Scannell
[copied to list] My understanding, which isn't based on my experience more than reading any standards, is that a referential foriegn key field in a table can be either, a value from the referenced table, or null. Null kinda implies "n/a". So order-lines on an order might reference a stock item

Re: [BUGS] bugs

2000-09-06 Thread Stephan Szabo
Yes, right now references constraints require update permissions on the table being referenced in order to grab row level locks on it with SELECT FOR UPDATE. Stephan Szabo [EMAIL PROTECTED] On Thu, 31 Aug 2000, Alexei E. Korneyev wrote: > ==

Re: [BUGS] Possible bug in referential integrity system

2000-09-06 Thread Stephan Szabo
Actually, this is what the spec defines. You're using match unspecified, which means: - If no was specified then, for each row R1 of the referencing table, either at least one of the values of the referencing columns in R1 shall be a null value, or the value of each referencing colum

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Karel Zak
> Sample Code > create table oops (date date); > > insert into oops (date) values (to_date('24.03.2000','dd.mm.')); > insert into oops (date) values (to_date('25.03.2000','dd.mm.')); > insert into oops (date) values (to_date('26.03.2000','dd.mm.')); > insert into oops (date) values (t

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Thomas Lockhart
> > it's not date_part() bug, it's to_date() bug: > Looks to me like an off-by-one kind of problem in deciding which > timezone applies to midnight of a transition day. Probably a bit worse (but no problem to solve ;): you need to make sure that you rotate the date type to the correct time z

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: >> Looks to me like an off-by-one kind of problem in deciding which >> timezone applies to midnight of a transition day. > The date->timestamp conversion code gets this right, so you might want > to look at that. Au contraire: the cited examples appear