Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Pierre-Frédéric Caillaud
problem is that '1 months':: interval does not have the same value if you add it to a date or another : => SELECT '2004-02-01'::timestamp+'1 month'::interval, '2004-03-01'::timestamp+'1 month'::interval; ?column? | ?column? -+- 2004-0

Re: [GENERAL] PostgreSQL Security Release(s) for 7.2, 7.3 and 7.4

2004-10-24 Thread Neil Conway
Marc G. Fournier wrote: In order to address a recent security report from iDefence, we have released 3 new "point" releases: 7.2.6, 7.3.8 and 7.4.6 Assuming you're referring to the make_oidjoins_check bug, I don't think it is accurate to bill these as "security releases". As the 7.4.6 release no

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Michael Glaesemann
On Oct 24, 2004, at 4:13 PM, Pierre-Frédéric Caillaud wrote: How can we sort intervals meaningfully in these conditions ? Can we ? In fact the value of an interval depends on the application, and intervals with months are in another 'world' than intervals with only seconds... same thing for yea

[GENERAL] sequence behavior - is this correct

2004-10-24 Thread Marek Lewczuk
Hello, I would like to ask if my problem with sequence is a proper behavior or this is a bug (probably not)... I have a table: CREATE TABLE "testtable" ( "serialfield" SERIAL, "someotherfield" TEXT, PRIMARY KEY("serialfield") ) WITH OIDS; After creation of this table, sequence "testtable_se

Re: [GENERAL] sequence behavior - is this correct

2004-10-24 Thread Sim Zacks
That is correct behavior. The sequence value only updates when you use the sequence value. If you put your own data into the sequence field, as you would be doing in a conversion or import, the sequence does not change. To manually change the sequence values, refer to the script I posted on Oct. 1

Re: [GENERAL] Comment on timezone and interval types

2004-10-24 Thread Martijn van Oosterhout
On Sat, Oct 23, 2004 at 06:49:15PM -0500, Bruno Wolff III wrote: > Recently there has been some discussion about attaching a timezone to > a timestamp and some other discussion about including a 'day' part > in the interval type. These two features impact each other, since > if you add a 'day' to a

Re: [GENERAL] PostgreSQL Security Release(s) for 7.2, 7.3 and 7.4

2004-10-24 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Marc G. Fournier wrote: >> In order to address a recent security report from iDefence, we have >> released 3 new "point" releases: 7.2.6, 7.3.8 and 7.4.6 > Assuming you're referring to the make_oidjoins_check bug, He's not. There were two other recent s

[GENERAL] Permission denied error

2004-10-24 Thread Francisco
Getting recurring lines in log of ERROR: permission denied for relation logs Is there a way to tell from which DB this error is coming from? Or even what user? ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTE

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > Added to this, I've been wondering whether '1 day'::interval is also > problematic wrt daylight savings time or changing time zones. This is exactly the point I alluded to earlier: intervals need to have three components (months, days, seconds) not

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Bruno Wolff III
On Sun, Oct 24, 2004 at 11:29:13 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > > Question to think about: should we allow fractional months or days in > the stored representation? There are some places where the existing > restriction that the months field is an integer requires awkward > compro

Re: [GENERAL] Problem with 7.4.1 and complicated queries

2004-10-24 Thread Jonathan Weiss
Hi! > > This sounds like maybe you're FSM settings aren't high enough, or you > aren't analyzing your tables. I doubled the values for max_fsm_pages and max_fsm_relations. > Try vacuum full and analyze first, and see if that fixes the problem. > If so, then you either need to vacuum more often,

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > Wikipedia gives 365.242189670 days (86400 seconds) as the length of > the mean solar year in 2000. To give you some idea of how constant > that values is, Wikipedia claims that 2000 years ago the mean solar > year was about 10 seconds longer. Using the

[GENERAL] pqAdmin3

2004-10-24 Thread Philip Pinkerton
When trying to connect to database via the pgAdmin3 GUI it asks for a password. I use the same passworrd as I did when I connect to the DB via command line but I get Ident error? how do I set, re-set the password so I can use both the commandline and pgAdmin to access edit by DB? Thanks -

Re: [GENERAL] Slony-I 1.0.4 Released

2004-10-24 Thread Andrew Sullivan
On Sat, Oct 23, 2004 at 04:59:26PM +0100, Oliver Elphick wrote: > > I thought someone was working on making a subsection of postgresql that > would be sufficient to let packages like Slony-I build independently; is > that making any progress? Chris recently said on the slony lists that he's aimi

