Re: [HACKERS] Weird type selection choice

2007-11-07 Thread Peter Eisentraut
I wrote: I noticed this problem in 8.2 and 8.3: pei=# select mod( trunc( 1 ), 2 ); ERROR: 42883: function mod(double precision, integer) does not exist LINE 1: select mod( trunc( 1 ), 2 ); ^ I suppose there will be little interest in including the obvious solution, namely

Re: [HACKERS] Visibility map thoughts

2007-11-07 Thread Heikki Linnakangas
Jeff Davis wrote: On Mon, 2007-11-05 at 22:45 +, Heikki Linnakangas wrote: 1) Do as you say above. What are some of the cost trade-offs here? It seems that frequent VACUUM FREEZE runs would keep the visibility map mostly full, but will also cause more writing. I suppose the worst case is

Re: [HACKERS] Weird type selection choice

2007-11-07 Thread Heikki Linnakangas
Peter Eisentraut wrote: I wrote: I noticed this problem in 8.2 and 8.3: pei=# select mod( trunc( 1 ), 2 ); ERROR: 42883: function mod(double precision, integer) does not exist LINE 1: select mod( trunc( 1 ), 2 ); ^ I suppose there will be little interest in including the

Re: [HACKERS] Bug: --with-libxml does not take a location

2007-11-07 Thread Jörg Beyer
Josh, did you try to set XML2_CONFIG prior to ./configure? I _am_ on Mac OS X 10.4.10, and using (in my particular case) $ export XML2_CONFIG=/usr/local/bin/xml2-config as well as --with-libraries=/usr/lib/:/usr/local/lib/ --with-includes=/usr/include/:/usr/local/include/ seems to

Re: [HACKERS] Weird type selection choice

2007-11-07 Thread Alvaro Herrera
Peter Eisentraut wrote: Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas: Peter Eisentraut wrote: I wrote: I noticed this problem in 8.2 and 8.3: pei=# select mod( trunc( 1 ), 2 ); ERROR: 42883: function mod(double precision, integer) does not exist LINE 1: select

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-07 Thread Alvaro Herrera
Gregory Stark wrote: Brendan Jurd [EMAIL PROTECTED] writes: They are clear, useful and easy to understand. [1] http://www.python.org/dev/peps/pep-0007/ [2] http://www.python.org/dev/peps/pep-0008/ I didn't look at the second but the first at least is a good example of a style

Re: [HACKERS] Visibility map thoughts

2007-11-07 Thread Kevin Grittner
On Tue, Nov 6, 2007 at 8:18 AM, in message [EMAIL PROTECTED], Heikki Linnakangas [EMAIL PROTECTED] wrote: The indexam API needs to be modified as well, because there's currently no API to return index tuples from an index. I know this is tangential, but expanding the types of selection

Re: [HACKERS] Weird type selection choice

2007-11-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas: Why would you run a query like that in the first place? It seems like a useless query as it is. Is there a bigger story behind it? The 1 is substituted from somewhere else. Seems like textual

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-07 Thread Brendan Jurd
On 11/8/07, Bruce Momjian [EMAIL PROTECTED] wrote: The problem is that a full list would be harder to understand than just looking at the existing code and following it, or taking suggestions from us as we review the patch. What makes you say it would be necessarily harder to understand?

Re: [HACKERS] Test lab

