Re: [HACKERS] Arithmetic operators for macaddr type

2011-12-11 Thread Pavel Stehule
2011/12/12 Brendan Jurd : > Hello folks, > > I just bumped into a situation where I wanted to do a little macaddr > arithmetic in postgres.  I note that the inet type has support for > bitwise AND, OR and NOT, as well as subtraction, but macaddr has none > of the above. > > These operations are eas

[HACKERS] Arithmetic operators for macaddr type

2011-12-11 Thread Brendan Jurd
Hello folks, I just bumped into a situation where I wanted to do a little macaddr arithmetic in postgres. I note that the inet type has support for bitwise AND, OR and NOT, as well as subtraction, but macaddr has none of the above. These operations are easy to perform in C, but relatively a pain

Re: [HACKERS] Why do regression tests now leave "regress_test_role_super" around?

2011-12-11 Thread Robert Haas
On Fri, Dec 9, 2011 at 10:32 PM, Tom Lane wrote: > As of commit fc6d1006bda783cc002c61a5f072905849dbde4b, the regression > tests leave an unused role sitting around, because that commit removed >        DROP ROLE regress_test_role_super; > from foreign_data.sql.  Was that intentional? No. -- Ro

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2011-12-11 Thread Noah Misch
On Thu, Nov 17, 2011 at 12:08:32AM -0500, Tom Lane wrote: > The least we could do is invent some non-spec syntax that makes the > intention clear, rather than having the system assume that an error case > was intended to mean something else. Maybe > > pids INTEGER[] ARRAY REFERENCES pt, +1

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2011-12-11 Thread Noah Misch
On Sat, Dec 10, 2011 at 09:47:53AM +0100, Gabriele Bartolini wrote: > Il 20/11/11 14:05, Noah Misch ha scritto: >> What about making ON UPDATE CASCADE an error? That way, we can say that >> ARRAY >> always applies to array elements, and plain always >> applies to >> entire rows. >> >> SET DEF

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-11 Thread Torello Querci
2011/12/6 Magnus Hagander : > On Sun, Oct 2, 2011 at 23:32, Tom Lane wrote: >> Noah Misch writes: >>> On Sun, Oct 02, 2011 at 06:55:51AM -0400, Robert Haas wrote: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira wrote: > I see. What about passing this decision to DBA? I m

Re: [HACKERS] patch for type privileges

2011-12-11 Thread Peter Eisentraut
On lör, 2011-12-10 at 16:16 +0100, Yeb Havinga wrote: > * ExecGrant_type() prevents 'grant usage on domain' on a type, but the > converse is possible. > > postgres=# create domain myint as int2; > CREATE DOMAIN > postgres=# grant usage on type myint to public; > GRANT This is the same as how we

Re: [HACKERS] Command Triggers

2011-12-11 Thread Peter Eisentraut
On sön, 2011-12-11 at 04:26 +0100, Andres Freund wrote: > > Building a CreateStmt seems to work well enough so far. > > The only problem with that approach so far that I found is that: > > > CREATE TABLE collate_test2 > > ( >

Re: [HACKERS] Command Triggers

2011-12-11 Thread Dimitri Fontaine
Hi, Andres Freund writes: > Hm. I just noticed a relatively big hole in the patch: The handling of > deletion of dependent objects currently is nonexistant because they don't go > through ProcessUtility... That's the reason why we're talking about “command triggers” rather than “DDL triggers”.

Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-12-11 Thread Yeb Havinga
On 2011-12-06 17:58, Kevin Grittner wrote: Kevin Grittner wrote: Yeb Havinga wrote: I personally tend to believe it doesn't even need to be an error. There is no technical reason not to allow it. All the user needs to do is make sure that the combination of named parameters and the position

Re: [HACKERS] Dry-run mode for pg_archivecleanup

2011-12-11 Thread Magnus Hagander
On Sun, Dec 11, 2011 at 15:52, Gabriele Bartolini wrote: > Hi guys, > >  I have added the '-n' option to pg_archivecleanup which performs a dry-run > and outputs the names of the files to be removed to stdout (making possible > to pass the list via pipe to another process). > >  Please find attach

[HACKERS] Dry-run mode for pg_archivecleanup

2011-12-11 Thread Gabriele Bartolini
Hi guys, I have added the '-n' option to pg_archivecleanup which performs a dry-run and outputs the names of the files to be removed to stdout (making possible to pass the list via pipe to another process). Please find attached the small patch. I submit it to the CommitFest. Thanks, Gabr