[GENERAL] Importing a tab delimited text file - How?

2004-10-24 Thread Ken Tozier
I've been looking though the PostgreSQL documentation but can't seem to find a command for importing files. I read the documentation related to large objects but this isn't what I'm looking for as I don't want to import the entire file into a single field, I want to import it as a table. I'm su

Re: [GENERAL] PostgreSQL Security Release(s) for 7.2, 7.3 and 7.4

2004-10-24 Thread Neil Conway
On Mon, 2004-10-25 at 00:43, Tom Lane wrote: > He's not. There were two other recent security reports, which core kept > to ourselves until the release could be made. Ah, ok -- fair enough. Are those additional security fixes mentioned in the release notes? -Neil ---(e

[GENERAL] (S)RPMs for PostgreSQL 7.2.6, 7.3.8 and 7.4.6 are ready

2004-10-24 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, (S)RPMs for new point releases (per http://archives.postgresql.org/pgsql-announce/2004-10/msg00010.php) have been built for Fedora Core 1&2, Red Hat Linux 9 and Red Hat Enterprise Linux 3. They are (or will be after sync) available in the Postgre

Re: [GENERAL] PostgreSQL Security Release(s) for 7.2, 7.3 and 7.4

2004-10-24 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > On Mon, 2004-10-25 at 00:43, Tom Lane wrote: >> He's not. There were two other recent security reports, which core kept >> to ourselves until the release could be made. > Ah, ok -- fair enough. Are those additional security fixes mentioned in > the releas

Re: [GENERAL] Importing a tab delimited text file - How?

2004-10-24 Thread Robby Russell
On Sun, 2004-10-24 at 19:25 -0400, Ken Tozier wrote: > I've been looking though the PostgreSQL documentation but can't seem to > find a command for importing files. I read the documentation related to > large objects but this isn't what I'm looking for as I don't want to > import the entire file

Re: [GENERAL] Importing a tab delimited text file - How?

2004-10-24 Thread Doug McNaught
Ken Tozier <[EMAIL PROTECTED]> writes: > I've been looking though the PostgreSQL documentation but can't seem > to find a command for importing files. I read the documentation > related to large objects but this isn't what I'm looking for as I > don't want to import the entire file into a single f

[GENERAL] Function syntax checking

2004-10-24 Thread Karim Nassar
I am writing functions and I find it curious that CREATE FUNCTION does not do syntax checking. Example: test=# CREATE FUNCTION foo(INTEGER) RETURNS BOOLEAN test-# AS 'this is total crap' LANGUAGE plpgsql; CREATE FUNCTION test=# select foo(1); ERROR: syntax error at or near "this" CONTEXT: com

Re: [GENERAL] Bug or stupidity

2004-10-24 Thread Karim Nassar
On Sat, 2004-10-23 at 07:35, Philip Hofstetter wrote: > It would just have been easier to find if PostgreSQL actually had > told me so (I'm not getting those NOTICEs from PHP...). As far as I can tell, Apache or PHP snarfs up all the messages that postgres generates before they can get to the po

Re: [GENERAL] '1 year' = '360 days' ????

2004-10-24 Thread Ricardo Perez Lopez
From: Tom Lane <[EMAIL PROTECTED]> To: "Ricardo Perez Lopez" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [GENERAL] '1 year' = '360 days' Date: Sat, 23 Oct 2004 19:52:50 -0400 "Ricardo Perez Lopez" <[EMAIL PROTECTED]> writes: > I have observed that, for PostgreSQL, one year is act

Re: [GENERAL] Duplicating a database

2004-10-24 Thread Karim Nassar
On Sat, 2004-10-23 at 16:57, Curtis Zinzilieta wrote: > rsync, or .tar.gz, or scp or use pg_dump. > > any of the copies run assuming you've shut down the DB first, and that > you're using the same binaries on both boxen. Aha! Shutdown first. I knew it was something dumb. Thanks for the help. \<

Re: [GENERAL] Duplicating a database

2004-10-24 Thread Karim Nassar
If you just need a working copy, not necessarily right up to date at any > time, you can just dump and restore it: > > pg_dumpall -h source_server |psql -h dest_server > > add switches as necessary. That would be great for the first time. But what I want to do is copy ~postgresql/data, stomping/

[GENERAL] Memory exhausted on DELETE.

2004-10-24 Thread jbi130
I have a table with about 1,400,000 rows in it. Each DELETE cascades to about 7 tables. When I do a 'DELETE FROM events' I get the following error: ERROR: Memory exhausted in AllocSetAlloc(84) I'm running a default install. What postgres options to I need to tweak to get this delete to work

Re: [GENERAL] The data directory was initialized by PostgreSQL version 7.3,

2004-10-24 Thread stig erikson
Bilicki Vilmos wrote: Hi all, I have upgraded my cygwin installation and it has replaced my old 7.3 postgresql. My questions are the following: How can I use the old files with the newer version? If this is not possible, how can I migrate my database to a newer version without the old database en

Re: [GENERAL] Function syntax checking

2004-10-24 Thread Tom Lane
Karim Nassar <[EMAIL PROTECTED]> writes: > I am writing functions and I find it curious that CREATE FUNCTION does > not do syntax checking. Try 8.0 ;-) regression=# CREATE FUNCTION foo(INTEGER) RETURNS BOOLEAN regression-# AS 'this is total crap' LANGUAGE plpgsql; ERROR: syntax error at or near

Re: [GENERAL] Memory exhausted on DELETE.

2004-10-24 Thread Tom Lane
<[EMAIL PROTECTED]> writes: > I have a table with about 1,400,000 rows in it. Each DELETE cascades to > about 7 tables. When I do a 'DELETE FROM events' I get the following > error: > ERROR: Memory exhausted in AllocSetAlloc(84) > I'm running a default install. What postgres options to I ne

Re: [GENERAL] Importing a tab delimited text file - How?

2004-10-24 Thread Ken Tozier
Doug, Robby, Thanks. That did the trick. Ken On Oct 24, 2004, at 8:02 PM, Doug McNaught wrote: Ken Tozier <[EMAIL PROTECTED]> writes: I've been looking though the PostgreSQL documentation but can't seem to find a command for importing files. I read the documentation related to large objects but thi

[GENERAL] partial index on a text field

2004-10-24 Thread Chris
Hi all, I have a text field which I'll be doing LIKE searches against so I wanted to set up an index on it. The data itself is too long to create a full index, so I can't just: chris=> create index blah on ff_index(icontent); ERROR: index row requires 21216 bytes, maximum size is 8191 So I tho

Re: [GENERAL] partial index on a text field

2004-10-24 Thread Tom Lane
"Chris" <[EMAIL PROTECTED]> writes: > chris=> create index blah on ff_index(substring(icontent, 0, 200)); > ERROR: syntax error at or near "(" at character 40 > I'm running v7.4.5. Put an extra set of parens around it: create index blah on ff_index((substring(icontent, 0, 200))); "subs

Re: [GENERAL] partial index on a text field

2004-10-24 Thread Chris
Hi Tom, Perfect, thanks :) I'll have another look at FTI now to see how it works (though from memory it's a tedious process to get up and running). Chris. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 1:57 PM To: Chris Cc: [EMAIL PROTECTED]

