[BUGS] BUG #1186: Broken Index?

2004-07-02 Thread PostgreSQL Bugs List
The following bug has been logged online: Bug reference: 1186 Logged by: Gosen, Hitoshi Email address: [EMAIL PROTECTED] PostgreSQL version: 7.4 Operating system: linux 2.4.18 Description:Broken Index? Details: Hello All, We are using PostgreSQL 7.4.2 for our w

Re: [BUGS] BUG #1161: User permissions are kept, even if user is

2004-07-02 Thread dd
little example of generating usesysid create user test sysid 2147483647; CREATE USER create user test1; CREATE USER select * from pg_shadow; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig --+-+-+--+--

Re: [BUGS] BUG #1161: User permissions are kept, even if user is

2004-07-02 Thread Fabien COELHO
> And I have still a question: > How to remove privileges of the nonexistent (removed) user? I'm not sure it is even desirable? There are 2 differents concepts: - logins with a user name, password... - sysids which is really an int. a login must have a sysid, but a sysid may or may not corres

Re: [BUGS] Possible bug?

2004-07-02 Thread Ilir Gashi
On Jul 1 2004, Stephan Szabo wrote: Technically speaking, I believe the queries are simply invalid without the presence of casts from the spec's standpoint. Theoretically, I'd either expect both to give 0 rows (convert 3 into a string and compare) or both to give 1 row (convert '003' to an integer

[BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Ilir Gashi
Hi, I saw this behaviour in PostgreSQL 7.2. (Once again, I know this is an old release but I do not have a newer version installed, and I am only using the server for research purposes). If you execute the following statement SELECT (CAST('01.01.2004 10:01:00' AS TIMESTAMP) - CAST('01.01.2004 1

[BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Ilir Gashi
Hi, This is a another bug reported for the Firebird 1.0 server. I subsequently ran it in PostgreSQL 7.2, Oracle 8.0.5 anf MSSQL 7. Reproducible script: Connect as pgsql: CREATE TABLE TEST(ID INTEGER,NAME VARCHAR(50)); INSERT INTO TEST (ID) VALUES (1); GRANT UPDATE ON TEST TO TESTUSER; Connect as

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Theodore Petrosky
Interesting If I reverse the order it works... agencysacks=# SELECT CAST('01.01.2004 10:00:00' AS TIMESTAMP) + (CAST('01.01.2004 10:01:00' AS TIMESTAMP) - CAST('01.01.2004 10:00:00' AS TIMESTAMP)) as answer; answer - 2004-01-01 10:01:00 (1 row) However you

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Achilleus Mantzios
O kyrios Ilir Gashi egrapse stis Jul 2, 2004 : SELECT '01.01.2004 10:00:00'::timestamp + ('01.01.2004 10:01:00'::timestamp - '01.01.2004 10:00:00'::timestamp)::interval; ?column? - 2004-01-01 10:01:00 (1 row) works fine in my 7.4.2 > Hi, > > I saw this behaviour in P

Re: [BUGS] BUG #1186: Broken Index?

2004-07-02 Thread Bruno Wolff III
On Fri, Jul 02, 2004 at 04:50:07 -0300, PostgreSQL Bugs List <[EMAIL PROTECTED]> wrote: > > The following bug has been logged online: This doesn't appear to be a bug at this point. It sounds like you have a self induced performance problem, so I am moving the discussion to pgsql-performance. >

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Ilir Gashi
On Jul 2 2004, Achilleus Mantzios wrote: SELECT '01.01.2004 10:00:00'::timestamp + ('01.01.2004 10:01:00'::timestamp - '01.01.2004 10:00:00'::timestamp)::interval; ?column? - 2004-01-01 10:01:00 (1 row) works fine in my 7.4.2 Yes. I've just tried it in PostgreSQL 7.2 and it

Re: [BUGS] Possible bug?

2004-07-02 Thread Peter Eisentraut
Am Donnerstag, 1. Juli 2004 23:10 schrieb Tom Lane: > Right. The reason PG doesn't error is that we have an implicit cast > from integer to text. I've opined before that we should mark most > cross-type-category casts as explicit-only ... they are just too prone > to give unexpected answers, as i

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Tom Lane
Ilir Gashi <[EMAIL PROTECTED]> writes: > I saw this behaviour in PostgreSQL 7.2. (Once again, I know this is an old > release but I do not have a newer version installed, and I am only using > the server for research purposes). If you execute the following statement > SELECT (CAST('01.01.2004 10

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Peter Eisentraut
Am Freitag, 2. Juli 2004 13:20 schrieb Ilir Gashi: > CREATE TABLE TEST(ID INTEGER,NAME VARCHAR(50)); > INSERT INTO TEST (ID) VALUES (1); > GRANT UPDATE ON TEST TO TESTUSER; > Connect as TestUser; > UPDATE TEST SET NAME='TEST' WHERE ID=1; > ERROR: test: Permission denied. > UPDATE TEST SET NAME='TE

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Tom Lane
Ilir Gashi <[EMAIL PROTECTED]> writes: > This is a another bug reported for the Firebird 1.0 server. I subsequently > ran it in PostgreSQL 7.2, Oracle 8.0.5 anf MSSQL 7. > Reproducible script: > Connect as pgsql: > CREATE TABLE TEST(ID INTEGER,NAME VARCHAR(50)); > INSERT INTO TEST (ID) VALUES

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Stephan Szabo
On Fri, 2 Jul 2004, Tom Lane wrote: > Ilir Gashi <[EMAIL PROTECTED]> writes: > > I saw this behaviour in PostgreSQL 7.2. (Once again, I know this is an old > > release but I do not have a newer version installed, and I am only using > > the server for research purposes). If you execute the followi

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Fri, 2 Jul 2004, Tom Lane wrote: >> (There is a timestamp + interval operator, so you could make it work by >> flipping around the outer addition.) > Should we be providing an interval + timestamp operator as well since it > looks like the spec implie

Re: [BUGS] Possible bug?

2004-07-02 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Donnerstag, 1. Juli 2004 23:10 schrieb Tom Lane: >> Right. The reason PG doesn't error is that we have an implicit cast >> from integer to text. I've opined before that we should mark most >> cross-type-category casts as explicit-only ... they are

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Ilir Gashi
On Jul 2 2004, Tom Lane wrote: Ilir Gashi <[EMAIL PROTECTED]> writes: > This is a another bug reported for the Firebird 1.0 server. I > subsequently ran it in PostgreSQL 7.2, Oracle 8.0.5 anf MSSQL 7. > Reproducible script: > Connect as pgsql: > CREATE TABLE TEST(ID INTEGER,NAME VARCHAR(50)); > I

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Stephan Szabo
On Fri, 2 Jul 2004, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > On Fri, 2 Jul 2004, Tom Lane wrote: > >> (There is a timestamp + interval operator, so you could make it work by > >> flipping around the outer addition.) > > > Should we be providing an interval + timestamp opera

Re: [BUGS] Possible bug?

2004-07-02 Thread Bruno Wolff III
On Fri, Jul 02, 2004 at 10:27:35 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > > IIRC there were objections the last time it was seriously proposed, > basically of the form "but that will break my application which relies > on writing so-and-so without a cast". We did get as far as removing all

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Peter Eisentraut
Me wrote: > Am Freitag, 2. Juli 2004 13:20 schrieb Ilir Gashi: > > CREATE TABLE TEST(ID INTEGER,NAME VARCHAR(50)); > > INSERT INTO TEST (ID) VALUES (1); > > GRANT UPDATE ON TEST TO TESTUSER; > > Connect as TestUser; > > UPDATE TEST SET NAME='TEST' WHERE ID=1; > > ERROR: test: Permission denied. >

Re: [BUGS] Possible bug?

2004-07-02 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: >> but these seem to have a constituency :-( > I think it is reasoable to expect people to use an explicit cast when > doing these conversions. That's what I think, but I lost the argument last time round... I th

Re: [BUGS] timestamp arithmetic (a possible bug?)

2004-07-02 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: >>> Should we be providing an interval + timestamp operator as well since it >>> looks like the spec implies both orderings should work? >> >> If you see spec support for it, then yes ... where do you read that >> exactly? > SQL92 (draft) 4.5.3 Operators

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > According to the letter of the SQL standard, this behavior is not conforming. > But PostgreSQL enforces that you need SELECT privilege for columns that you > read for the purpose of performing an UPDATE. Why do you think it's non-conformant? AFAICS

Re: [BUGS] Grant Update (Possible bug)?

2004-07-02 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > According to the letter of the SQL standard, this behavior is not conforming. > > But PostgreSQL enforces that you need SELECT privilege for columns that you > > read for the purpose of performing an UPDATE. >