Re: [BUGS] small bug in op + between datetime and integer

2003-08-17 Thread Bruce Momjian
Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] writes:
  Anyone have an idea on this one?
 
 There's a date + integer operator, but no integer + date operator.
 Yawn...

Uh, Yawn means we don't need to fix it, or oh, here's another one?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [BUGS] small bug in op + between datetime and integer

2003-08-17 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes:
 Anyone have an idea on this one?

There's a date + integer operator, but no integer + date operator.
Yawn...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [BUGS] ALTER SCHEMA problem

2003-08-17 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes:
 Can someone comment on this?

This is unfixable as long as nextval() and friends depend on string
parameters to represent table references.  There are suggestions in
our archives about how we might move to a more Oracle-like syntax
(ie, table.nextval), which would expose the table reference in a way
that could track renamings.  But no one seems to have gotten really
excited about making it happen.

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [BUGS] small bug in op + between datetime and integer

2003-08-17 Thread Dennis Björklund
On Sun, 17 Aug 2003, Bruce Momjian wrote:

 Anyone have an idea on this one?
 
  It is maybe not bug, but I didn't find any warning about this behavior.
  
  select current_date + 1;  -- ok
  select 1 + current_date;  -- not
  
  ERROR:  operator does not exist: integer + date
  HINT:  No operator matches the given name and argument type(s). You may 
  need to add explicit typecasts.

It's not a bug. The operator + has one definition of the type

   (date,integer) - date

but there is no definition for

   (integer,date) - date

Instead of integer one can also have an interval. So if you start with a
date you can add an interval to it. But if you start with a time interval
you can not add a date to it. What would it mean to add a date to
something? I have no idea. Well, that's the logic behind the current
behaviour.

It would of course not be difficult to add a definition of + with the
integer first and the date as the second argument. To me it's not much of
an improvement, but it's not for me to decide. The postgresql operator + 
is not the same as the mathematical operator + and it does not have the 
same properties.

-- 
/Dennis


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [BUGS] DBD::Pg 'lo_read' fails on = 32768 byte large objects

2003-08-17 Thread Tom Lane
Kevin Houle [EMAIL PROTECTED] writes:
 One more data point. The DBD::Pg 'lo_extract' function works
 fine across SSL. There is no issue with large objects = 32K
 using 'lo_extract'. So that casts doubt on it being an OpenSSL
 issue.

No, it does not, because lo_export writes the data to a file on the
server side --- the data does not pass across the encrypted connection.
It still appears that there's an issue with moving a large chunk of
data across the link.

Whether this is OpenSSL's fault or libpq's is not clear.  I'm prepared
to believe that we are not using SSL_read correctly, but if so, what
is the correct way?  The OpenSSL docs are not very clear on how one
does asynchronous reads.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [BUGS] Bug #926: if old postgresql.jar in CLASSPATH, ant fails

2003-08-17 Thread Palle Girgensohn
It's been in use for the freebsd port for some months now, so I say  
yes. ;-)

/Palle

lördagen den 16 augusti 2003 kl 22.54 skrev Bruce Momjian:

Is this patch valid for inclusion in jdbc?

--- 


[EMAIL PROTECTED] wrote:
Palle Girgensohn ([EMAIL PROTECTED]) reports a bug with a severity  
of 3
The lower the number the more severe it is.

Short Description
if old postgresql.jar in CLASSPATH, ant fails
Long Description
See http://www.freebsd.org/cgi/query-pr.cgi?pr=48878
If there is an older postgresql.jar file in the ant classpath when  
building a new postgresql.jar, it will fail.

Sample Code
Adding includeAntRuntime=no to the compile target in build.xml, as  
suggested by Tetsurou Okazaki [EMAIL PROTECTED], fixes the  problem

--- src/interfaces/jdbc/build.xml~  Sun Oct 20 02:10:55 2002
+++ src/interfaces/jdbc/build.xml   Mon Mar  3 12:10:37 2003
@@ -101,7 +101,7 @@
   !-- This is the core of the driver.  It is common for all three  
versions. --
   target name=compile depends=prepare,check_versions,driver
