Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: 09 October 2006 04:15 To: Dave Page Cc: PostgreSQL Hackers Subject: Re: [HACKERS] Casting to money Dave Page dpage@vale-housing.co.uk writes: select '$123.45'::money ERROR: invalid input syntax for type

Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page Sent: 09 October 2006 08:42 To: Tom Lane Cc: PostgreSQL Hackers Subject: Re: [HACKERS] Casting to money -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]

Re: [HACKERS] Casting to money

2006-10-09 Thread Shane Ambler
Tom Lane wrote: Dave Page dpage@vale-housing.co.uk writes: select '$123.45'::money ERROR: invalid input syntax for type money: $123.45 select '£123.00'::money ERROR: invalid input syntax for type money: £123.00 So ... what locale are you trying this in? I get the following from 8.2beta1 -

Re: [HACKERS] Casting to money

2006-10-09 Thread Albe Laurenz
postgres=# select 123.45::money; ERROR: column 123.45 does not exist LINE 1: select 123.45::money; ^ postgres=# select $123.45::money; ERROR: column $123.45 does not exist LINE 1: select $123.45::money; ^ You are on the wrong mailing list :^) Try

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Csaba Nagy
We are two months past feature freeze ... adding entirely new features to pg_dump is *not* on the table for 8.2. Ok, clear. The scenario I most care about is to be able to make a complete data base dump (including non-schema objects) while excluding only a few tables. Isn't this the

Re: [HACKERS] Casting to money

2006-10-09 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shane Ambler Sent: 09 October 2006 09:06 To: PostgreSQL Hackers Subject: Re: [HACKERS] Casting to money Tom Lane wrote: Dave Page dpage@vale-housing.co.uk writes: select '$123.45'::money

[HACKERS] Fwd: pg_dump VS alter database ... set search_path ...

2006-10-09 Thread Nikolay Samokhvalov
What is the reason to not include database settings (like search_path) to database dump created with pg_dump -C? For me, I've created tmp patch for pg_dump to make my system work (patch for CVS version is included). -- Forwarded message -- From: Nikolay Samokhvalov [EMAIL

[HACKERS] OT: Is there a LinkedIn group for Postgresql?

2006-10-09 Thread Tzahi Fadida
Hi, Is there a LinkedIn group for Postgresql/Hackers list. If there is, how can i join? Thank you. -- Regards, tzahi. Itzhak Fadida M.Sc - Technion, Information Systems, IE Faculty Home Page: Http://tzahi.webhop.info BLOG: Http://tzahi.blogsite.org LinkedIn:

Re: [HACKERS] Backbranch releases and Win32 locking

2006-10-09 Thread Teodor Sigaev
Analyzing locking state, lock occurs when backend wants to send data to stat collector. So state is: backend waits FD_WRITE event, stat collector waits FD_READ. I suspect follow sequence of events in backend: 0 Let us work only with one socket, and socket associated with statically defined

Re: [HACKERS] 8.2beta1 crash possibly in libpq

2006-10-09 Thread Mark Cave-Ayland
On Sun, 2006-10-08 at 17:53 +0200, Magnus Hagander wrote: AFAICT the backtrace and server log is indicating that the crash is happening somewhere in libpq. If someone can help me figure out how to load the libpq symbols into MingW's gdb then I can get a better backtrace if required as I

Re: [HACKERS] 8.2beta1 crash possibly in libpq

2006-10-09 Thread Magnus Hagander
AFAICT the backtrace and server log is indicating that the crash is happening somewhere in libpq. If someone can help me figure out how to load the libpq symbols into MingW's gdb then I can get a better backtrace if required as I can reproduce this 100% of the time. For reference,

Re: [HACKERS] The improvement for psql of 8.2beta1 not

2006-10-09 Thread Merlin Moncure
On 10/8/06, Magnus Hagander [EMAIL PROTECTED] wrote: The test shows that it's OK under Linux (Slackware), but malfunctioned on Windows XP. Good point. We don't use readline on Win32, but rather the native command-line control, over which we have little control. Does libedit compile

