Re: [HACKERS] [PATCHES] VACUUM Improvements - WIP Patch

2008-09-01 Thread Heikki Linnakangas
Abhijit Menon-Sen wrote: At 2008-08-25 10:24:01 +0300, [EMAIL PROTECTED] wrote: My original plan was to enable index-only-scans using the DSM as well for 8.4, but it's pretty clear at this point that I don't have the time to finish that :-(. I wonder how hard that would be. It's doable, for

[HACKERS] WIP: Column-level Privileges

2008-09-01 Thread Stephen Frost
, apologies for it not being ready by 9/1. I'm planning to continue working on it tomorrow, and throughout September as opportunity allows (ie: when Josh isn't keeping me busy). Thanks, Stephen colprivs_wip.20080901.diff.gz Description: Binary data -- Sent via pgsql

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Dennis Bj�rklund
hannu=# create or replace function ffa(a int, a int) returns int language plpgsql as $$begin return a + a; end;$$; CREATE FUNCTION hannu=# select ffa(1,2); ffa - 2 (1 row) Is this defined by some standard or just an oversight ? It's just an oversight. What about the similar

Re: [HACKERS] Extending grant insert on tables to sequences

2008-09-01 Thread Jaime Casanova
On Fri, Aug 22, 2008 at 10:19 PM, Bruce Momjian [EMAIL PROTECTED] wrote: Added to September commit fest. updating the patch with one that only extends inserts. though, i haven't look at the col level privs patch yet. -- regards, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y

[HACKERS] [Patch Review] TRUNCATE Permission

2008-09-01 Thread Ryan Bradetich
Hello all, Robert Haas submitted the TRUNCATE permissions patch for the September commit fest: http://archives.postgresql.org/message-id/[EMAIL PROTECTED] I had some extra time tonight, so I downloaded, installed and reviewed this patch. Here are my findings: 1. I found the patch style to be

Re: [HACKERS] Our CLUSTER implementation is pessimal

2008-09-01 Thread Martijn van Oosterhout
On Mon, Sep 01, 2008 at 12:25:26AM +0100, Gregory Stark wrote: The problem is that it does a full index scan and looks up each tuple in the order of the index. That means it a) is doing a lot of random i/o and b) has to access the same pages over and over again. snip a) We need some way to

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Pavel Stehule
Hello 2008/8/31 Hannu Krosing [EMAIL PROTECTED]: It seems that we allow several function arguments to have same name (or is it label :) hannu=# create or replace function ff(a int, a int) returns int language plpgsql as $$begin return $1+$2; end;$$; CREATE FUNCTION hannu=# select ff(1,1);

Re: [HACKERS] Our CLUSTER implementation is pessimal

2008-09-01 Thread Heikki Linnakangas
Martijn van Oosterhout wrote: On Mon, Sep 01, 2008 at 12:25:26AM +0100, Gregory Stark wrote: The problem is that it does a full index scan and looks up each tuple in the order of the index. That means it a) is doing a lot of random i/o and b) has to access the same pages over and over again.

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Magnus Hagander
Pavel Stehule wrote: Hello 2008/8/31 Hannu Krosing [EMAIL PROTECTED]: It seems that we allow several function arguments to have same name (or is it label :) hannu=# create or replace function ff(a int, a int) returns int language plpgsql as $$begin return $1+$2; end;$$; CREATE FUNCTION

Re: [HACKERS] WIP patch: Collation support

2008-09-01 Thread Radek Strnad
Ok, so do you suggest to leave it with a notice reindex database or start to solve it somehow? Regards Radek Strnad On Mon, Sep 1, 2008 at 12:08 AM, Alvaro Herrera [EMAIL PROTECTED]wrote: Radek Strnad escribió: - when creating database with different collation than database cluster, the

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Pavel Stehule
2008/9/1 Magnus Hagander [EMAIL PROTECTED]: Pavel Stehule wrote: Hello 2008/8/31 Hannu Krosing [EMAIL PROTECTED]: It seems that we allow several function arguments to have same name (or is it label :) hannu=# create or replace function ff(a int, a int) returns int language plpgsql as

Re: [HACKERS] Auto-explain patch

2008-09-01 Thread ITAGAKI Takahiro
Dean Rasheed [EMAIL PROTECTED] wrote: An arguable part is initializing instruments in ExecutorRun_hook. The initialization should be done in ExecutorStart normally, but it is too late in the hook. Is it safe? or are there any better idea? How about adding a new hook to control

