[HACKERS] Passing an array or record to a stored procedure in PostgreSQL

2011-05-17 Thread Max Bourinov
Hi Highly Respected Hackers! I have a task to pass arrays, records and in some cases array of records as a parameter to the stored procedures in PostgreSQL. I will use JDBC to work with PostgreSQL 9.0 At first I would like to learn how to pass arrays. Any ideas? p.s. Google and http://dba.stacke

Re: [HACKERS] LOCK DATABASE

2011-05-17 Thread Jaime Casanova
On Tue, May 17, 2011 at 10:21 PM, Alvaro Herrera wrote: > > So we would have a new command LOCK DATABASE [FOR SESSION] or something > like that; the pooler software would call that and then kill other > existing application connections (using pg_terminate_backend() perhaps), > then drop the databa

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Devrim GÜNDÜZ
On Tue, 2011-05-17 at 20:37 -0700, Darren Duncan wrote: > > Are the individual projects in contrib/ also distributed separately > from Pg, on their own release schedules, No. > If the only way to get a contrib/ project is bundled with Pg, then the > project developers and users don't get the

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Devrim GÜNDÜZ
On Tue, 2011-05-17 at 13:45 -0700, Joshua D. Drake wrote: > If PGXN moves into .Org infrastructure (which I believe is currently > the plan) then yes, contrib should go away. Well, it is not an enough reason to kick contrib off. I am not aware that PGXN is a community driven project, and not awa

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Darren Duncan
Robert Haas wrote: On Tue, May 17, 2011 at 4:45 PM, Joshua D. Drake wrote: On 05/17/2011 01:31 PM, Darren Duncan wrote: I have missed it if this was discussed before but ... Would now be a good time to start deprecating the contrib/ directory as a way to distribute Pg add-ons, with favor give

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Robert Haas
On Tue, May 17, 2011 at 4:45 PM, Joshua D. Drake wrote: > On 05/17/2011 01:31 PM, Darren Duncan wrote: >> >> I have missed it if this was discussed before but ... >> >> Would now be a good time to start deprecating the contrib/ directory as >> a way to distribute Pg add-ons, with favor given to PG

[HACKERS] LOCK DATABASE

2011-05-17 Thread Alvaro Herrera
One of the things that came out of the clustering session is a need for a LOCK DATABASE command. Primarily to be able to drop databases across nodes in a cluster, but later chats lead to ideas about upgrading databases' schemas and such operations that need to ensure that no one else is accessing

[HACKERS] patch: Allow \dd to show constraint comments

2011-05-17 Thread Josh Kupershmidt
Hi all, Attached is a simple patch addressing the TODO item "Allow \dd to show constraint comments". If you have comments on various constraints (column, foreign key, primary key, unique, exclusion), they should show up via \dd now. Some example SQL is attached to create two tables with a variety

Re: [HACKERS] cache estimates, cache access cost

2011-05-17 Thread Cédric Villemain
2011/5/17 Robert Haas : > On Sun, May 15, 2011 at 11:52 PM, Greg Smith wrote: >> Cédric Villemain wrote: >>> >>> http://git.postgresql.org/gitweb?p=users/c2main/postgres.git;a=shortlog;h=refs/heads/analyze_cache >> >> This rebases easily to make Cedric's changes move to the end; I just pushed >> a

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Dave Page
On Tue, May 17, 2011 at 9:45 PM, Joshua D. Drake wrote: > On 05/17/2011 01:31 PM, Darren Duncan wrote: >> >> I have missed it if this was discussed before but ... >> >> Would now be a good time to start deprecating the contrib/ directory as >> a way to distribute Pg add-ons, with favor given to PG