-javac srcdir=${srcdir} destdir=${builddir} debug=${debug}
+javac includeAntRuntime=no srcdir=${srcdir}  
destdir=${builddir} debug=${debug}
   include name=${package}/** /

   exclude name=${package}/jdbc1/** unless=jdbc1/

No file was uploaded with this report

---(end of  
broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

--
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania  
19073


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [JDBC] [BUGS] Bug #926: if old postgresql.jar in CLASSPATH,

2003-08-17 Thread Dave Cramer
Yes, agreed

Dave
On Sun, 2003-08-17 at 09:57, Palle Girgensohn wrote:
 It's been in use for the freebsd port for some months now, so I say  
 yes. ;-)
 
 /Palle
 
 lördagen den 16 augusti 2003 kl 22.54 skrev Bruce Momjian:
 
 
  Is this patch valid for inclusion in jdbc?
 
  --- 
  
 
  [EMAIL PROTECTED] wrote:
  Palle Girgensohn ([EMAIL PROTECTED]) reports a bug with a severity  
  of 3
  The lower the number the more severe it is.
 
  Short Description
  if old postgresql.jar in CLASSPATH, ant fails
 
  Long Description
  See http://www.freebsd.org/cgi/query-pr.cgi?pr=48878
 
  If there is an older postgresql.jar file in the ant classpath when  
  building a new postgresql.jar, it will fail.
 
  Sample Code
  Adding includeAntRuntime=no to the compile target in build.xml, as  
  suggested by Tetsurou Okazaki [EMAIL PROTECTED], fixes the  problem
 
  --- src/interfaces/jdbc/build.xml~  Sun Oct 20 02:10:55 2002
  +++ src/interfaces/jdbc/build.xml   Mon Mar  3 12:10:37 2003
  @@ -101,7 +101,7 @@
 
 !-- This is the core of the driver.  It is common for all three  
  versions. --
 target name=compile depends=prepare,check_versions,driver
  -javac srcdir=${srcdir} destdir=${builddir} debug=${debug}
  +javac includeAntRuntime=no srcdir=${srcdir}  
  destdir=${builddir} debug=${debug}
 include name=${package}/** /
 
 exclude name=${package}/jdbc1/** unless=jdbc1/
 
 
  No file was uploaded with this report
 
 
  ---(end of  
  broadcast)---
  TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly
 
 
  -- 
Bruce Momjian|  http://candle.pha.pa.us
[EMAIL PROTECTED]   |  (610) 359-1001
+  If your life is a hard drive, |  13 Roberts Road
+  Christ can be your backup.|  Newtown Square, Pennsylvania  
  19073
 
 
 ---(end of broadcast)---
 TIP 2: you can get off all lists at once with the unregister command
 (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
 
-- 
Dave Cramer [EMAIL PROTECTED]


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[BUGS] Database Grants Bug

2003-08-17 Thread Marcus England








===


POSTGRESQL BUG REPORT TEMPLATE







Your
name
: Marcus England

Your email address : [EMAIL PROTECTED]





System Configuration

-

 Architecture (example: Intel
Pentium) : Intel Pentium



 Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.20
Redhat



 PostgreSQL version (example: PostgreSQL-7.3.4):
PostgreSQL-7.3.4



 Compiler used (example: gcc
2.95.2) : gcc 3.2.2





Please enter a FULL description of your problem:



Grants do not work at the database level using the syntax mentioned in
the documentation. i.e.:



GRANT ALL ON DATABASE dbname TO GROUP groupname;



Or



GRANT ALL ON DATABASE dbname TO username;



No errors are reported.



Please describe a way to repeat the problem. Please try to
provide a

concise reproducible example, if at all possible:

--

Using any database with any user or group should do the trick.





If you know how this problem might be fixed, list the solution below:

-








Re: [BUGS] Database Grants Bug

2003-08-17 Thread Joe Conway
Marcus England wrote:
Grants do not work at the database level using the syntax mentioned in
the documentation. i.e.:
GRANT ALL ON DATABASE dbname TO GROUP groupname;

Or

GRANT ALL ON DATABASE dbname TO username;

Works here:

regression=# select version();
 version
-
 PostgreSQL 7.3.3 on i686-redhat-linux-gnu, compiled by GCC 2.96
(1 row)
regression=# GRANT ALL ON DATABASE regression TO GROUP grp1;
GRANT
regression=# GRANT ALL ON DATABASE regression TO user1;
GRANT
You need to be more specific in what you mean by do not work. Do you 
get an error? What exactly is not working?

Perhaps you expect more than you should -- re-read the docs, 
specifically the section quoted here:

 GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
 ON DATABASE dbname [, ...]
 TO { username | GROUP groupname | PUBLIC } [, ...]
In the context of DATABASE, ALL means CREATE  TEMPORARY  TEMP, 
nothing more, nothing less. Further reading provides:

CREATE
For databases, allows new schemas to be created within the database.
TEMPORARY
TEMP
Allows temporary tables to be created while using the database.
Are these not working?

HTH,

Joe

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match