Re: [HACKERS] Attaching error cursor position to invalid constant values

2008-09-01 Thread Heikki Linnakangas
Tom Lane wrote: Does anyone think this might be too chatty? No. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Attaching error cursor position to invalid constant values

2008-09-01 Thread Asko Oja
On Mon, Sep 1, 2008 at 12:59 PM, Heikki Linnakangas [EMAIL PROTECTED] wrote: Tom Lane wrote: Does anyone think this might be too chatty? No. +1 -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Hannu Krosing
On Mon, 2008-09-01 at 11:15 +0200, Pavel Stehule wrote: 2008/9/1 Magnus Hagander [EMAIL PROTECTED]: Pavel Stehule wrote: Hello 2008/8/31 Hannu Krosing [EMAIL PROTECTED]: hannu=# create or replace function ffa(a int, a int) returns int language plpgsql as $$begin return a + a;

Re: [HACKERS] [PATCH] Make gram.y use palloc/pfree for memory management

2008-09-01 Thread Marko Kreen
First a correction, overriding malloc/free seems dangerous they seems to leak out, so correct would be to use YYMALLOC/YYFREE. This leaves 1.875 potentially leaking, but danger seems small. On 9/1/08, Tom Lane [EMAIL PROTECTED] wrote: Marko Kreen [EMAIL PROTECTED] writes: This means gram.y

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-01 Thread Marko Kreen
On 9/1/08, Tom Lane [EMAIL PROTECTED] wrote: Marko Kreen [EMAIL PROTECTED] writes: - In attempt to preserve maximum range of values for INT64_IS_BUSTED systems, the code is written rather non-obvious way. I do not personally object a bit to making the units comparisons

Re: [HACKERS] Extending grant insert on tables to sequences

2008-09-01 Thread Stephen Frost
* Jaime Casanova ([EMAIL PROTECTED]) wrote: On Fri, Aug 22, 2008 at 10:19 PM, Bruce Momjian [EMAIL PROTECTED] wrote: Added to September commit fest. updating the patch with one that only extends inserts. though, i haven't look at the col level privs patch yet. At least initially I

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-01 Thread Heikki Linnakangas
Hitoshi Harada wrote: 2008/8/30 Hitoshi Harada [EMAIL PROTECTED]: Here's the latest window functions patch against HEAD. It seems to be ready for the September commit fest, as added documents, WINDOW clause feature and misc tests. I guess this would be the window functions feature freeze for

Re: [HACKERS] [Patch Review] TRUNCATE Permission

2008-09-01 Thread Ryan Bradetich
Hello all, On Sun, Aug 31, 2008 at 11:55 PM, Ryan Bradetich [EMAIL PROTECTED]wrote: I do not believe this is a huge issue since truncate is prohibited on the system catalogs by the truncate_check_rel(). template1=# truncate pg_authid; ERROR: permission denied: pg_authid is a system

Re: [HACKERS] [Patch Review] TRUNCATE Permission

2008-09-01 Thread Tom Lane
Ryan Bradetich [EMAIL PROTECTED] writes: I do not believe this is a huge issue since truncate is prohibited on the system catalogs by the truncate_check_rel(). Only when allowSystemTableMods is false. I think it would be a serious mistake for your patch to treat the system catalogs

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-01 Thread David Fetter
On Mon, Sep 01, 2008 at 09:00:47PM +0300, Heikki Linnakangas wrote: Hitoshi Harada wrote: 2008/8/30 Hitoshi Harada [EMAIL PROTECTED]: Here's the latest window functions patch against HEAD. It seems to be ready for the September commit fest, as added documents, WINDOW clause feature and misc

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: So, should this be fixed at calling / SQL side (by not allowing repeating argument names) or at pl side for each pl separately ? I'm for fixing it just once, ie, in CREATE FUNCTION. I can't imagine any scenario where it's a good idea to have duplicate

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-01 Thread Gregory Stark
Heikki Linnakangas [EMAIL PROTECTED] writes: sfunc is called once for each input row. Unlike with normal aggregates, sfunc is passed the whole input row, so that e.g RANK can compare it against the previous row, or LEAD can buffer it. I'm not sure I follow this bit about being passed the

Fwd: [HACKERS] [Patch Review] TRUNCATE Permission