[GENERAL] Complex query need help with OR condition.

2004-10-24 Thread Ken Tozier
I'm working on a query which works as expected when I leave out one of the "OR" tests but when the "OR" is included, I get hundreds of duplicate hits from a table that only contains 39 items. Is there a way to write the following so that the "WHERE" clause tests for two possible conditions? Th

Re: [GENERAL] Complex query need help with OR condition.

2004-10-24 Thread Tom Lane
Ken Tozier <[EMAIL PROTECTED]> writes: > When I add the OR clause things go haywire: > SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as > elapsed_time FROM pm_events as a, pm_events as b > WHERE a.event_code='pmcd' > OR a.event_code='pmop' > AND b.event_code='pmcl' >

Re: [GENERAL] Complex query need help with OR condition.

2004-10-24 Thread Ken Tozier
On Oct 25, 2004, at 12:35 AM, Tom Lane wrote: Ken Tozier <[EMAIL PROTECTED]> writes: When I add the OR clause things go haywire: SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as elapsed_time FROM pm_events as a, pm_events as b WHERE a.event_code='pmcd' OR a.event_code='

Re: [GENERAL] pqAdmin3

2004-10-24 Thread Jeff Davis
Perhaps the current authentication scheme you have set up is different for local and remote host. It might be that pgAdmin is connecting from a different machine? And if you're using ident authentication it might not work from a remote machine the same as for local. Please give more details, such