Re: [HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Joshua D. Drake
On 05/17/2011 01:31 PM, Darren Duncan wrote: I have missed it if this was discussed before but ... Would now be a good time to start deprecating the contrib/ directory as a way to distribute Pg add-ons, with favor given to PGXN and the like instead? If PGXN moves into .Org infrastructure (whic

Re: [HACKERS] adding a new column in IDENTIFY_SYSTEM

2011-05-17 Thread Jaime Casanova
On Mon, May 16, 2011 at 2:35 AM, Magnus Hagander wrote: > On Mon, May 16, 2011 at 01:03, Jaime Casanova wrote: >> On Thu, May 5, 2011 at 10:59 AM, Tom Lane wrote: >>> Magnus Hagander writes: > So even if people don't believe in the rationale behind the patch, > would allowing it harm an

[HACKERS] deprecating contrib for PGXN

2011-05-17 Thread Darren Duncan
I have missed it if this was discussed before but ... Would now be a good time to start deprecating the contrib/ directory as a way to distribute Pg add-ons, with favor given to PGXN and the like instead? It would make sense to leave contrib/ alone for 9.1, but I believe that it should start

Re: [HACKERS] DOMAINs and CASTs

2011-05-17 Thread Robert Haas
On Tue, May 17, 2011 at 12:29 AM, Jaime Casanova wrote: > On Sun, May 15, 2011 at 9:14 PM, Robert Haas wrote: >> >> we should probably try to agree on which >> of the various options you mention makes most sense. > > well... my original patch only handle the simplest case, namely, try > to make t

Re: [HACKERS] cache estimates, cache access cost

2011-05-17 Thread Robert Haas
On Sun, May 15, 2011 at 11:52 PM, Greg Smith wrote: > Cédric Villemain wrote: >> >> http://git.postgresql.org/gitweb?p=users/c2main/postgres.git;a=shortlog;h=refs/heads/analyze_cache > > This rebases easily to make Cedric's changes move to the end; I just pushed > a version with that change to > h

Re: [HACKERS] DOMAINs and CASTs

2011-05-17 Thread Jaime Casanova
On Tue, May 17, 2011 at 12:19 PM, Robert Haas wrote: > > The more controversial question is what to do if someone tries to > create such a cast anyway.  We could just ignore that as we do now, or > we could throw a NOTICE, WARNING, or ERROR. IMHO, not being an error per se but an implementation l

[HACKERS] 9.1 support for hashing arrays

2011-05-17 Thread Dean Rasheed
The algorithm for this was discussed in the original thread (http://archives.postgresql.org/pgsql-hackers/2010-10/msg02050.php) but I don't that think a satisfactory conclusion was really reached. In particular, it is way too easy to come up with pathological cases that defeat the hashing algorithm

Re: [HACKERS] Review: psql include file using relative path

2011-05-17 Thread Robert Haas
On Sat, May 14, 2011 at 5:03 PM, Josh Kupershmidt wrote: > I had a chance to give this patch a look. This review is of the second > patch posted by Gurjeet, at: > http://archives.postgresql.org/message-id/AANLkTi=yjb_a+ggt_pxmrqhbhyid6aswwb8h-lw-k...@mail.gmail.com Cool. I see you (or someone) h

Re: [HACKERS] use less space in xl_xact_commit patch

2011-05-17 Thread Robert Haas
On Mon, May 16, 2011 at 11:20 AM, Leonardo Francalanci wrote: > > following the conversation at > > http://postgresql.1045698.n5.nabble.com/switch-UNLOGGED-to-LOGGED-tp4290461p4382333.html > > > I tried to remove some bytes from xl_xact_commit. > > The way I did it needs palloc+memcpy. I guess it

Re: [HACKERS] Extension Packaging

2011-05-17 Thread David E. Wheeler
On May 17, 2011, at 9:44 AM, Peter van Hardenberg wrote: > My apologies for wading in out of the blue here as a first time poster with > big demands, but allow me to briefly state my hopes without trying to be too > proscriptive about particular mechanisms. You are not alone, I assure you. :-)

Re: [HACKERS] Extension Packaging

2011-05-17 Thread Peter van Hardenberg
My apologies for wading in out of the blue here as a first time poster with big demands, but allow me to briefly state my hopes without trying to be too proscriptive about particular mechanisms. My hope here is that the extension model should eventually enable me to offer the ability for non-super

Re: [HACKERS] Support for cert auth in JDBC

2011-05-17 Thread Tom Lane
Stephen Frost writes: > Marc-André, > * Marc-André Laverdière (marc-an...@atc.tcs.com) wrote: >> Would you please tell me how you'd prefer for me to proceed to do that? >> Do I need write access to your CVS repo, or should I just send the code >> and test case by email? > Ideally, you would submi

Re: [HACKERS] Support for cert auth in JDBC

2011-05-17 Thread Stephen Frost
Marc-André, * Marc-André Laverdière (marc-an...@atc.tcs.com) wrote: > Would you please tell me how you'd prefer for me to proceed to do that? > Do I need write access to your CVS repo, or should I just send the code > and test case by email? Ideally, you would submit the patch, as a context diff,

Re: [HACKERS] Support for cert auth in JDBC

2011-05-17 Thread Dave Cramer
Marc, Please just send a cvs context diff from HEAD to the JDBC list. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca 2011/5/17 Marc-André Laverdière : > Hello developers, > > My project had a requirement to use certificate authentication to the PG > server. Our applicatio

[HACKERS] Support for cert auth in JDBC

2011-05-17 Thread Marc-André Laverdière
Hello developers, My project had a requirement to use certificate authentication to the PG server. Our application uses Hibernate. We did just that and my boss has OKed a source release. Now, the current version of the code has dependencies on our internal libraries, so I'll need to spend a bit