2008-09-01 Thread Ryan Bradetich
I had intended to send this message to the pgsql-hackers mailing list as well. Thanks, - Ryan -- Forwarded message -- From: Ryan Bradetich [EMAIL PROTECTED] Date: Mon, Sep 1, 2008 at 2:20 PM Subject: Re: [HACKERS] [Patch Review] TRUNCATE Permission To: Tom Lane [EMAIL PROTECTED]

[HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread David E. Wheeler
Howdy, I'm trying to write a simple function that will return a string with the type name of a value. Unfortunately, it keeps dying on me. I don't even get any useful debugging information with --enable-cassert, just this: LOG: server process (PID 96946) was terminated by signal 10: Bus

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread Tom Lane
David E. Wheeler [EMAIL PROTECTED] writes: Here's the complete code: Looks like you forgot PG_FUNCTION_INFO_V1(), so what's being passed to this isn't an fcinfo ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

[EMAIL PROTECTED]: Re: [HACKERS] [patch] GUC source file and line number]

2008-09-01 Thread Alvaro Herrera
Greg just sent me this patch, augmenting the one I sent to add source file and line to GUC vars; Greg's patch adds a column with the default value of each var. I forward it to -hackers to have a public Message-Id to link to in the Commitfest page. -- Alvaro Herrera

Re: Fwd: [HACKERS] [Patch Review] TRUNCATE Permission

2008-09-01 Thread Tom Lane
Ryan Bradetich [EMAIL PROTECTED] writes: On Mon, Sep 1, 2008 at 1:00 PM, Tom Lane [EMAIL PROTECTED] wrote: [ something about your patch ] This is Robert Haas's patch for the September 2008 commit-fest. I am just offering my review. Sorry about that, I got confused by the reply-to-a-reply.

Re: [HACKERS] [PATCH] allow has_table_privilege(..., 'usage') on sequences

2008-09-01 Thread Jaime Casanova
On Thu, Aug 7, 2008 at 3:08 AM, Abhijit Menon-Sen [EMAIL PROTECTED] wrote: I just noticed, to my dismay, that has_table_privilege() does not allow me to check for usage privileges on sequences. Maybe we want a new function has_sequence_privilege() instead? -- regards, Jaime Casanova Soporte

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread David E. Wheeler
On Sep 1, 2008, at 16:55, Tom Lane wrote: David E. Wheeler [EMAIL PROTECTED] writes: Here's the complete code: Looks like you forgot PG_FUNCTION_INFO_V1(), so what's being passed to this isn't an fcinfo ... Bah! I knew I had to be missing something really fundamental. Thanks Tom. BTW,

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread Brendan Jurd
On Tue, Sep 2, 2008 at 2:03 PM, David E. Wheeler [EMAIL PROTECTED] wrote: BTW, anyone have any interest in this function in core? Its purpose is to return a string identifying the data type of its argument. It's useful for dynamically building queries to pass to PL/pgSQL's EXECUTE statement

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread Neil Conway
On Mon, Sep 1, 2008 at 9:35 PM, Brendan Jurd [EMAIL PROTECTED] wrote: +1. I've been using a variation on this theme (it returns the type OID, not a text value) for a couple of years. Returning regtype seems like the natural choice. -Neil -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-01 Thread Hitoshi Harada
Thanks for comments, 2008/9/2 Heikki Linnakangas [EMAIL PROTECTED]: Ok, I'm starting to read up on SQL2003 window functions, and to review this patch. Here's a long brain-dump of my first thoughts on the design. Let's list a couple of requirements first: 1. It's important that what gets

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: On Mon, Sep 1, 2008 at 9:35 PM, Brendan Jurd [EMAIL PROTECTED] wrote: +1. I've been using a variation on this theme (it returns the type OID, not a text value) for a couple of years. Returning regtype seems like the natural choice. I was just about to

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-01 Thread Hitoshi Harada
2008/9/2 Gregory Stark [EMAIL PROTECTED]: And it doesn't answer how to deal with things like SELECT lag(x,1) OVER (ORDER BY a), lag(x,1) OVER (ORDER BY b) I, uh, don't actually have any ideas of how to deal with that one :( For different windows we make different window nodes with different

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-01 Thread Brendan Jurd
On Tue, Sep 2, 2008 at 2:57 PM, Tom Lane [EMAIL PROTECTED] wrote: Neil Conway [EMAIL PROTECTED] writes: Returning regtype seems like the natural choice. I was just about to say the same. Yes. In fact, the way I typically use the function is to write gettype(whatever)::regtype. I was too