[HACKERS] Interface of the R-tree in order to work with postgresql

2006-10-09 Thread jorge alberto
Hi everybody!I'm Jorge from Peru South America, and this is my first postI want to know how can I add a new spatial access method into the postgresql (I'm doing research on spatial access methods( reading a lot of papers and programming a lot too ) but also I want to know how can I add my new data

Re: [HACKERS] Interface of the R-tree in order to work with postgresql

2006-10-09 Thread Martijn van Oosterhout
On Mon, Oct 09, 2006 at 09:15:58AM -0500, jorge alberto wrote: Hi everybody! I'm Jorge from Peru South America, and this is my first post I want to know how can I add a new spatial access method into the postgresql (I'm doing research on spatial access methods( reading a lot of papers and

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Tom Lane
Csaba Nagy [EMAIL PROTECTED] writes: Isn't this the same as Kris' complaint? Why do you need additional dependency analysis to do the above? Well, I obviously didn't understand well the complete feature as it is implemented. Now, is what I want (see above) possible with the new feature, or

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Csaba Nagy
On Mon, 2006-10-09 at 16:24, Tom Lane wrote: I think we've agreed that if you use some exclusion switches, but not any inclusion switches, then only the specific objects matching your switches are excluded. CVS HEAD gets this wrong, but I'm going to work on it today. Cool, that makes it

Re: [HACKERS] Fwd: pg_dump VS alter database ... set search_path ...

2006-10-09 Thread Tom Lane
Nikolay Samokhvalov [EMAIL PROTECTED] writes: What is the reason to not include database settings (like search_path) to database dump created with pg_dump -C? Duplication of code and functionality with pg_dumpall. I'd want to see some thought about how to resolve that, not just a quick

Re: [HACKERS] Backbranch releases and Win32 locking

2006-10-09 Thread Magnus Hagander
Analyzing locking state, lock occurs when backend wants to send data to stat collector. So state is: backend waits FD_WRITE event, stat collector waits FD_READ. I suspect follow sequence of events in backend: 0 Let us work only with one socket, and socket associated with statically

Re: [HACKERS] Interface of the R-tree in order to work with postgresql

2006-10-09 Thread Tom Lane
jorge alberto [EMAIL PROTECTED] writes: where can i find the .h that describes the interface that a spatial access method, like the R-tree, must have in order to work with postgresql. There is no single .h file that will tell you everything you need to know. I'd suggest starting here:

Re: [HACKERS] Backbranch releases and Win32 locking

2006-10-09 Thread Teodor Sigaev
Hmm. Not entirely sure. These are all in the SSL codepath. Are you using SSL on the machine? Does the problem go away if you don't? (I was No, we don;t use SSL. The normal way is that pgwin32_waitforsinglesocket is called from pgwin32_send(), which will always have made the attempt to send

Re: [HACKERS] 8.2beta1 crash possibly in libpq

2006-10-09 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: C:/msys/1.0/home/mca/pg82/REL-8~1.2BE/lib/libpq.dll -o pgsql2shp.exe Info: resolving _PQntuples by linking to __imp__PQntuples (auto-import) This is fairly normal, and it's just info - not even a warning. It seems pretty odd that it would only be

[HACKERS] Prepared Statement Question

2006-10-09 Thread Strong, David
We have a question regarding prepared statements. The following code is located in src/backend/tcop/postgres.c: /* Get the parameter format codes */ numPFormats = pq_getmsgint(input_message, 2); if (numPFormats 0) { int i; pformats = (int16 *)

Re: [HACKERS] 8.2beta1 crash possibly in libpq

2006-10-09 Thread Mark Cave-Ayland
Hi Magnus, I finally got to the bottom of this - it seems that the flags being passed to MingW's linker were incorrect, but instead of erroring out it decided to create a corrupt executable. Here is the command line that was being used to link the pgsql2shp.exe executable, along with the

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Mark Woodward
Mark Woodward [EMAIL PROTECTED] writes: Whenever someone actually writes a pg_upgrade, we'll institute a policy to restrict changes it can't handle. IMHO, *before* any such tool *can* be written, a set of rules must be enacted regulating catalog changes. That one is easy: there are no

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Jim C. Nasby
Sinte we already have width_bucket, I'd argue this should go in core. If someone's feeling adventurous, there should probably be a double precision version as well. Hrm... and maybe text... Doesn't the backend already have something like this for calculating histograms? On Sun, Oct 08, 2006 at

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: Sinte we already have width_bucket, I'd argue this should go in core. If someone's feeling adventurous, there should probably be a double precision version as well. Hrm... and maybe text... It's not clear to me why we have width_bucket operating on

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Martijn van Oosterhout
On Mon, Oct 09, 2006 at 11:50:10AM -0400, Mark Woodward wrote: That one is easy: there are no rules. We already know how to deal with catalog restructurings --- you do the equivalent of a pg_dump -s and reload. Any proposed pg_upgrade that can't cope with this will be rejected out of

Re: [HACKERS] Prepared Statement Question

2006-10-09 Thread Tom Lane
Strong, David [EMAIL PROTECTED] writes: There is similar code for Parameter Lists (ParamListInfo) and Result Format Codes (rformats). Unless we're missing something, a prepared statement would probably never change once prepared. I think you're missing something. Or are you just proposing

Re: [HACKERS] Prepared Statement Question

2006-10-09 Thread Strong, David
Tom, Thanks for the advice. Yes, we were looking at the possibility of saving the palloc(s) (malloc in some cases) on the statement. David From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Mon 10/9/2006 9:08 AM To: Strong, David Cc:

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Mark Woodward
On Mon, Oct 09, 2006 at 11:50:10AM -0400, Mark Woodward wrote: That one is easy: there are no rules. We already know how to deal with catalog restructurings --- you do the equivalent of a pg_dump -s and reload. Any proposed pg_upgrade that can't cope with this will be rejected out of

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: The hard part going to be making sure that even if the power fails halfway through an upgrade that your data will still be readable... I think we had that problem solved too in principle: build the new catalogs in a new $PGDATA directory

Re: [HACKERS] Backbranch releases and Win32 locking

2006-10-09 Thread Teodor Sigaev
:(( Patch doesn't work. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet,

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Josh Berkus
Mark, No one could expect that this could happen by 8.2, or the release after that, but as a direction for the project, the directors of the PostgreSQL project must realize that the dump/restore is becomming like the old locking vacuum problem. It is a *serious* issue for PostgreSQL adoption

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Joshua D. Drake
Josh Berkus wrote: Mark, No one could expect that this could happen by 8.2, or the release after that, but as a direction for the project, the directors of the PostgreSQL project must realize that the dump/restore is becomming like the old locking vacuum problem. It is a *serious* issue for

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Mark Woodward
Mark, No one could expect that this could happen by 8.2, or the release after that, but as a direction for the project, the directors of the PostgreSQL project must realize that the dump/restore is becomming like the old locking vacuum problem. It is a *serious* issue for PostgreSQL

Re: [HACKERS] Upgrading a database dump/restore

2006-10-09 Thread Joshua D. Drake
Mark Woodward wrote: Mark, No one could expect that this could happen by 8.2, or the release after that, but as a direction for the project, the directors of the PostgreSQL project must realize that the dump/restore is becomming like the old locking vacuum problem. It is a *serious* issue

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Jim C. Nasby
On Sat, Oct 07, 2006 at 05:29:03PM -0400, Tom Lane wrote: So the only regex patterns you can't write directly are dot, R* and R? for which you can use these locutions: . = ? R* = (R+|) R? = (R|) (Perhaps this should be documented

Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Stephen Frost [EMAIL PROTECTED] writes: I was hoping to do that, but since it's an aggregate the ffunc format is pre-defined to require accepting the 'internal state' and nothing else, and to return 'anyelement' or 'anyarray' one of the inputs must be

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Jim C. Nasby
On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote: On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: The existing patch's behavior is that the rightmost switch wins, ie, if an object's name matches more than one pattern then it

Re: [HACKERS] Interface of the R-tree in order to work with postgresql

2006-10-09 Thread J. Andrew Rogers
On Oct 9, 2006, at 7:21 AM, Martijn van Oosterhout wrote: On Mon, Oct 09, 2006 at 09:15:58AM -0500, jorge alberto wrote: I want to know how can I add a new spatial access method into the postgresql (I'm doing research on spatial access methods( reading a lot of papers and programming a lot

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread David Fetter
On Mon, Oct 09, 2006 at 12:07:29PM -0500, Jim C. Nasby wrote: On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote: On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: The existing patch's behavior is that the rightmost switch

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-09 Thread Jim C. Nasby
On Sun, Oct 08, 2006 at 05:26:11PM -0700, Mark Wong wrote: I made another couple of gross mistakes of forgetting to compile PostgreSQL with --enable-thread-safe and enabling the user space irq balancing program in Linux. I've restarted the histories with 600 and What's the advantage of irq

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-09 Thread Mark Wong
Jim C. Nasby wrote: On Sun, Oct 08, 2006 at 05:26:11PM -0700, Mark Wong wrote: I made another couple of gross mistakes of forgetting to compile PostgreSQL with --enable-thread-safe and enabling the user space irq balancing program in Linux. I've restarted the histories with 600 and What's

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 12:02:12PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: Sinte we already have width_bucket, I'd argue this should go in core. If someone's feeling adventurous, there should probably be a double precision version as well. Hrm... and maybe text...

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: On Mon, Oct 09, 2006 at 12:02:12PM -0400, Tom Lane wrote: ... I think Jeremy's problem would be solved just by applying the float8 version to extract(epoch from timestamp). Thinko there ... I meant to type extract(epoch from interval). Well, it would be

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote: On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote: My first thought is that the rule should be to apply all the inclusion switches (implicitly including everything if there are

Re: [HACKERS] OT: Is there a LinkedIn group for Postgresql?

2006-10-09 Thread Chris Browne
[EMAIL PROTECTED] (Tzahi Fadida) writes: Hi, Is there a LinkedIn group for Postgresql/Hackers list. If there is, how can i join? The usual way LinkedIn works is that if there are people you know that do PostgreSQL work, they may link to others doing the same. You should probably see about

Re: [HACKERS] Fwd: pg_dump VS alter database ... set search_path ...

2006-10-09 Thread Nikolay Samokhvalov
On 10/9/06, Tom Lane [EMAIL PROTECTED] wrote: Duplication of code and functionality with pg_dumpall. Well, then -C option of pg_dump can be considered as duplication of pg_dumpall's functionality too, right? I'd want to see some thought about how to resolve that, not just a quick

Re: [HACKERS] [PATCHES] Generic Monitoring Framework with DTrace patch

2006-10-09 Thread Josh Berkus
All, I'll be fixing this documentation issue now that I have full information. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an

[HACKERS] continuing daily testing of dbt3 against postgresql

2006-10-09 Thread Mark Wong
Hi everyone, I have now resumed producing daily results of dbt-3 against PostgreSQL CVS code at the 10 GB scale factor with results here: http://dbt.osdl.org/dbt3.html I'm currently only running the load the power test because of the amount of time it takes to run through the power test.

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 01:49:37PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: On Mon, Oct 09, 2006 at 12:02:12PM -0400, Tom Lane wrote: ... I think Jeremy's problem would be solved just by applying the float8 version to extract(epoch from timestamp). Thinko there ... I

Re: [HACKERS] continuing daily testing of dbt3 against postgresql

2006-10-09 Thread Stefan Kaltenbrunner
Mark Wong wrote: Hi everyone, I have now resumed producing daily results of dbt-3 against PostgreSQL CVS code at the 10 GB scale factor with results here: http://dbt.osdl.org/dbt3.html I'm currently only running the load the power test because of the amount of time it takes to run

Re: [HACKERS] OT: Is there a LinkedIn group for Postgresql?

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 05:56:41PM +, Chris Browne wrote: [EMAIL PROTECTED] (Tzahi Fadida) writes: Hi, Is there a LinkedIn group for Postgresql/Hackers list. If there is, how can i join? The usual way LinkedIn works is that if there are people you know that do PostgreSQL work, they

Re: [HACKERS] OT: Is there a LinkedIn group for Postgresql?

2006-10-09 Thread Tzahi Fadida
Groups are created by some kind of organization. For example, a mailing list of java professionals i am listed on. There is no need to advertise because if you are a part of that organization you can ask the organization leader to add you to the group. Seeing that no one has volunteered a group

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 01:59:18PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote: On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote: My first thought is that the rule should be to apply all the

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 10:37:32AM -0700, Mark Wong wrote: Jim C. Nasby wrote: On Sun, Oct 08, 2006 at 05:26:11PM -0700, Mark Wong wrote: I made another couple of gross mistakes of forgetting to compile PostgreSQL with --enable-thread-safe and enabling the user space irq balancing program in

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread David Fetter
On Mon, Oct 09, 2006 at 02:34:09PM -0500, Jim C. Nasby wrote: On Mon, Oct 09, 2006 at 01:59:18PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: On Sat, Oct 07, 2006 at 06:22:19PM -0700, David Fetter wrote: On Fri, Oct 06, 2006 at 10:28:21PM -0400, Gregory Stark wrote: My

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: On Mon, Oct 09, 2006 at 01:49:37PM -0400, Tom Lane wrote: This is exactly the slippery slope I don't care to start down. I guess I'm confused as to how this is any different from other functions where we've provided multiple input arguments, such as the

Re: [HACKERS] continuing daily testing of dbt2 against postgresql

2006-10-09 Thread Mark Wong
Luke Lonergan wrote: +1 Mark, can you quantify the impact of not running with IRQ balancing enabled? Yeah, I'll try to have that done within a couple of days. Mark ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [HACKERS] continuing daily testing of dbt2 against

2006-10-09 Thread Luke Lonergan
+1 Mark, can you quantify the impact of not running with IRQ balancing enabled? - Luke Msg is shrt cuz m on ma treo -Original Message- Original message contents unavailable ---(end of broadcast)--- TIP 9: In versions below 8.0, the

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2006-10-09 Thread Aaron Bono
On 10/5/06, Jim Nasby [EMAIL PROTECTED] wrote: On Oct 5, 2006, at 11:50 AM, Tom Lane wrote: regression=# select ('2006-09-15 23:59:00'::timestamp - '2006-09-01 09:30:41'::timestamp);?column? --14 days 14:28:19 (1 row) should be reporting '350:28:19' instead. This is a hack that

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Jeremy Drake
On Mon, 9 Oct 2006, Tom Lane wrote: It's not clear to me why we have width_bucket operating on numeric and not float8 --- that seems like an oversight, if not outright misunderstanding of the type hierarchy. Would that make the below a lot faster? But if we had the float8 version, I think

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 03:49:50PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: On Mon, Oct 09, 2006 at 01:49:37PM -0400, Tom Lane wrote: This is exactly the slippery slope I don't care to start down. I guess I'm confused as to how this is any different from other

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Tom Lane
Jeremy Drake [EMAIL PROTECTED] writes: I found the function I used before I implemented the C version. It was significantly slower, which is why I wrote the C version. I would imagine that most of the problem is the NUMERIC arithmetic that's doing. regards, tom lane

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Neil Conway
On Mon, 2006-10-09 at 12:02 -0400, Tom Lane wrote: It's not clear to me why we have width_bucket operating on numeric and not float8 I asked about this when I originally implemented width_bucket(), I recall[1]. At the time, there was scepticism about whether it was even worth implementing

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2006-10-09 Thread Jim C. Nasby
On Mon, Oct 09, 2006 at 02:57:28PM -0500, Aaron Bono wrote: On 10/5/06, Jim Nasby [EMAIL PROTECTED] wrote: On Oct 5, 2006, at 11:50 AM, Tom Lane wrote: regression=# select ('2006-09-15 23:59:00'::timestamp - '2006-09-01 09:30:41'::timestamp); ?column? -- 14 days

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2006-10-09 Thread Josh Berkus
Jim, I agree in general, except most languages have terrible support for time/date data, so I can see a much bigger case for the database being able to do it (and it's not like we'll be removing justify_*). Be that as it may, there are probably apps out there that will break if this is just

Re: [HACKERS] [COMMITTERS] pgsql: Revise psql pattern-matching switches

2006-10-09 Thread Bruce Momjian
Tom Lane wrote: Log Message: --- Revise psql pattern-matching switches as per discussion. The rule is now Uh, you mean pg_dump, right? --- to process all inclusion switches then all exclusion

Re: [HACKERS] width_bucket function for timestamps

2006-10-09 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: On Mon, 2006-10-09 at 12:02 -0400, Tom Lane wrote: It's not clear to me why we have width_bucket operating on numeric and not float8 I asked about this when I originally implemented width_bucket(), I recall[1]. At the time, there was scepticism about

Re: [HACKERS] [COMMITTERS] pgsql: Revise psql pattern-matching switches as per discussion.

2006-10-09 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Log Message: --- Revise psql pattern-matching switches as per discussion. The rule is now Uh, you mean pg_dump, right? Sheesh, and I did read that message over twice before committing :-(. Long day, time for a

Re: [HACKERS] pg_dump exclusion switches and functions/types

2006-10-09 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sure, but the question is whether that incremental gain in capability is worth the extra logical complexity. I'm inclined to think that many more users would get burned by the complexity than would have use for it. Considering that we've gotten

Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Stephen Frost
* Stephen Frost ([EMAIL PROTECTED]) wrote: I'm going to be running a very large query shortly using this aaccum and will report back how it goes. It went *very* well, actually much better than I had originally expected. This query used to take over 12 hours to complete (about 11 of which was

Re: [HACKERS] Backbranch releases

2006-10-09 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Sure, and stamping. How far back do you want to go? We might as well go back to 7.3 --- I saw Teodor back-patched some of his contrib/ltree fixes that far. Back branches are ready for release. -- Bruce Momjian [EMAIL

[HACKERS] query optimization with UDFs

2006-10-09 Thread jungmin shin
Hello Everybody, I have a question about optimization of queries which includes UDFs. Does anybody know what the Postgres does for optimizing the queries with UDFs? Does the Postgres query optimizer do anything special with UDFs? Thanks, Jungmin Shin

Re: [HACKERS] query optimization with UDFs

2006-10-09 Thread Neil Conway
On Mon, 2006-10-09 at 22:49 -0400, jungmin shin wrote: Does anybody know what the Postgres does for optimizing the queries with UDFs? The optimizer considers function volatility to avoid reevaluating UDFs needlessly, and to use index scans on predicates involving a function. Also, functions

Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Merlin Moncure
On 10/10/06, Stephen Frost [EMAIL PROTECTED] wrote: * Stephen Frost ([EMAIL PROTECTED]) wrote: I'm going to be running a very large query shortly using this aaccum and will report back how it goes. It went *very* well, actually much better than I had originally expected. This query used to