2007-11-07 Thread Greg Smith
On Wed, 7 Nov 2007, Hannu Krosing wrote: To be really useful, we should always run general system monitoring alongside DB test runs, so we can see, and also later look up, where the bottleneck are. The way the DBT-2 tests run involves spawning off the relevant monitoring tools (iostat,

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-07 Thread Bruce Momjian
Brendan Jurd wrote: On 11/6/07, Bruce Momjian [EMAIL PROTECTED] wrote: I understand your suggestions but it seems there would be too many individual items to be readable. Can you suggest a full list so we can get an idea of how long it would be? If the body of material on writing good

Re: [HACKERS] Segmentation fault using digest from pg_crypto

2007-11-07 Thread Bruce Momjian
Marko Kreen wrote: On 11/6/07, Bruce Momjian [EMAIL PROTECTED] wrote: Alvaro Herrera wrote: Tom, how about putting a note about that into next 8.2 minor release notes? (8.3 too?) Something like You need to refresh pgcrypto functions, because since rel 8.2 the code depends

Re: [HACKERS] Bug: --with-libxml does not take a location

2007-11-07 Thread Jörg Beyer
Maybe except --with-tcl --with-tclconfig=DIRECTORY although that's not exactly what you were referring to, of course. Anyway, I think the OS X case could be worth to keep the design question in mind. Speaking as a not very experienced user of 'make' and friends, I'm appreciating

[HACKERS] interval * numeric operator

2007-11-07 Thread Peter Eisentraut
There are interval * double precision operators (both ways) but none for interval * numeric. Adding this would make sense since interval is now optionally stored as fixed-point internally. Any objections to adding this in 8.4? -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-07 Thread Gregory Stark
Brendan Jurd [EMAIL PROTECTED] writes: They are clear, useful and easy to understand. [1] http://www.python.org/dev/peps/pep-0007/ [2] http://www.python.org/dev/peps/pep-0008/ I didn't look at the second but the first at least is a good example of a style guide which is *not* useful. It's

Re: [HACKERS] Weird type selection choice

2007-11-07 Thread Peter Eisentraut
Am Mittwoch, 7. November 2007 schrieb Heikki Linnakangas: Peter Eisentraut wrote: I wrote: I noticed this problem in 8.2 and 8.3: pei=# select mod( trunc( 1 ), 2 ); ERROR: 42883: function mod(double precision, integer) does not exist LINE 1: select mod( trunc( 1 ), 2 );

Re: [HACKERS] [pgsql-www] tribble.postgresql.org - planned maintenance downtime

2007-11-07 Thread Stefan Kaltenbrunner
Stefan Kaltenbrunner wrote: Hi all! There will be planned downtime on tribble.postgresql.org Nov 7(tomorrow) from 11:30-12:00 GMT(estimated) affecting the following services: cvs.postgresql.org wwwmaster.postgresql.org www.pgadmin.org doxygen.postgresql.org Downtime is necessary to implement

Re: [HACKERS] Test lab

2007-11-07 Thread Hannu Krosing
Ühel kenal päeval, P, 2007-11-04 kell 13:02, kirjutas Greg Smith: On Sat, 3 Nov 2007, Stefan Kaltenbrunner wrote: there is the various dbt workloads,sysbench, jans tpc-w implementation, hell even pgbench The DBT workloads are good for simulating disk-bound operations, but I don't

Re: [HACKERS] pg_resetxlog output clarification

2007-11-07 Thread Peter Eisentraut
Am Dienstag, 25. September 2007 schrieb Simon Riggs: Peter Eisentraut [EMAIL PROTECTED] writes: First log file ID for new XLOG: First log file segment for new XLOG: Perhaps after reset would be better than for new XLOG. I like this better. I have made the change. -- Peter

[HACKERS] pg_statistic forced values

2007-11-07 Thread Jacques Caron
Hi, It is well known that in some instances the Postgresql will make estimates of the number of distinct values in a table that can be quite far off reality. This then has a tendency to make the planner lean towards unsavory plans (read: seqscans) because it estimates the number of lines

Re: [HACKERS] Visibility map thoughts

2007-11-07 Thread Kevin Grittner
On Wed, Nov 7, 2007 at 3:13 PM, in message [EMAIL PROTECTED], Heikki Linnakangas [EMAIL PROTECTED] wrote: Kevin Grittner wrote: On Tue, Nov 6, 2007 at 8:18 AM, in message [EMAIL PROTECTED], Heikki Linnakangas [EMAIL PROTECTED] wrote: The indexam API needs to be modified as well,

[HACKERS] New tzdata available

2007-11-07 Thread Devrim GÜNDÜZ
Hi, ftp://elsie.nci.nih.gov/pub/tzdata2007i.tar.gz Per announcement: ...is now available; this reflects changes for Cuba and Syria circulated earlier this week on the time zone mailing list. There are no code changes, so there's no tzcode2007i; tzcood2007h remains current. Regards, -- Devrim

Re: [HACKERS] Visibility map thoughts

2007-11-07 Thread Heikki Linnakangas
Kevin Grittner wrote: On Tue, Nov 6, 2007 at 8:18 AM, in message [EMAIL PROTECTED], Heikki Linnakangas [EMAIL PROTECTED] wrote: The indexam API needs to be modified as well, because there's currently no API to return index tuples from an index. I know this is tangential, but expanding the

[HACKERS] Throw error and ErrorContext question.

2007-11-07 Thread Gevik Babakhani
Hi, Regarding the function parameter ref TODO: I am trying to catch and copy an error to be re-thrown later. I have the following questions: 1. Is the catch part in the following safe? 2. How do I re-throw the copied error when I am not in ErrorContext anymore? I cannot use ReThrowError

Re: [HACKERS] fulltext parser strange behave

2007-11-07 Thread Tom Lane
Pavel Stehule [EMAIL PROTECTED] writes: I am writing tsearch2 wrapper and I testing functionality. I found some little bit strange on default parser. It can't parse tags with numbers: Well, the state machine definitely thinks that tag names should contain only ASCII letters (with possibly a

[HACKERS] Feature Request: inline comments

2007-11-07 Thread CaT
Whilst reading http://www.postgresql.org/docs/8.2/interactive/sql-comment.html I came across this user comment: Ricardo Bánffy 04 Sep 2007 18:15:44 It is a pretty obvious suggestion I bet was made many, many times before, but it would be very useful if

Re: [HACKERS] Throw error and ErrorContext question.

2007-11-07 Thread Tom Lane
Gevik Babakhani [EMAIL PROTECTED] writes: I am trying to catch and copy an error to be re-thrown later. This is certainly not the right way to go about solving your problem. If you need to refactor some of the column lookup routines to make this patch work, then do so, but don't try to make an

Re: [HACKERS] Feature Request: inline comments

2007-11-07 Thread Tom Lane
CaT [EMAIL PROTECTED] writes: It is a pretty obvious suggestion I bet was made many, many times before, but it would be very useful if you could create comments while creating the objects themselves, like CREATE TABLE FOO ( ID INTEGER NOT NULL PRIMARY KEY COMMENT 'The ID', VALUE

Re: [HACKERS] fulltext parser strange behave

2007-11-07 Thread Andrew Dunstan
Tom Lane wrote: Pavel Stehule [EMAIL PROTECTED] writes: I am writing tsearch2 wrapper and I testing functionality. I found some little bit strange on default parser. It can't parse tags with numbers: Well, the state machine definitely thinks that tag names should contain only ASCII

Re: [HACKERS] Feature Request: inline comments

2007-11-07 Thread CaT
On Wed, Nov 07, 2007 at 06:32:53PM -0500, Tom Lane wrote: CaT [EMAIL PROTECTED] writes: It is a pretty obvious suggestion I bet was made many, many times before, but it would be very useful if you could create comments while creating the objects themselves, like CREATE TABLE FOO (

Re: [HACKERS] Throw error and ErrorContext question.

2007-11-07 Thread Gevik Babakhani
Thank you Tom. I have considered a noError boolean too. but please considered the following: step 1: call qualifiedNameToVar(noError = true), which generates an error but gets suppressed by noError parameter. step 2: process function parameter name for funct1.param1, check funct1 == the name

Re: [HACKERS] fulltext parser strange behave

2007-11-07 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: Well, the state machine definitely thinks that tag names should contain only ASCII letters (with possibly a leading or trailing '/'). Given the HTML examples I suppose we should allow non-first digits too. Is

Re: [HACKERS] fulltext parser strange behave

2007-11-07 Thread Oleg Bartunov
On Wed, 7 Nov 2007, Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: Well, the state machine definitely thinks that tag names should contain only ASCII letters (with possibly a leading or trailing '/'). Given the HTML examples I suppose we should allow non-first

Re: [HACKERS] Bug: --with-libxml does not take a location

2007-11-07 Thread Josh Berkus
Jörg Beyer wrote: Josh, did you try to set XML2_CONFIG prior to ./configure? I _am_ on Mac OS X 10.4.10, and using (in my particular case) $ export XML2_CONFIG=/usr/local/bin/xml2-config as well as --with-libraries=/usr/lib/:/usr/local/lib/

Re: [HACKERS] Beta2 crash / create type + tsearch2

2007-11-07 Thread Radoslaw Zielinski
Tom Lane [EMAIL PROTECTED] [07-11-2007 05:24]: Jeff Davis [EMAIL PROTECTED] writes: I agree that a dump/restore from 8.2 with tsearch2 to 8.3 with built-in tsearch should not SIGSEGV. That's not what he did, though. Force-feeding contrib/tsearch2 into 8.3 will not work. That is what I did.

Re: [HACKERS] Feature Request: inline comments

2007-11-07 Thread Andrew Dunstan
CaT wrote: On Wed, Nov 07, 2007 at 06:32:53PM -0500, Tom Lane wrote: CaT [EMAIL PROTECTED] writes: It is a pretty obvious suggestion I bet was made many, many times before, but it would be very useful if you could create comments while creating the objects themselves, like

Re: [HACKERS] fulltext parser strange behave

2007-11-07 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: Well, the state machine definitely thinks that tag names should contain only ASCII letters (with possibly a leading or trailing '/'). Given the HTML examples I suppose we should allow non-first digits too. Is there anything else that

Re: [HACKERS] Throw error and ErrorContext question.

2007-11-07 Thread Tom Lane
Gevik Babakhani [EMAIL PROTECTED] writes: I have considered a noError boolean too. but please considered the following: step 1: call qualifiedNameToVar(noError = true), which generates an error but gets suppressed by noError parameter. step 2: process function parameter name for