Re: [HACKERS] pltcl broken on tcl8.5 ?

2008-06-16 Thread Andrew Dunstan
Devrim GÜNDÜZ wrote: Hi, On Sun, 2008-06-15 at 20:54 -0400, Andrew Dunstan wrote: Has anyone been able to get the tests to pass using Tcl 8.5.1? All regression tests passed on Fedora-9 while building new RPM sets. Do you specifically run the PL regression tests? cheers

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Andrew Sullivan
On Sun, Jun 15, 2008 at 11:53:57PM +0200, Peter Eisentraut wrote: Isn't that what a local DNS caching-only server would accomplish? Only if you looked up the DNS name at auth time :) A -- Andrew Sullivan [EMAIL PROTECTED] +1 503 667 4564 x104 http://www.commandprompt.com/ -- Sent via

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Andrew Sullivan
On Sun, Jun 15, 2008 at 11:56:35PM +0200, Peter Eisentraut wrote: It would probably be a good idea to check how other programs deal with hostname lookups during authentication. Programs like SSH, Apache, and Squid come to mind. There is actually a great deal of controversy about most of

[HACKERS] Permission of prepared statements (was: pg_stat_statements)

2008-06-16 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: We don't have any system-wide names for statements, so this seems pretty ill-defined and of questionable value. Showing the text of statements in a view also has security problems. I found we can execute prepared statements and view the sql source through

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Peter Eisentraut
Am Montag, 16. Juni 2008 schrieb Andrew Sullivan: Since that's possibly about to go to IETF last call, it'd be a good time for someone planning to implement something to look at that document, and report on whether it provides any useful guidance at all.  I'd be keenly interested in hearing

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Peter Eisentraut
Am Donnerstag, 12. Juni 2008 schrieb Dickson S. Guedes: There is a TODO Item to allow pg_hba.conf to specify host names along with IP addresses. I'm a bit curious how useful in practice this would actually be. Obviously, you want to use host names to simplify the management of hosts,

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread Martijn van Oosterhout
On Sun, Jun 15, 2008 at 10:07:43PM -0700, David E. Wheeler wrote: Howdy, Possibly showing my ignorance here, but as I'm working on updating citext to be locale-aware and to work on 8.3, I've run into this peculiarity: The only odd thing I see is the use of PG_ARGS to pass the arguments

[HACKERS] Crash in pgCrypto?

2008-06-16 Thread Mario Weilguni
Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5'); Takes a few seconds, and then crashes the server with a Signal 11. My system is PostgreSQL 8.2.7. Seems to be an unchecked access to memory location

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Marko Kreen
On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5'); Takes a few seconds, and then crashes the server with a Signal 11. My system is PostgreSQL

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Mario Weilguni
Marko Kreen schrieb: On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5'); Takes a few seconds, and then crashes the server with a Signal 11. My

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Marko Kreen
On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Marko Kreen schrieb: On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5');

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Mario Weilguni
Marko Kreen schrieb: On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Marko Kreen schrieb: On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Andrew Dunstan
Marko Kreen wrote: Good question... Seems the proper support for modules will not leave todo-list any time soon. Only way that works now is to add any module .sql to template0, so they would not be dumped out. So you are forced to recreate them properly on newer version. (By adding them

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Peter Eisentraut
Am Montag, 16. Juni 2008 schrieb Mario Weilguni: Is this todo-list something I can find online? Yes, google for postgresql+todo+list. -- 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] Crash in pgCrypto?

2008-06-16 Thread Marko Kreen
On 6/16/08, Mario Weilguni [EMAIL PROTECTED] wrote: Is this todo-list something I can find online? postgresql.org - Developers - TODO list: http://www.postgresql.org/docs/faqs.TODO.html -- marko -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Mario Weilguni
Andrew Dunstan schrieb: Marko Kreen wrote: Good question... Seems the proper support for modules will not leave todo-list any time soon. Only way that works now is to add any module .sql to template0, so they would not be dumped out. So you are forced to recreate them properly on newer

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Alvaro Herrera
Mario Weilguni wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5'); Takes a few seconds, and then crashes the server with a Signal 11. My system is PostgreSQL 8.2.7. Seems to be an unchecked

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 02:52, Martijn van Oosterhout wrote: The only odd thing I see is the use of PG_ARGS to pass the arguments to citextcmp. But I can't see why it would break either. Can you attach a debugger and see where it goes wrong? Yes, I can do that, although I'm pretty new to C (let

Re: [HACKERS] pg_stat_statements

2008-06-16 Thread Robert Treat
On Sunday 15 June 2008 22:31:59 ITAGAKI Takahiro wrote: Robert Treat [EMAIL PROTECTED] wrote: On Friday 13 June 2008 12:58:22 Josh Berkus wrote: I can see how this would be useful, but I can also see that it could be a huge performance burden when activated. So it couldn't be part of

Re: [HACKERS] pg_stat_statements

2008-06-16 Thread Jonah H. Harris
On Mon, Jun 16, 2008 at 10:34 AM, Robert Treat [EMAIL PROTECTED] wrote: Given that PostgreSQL relies on the operating system for a majority of it's instermentation (ie. we have nothing like v$ tables in oracle), we should really be thinking of dtrace as the ultimate tool for DBA's to figure

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Andrew Sullivan
On Mon, Jun 16, 2008 at 11:47:21AM +0200, Peter Eisentraut wrote: I'm a bit curious how useful in practice this would actually be. Obviously, you want to use host names to simplify the management of hosts, currently being done with IP addresses. But how widely useful is it really to

Re: [HACKERS] Core team statement on replication in PostgreSQL

2008-06-16 Thread Kevin Grittner
On Mon, Jun 9, 2008 at 9:48 PM, in message [EMAIL PROTECTED], Greg Smith [EMAIL PROTECTED] wrote: On Mon, 9 Jun 2008, Tom Lane wrote: It should also be pointed out that the whole thing becomes uninteresting if we get real-time log shipping implemented. So I see absolutely no point in

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 09:24, David E. Wheeler wrote: On Jun 16, 2008, at 02:52, Martijn van Oosterhout wrote: The only odd thing I see is the use of PG_ARGS to pass the arguments to citextcmp. But I can't see why it would break either. Can you attach a debugger and see where it goes wrong?

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread Tom Lane
David E. Wheeler [EMAIL PROTECTED] writes: What's even weirder is that it can not work and then suddenly work: Smells like uninitialized-memory problems to me. Perhaps you are miscalculating the length of the input data? Are you testing in an --enable-cassert build? The memory clobber stuff

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 13:06, Tom Lane wrote: David E. Wheeler [EMAIL PROTECTED] writes: What's even weirder is that it can not work and then suddenly work: Smells like uninitialized-memory problems to me. Perhaps you are miscalculating the length of the input data? Entirely possible. Here

Re: [HACKERS] How to Sponsor a Feature

2008-06-16 Thread Robert Treat
On Sunday 15 June 2008 23:01:16 Joshua D. Drake wrote: Andrew Dunstan wrote: Plus an ability to filter the list on those criteria. I'd also like to see a space for companies to state which PostgreSQL major contributors are working for them. That should be of some assistance to sponsors in

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread Martijn van Oosterhout
On Mon, Jun 16, 2008 at 01:29:33PM -0500, David E. Wheeler wrote: Smells like uninitialized-memory problems to me. Perhaps you are miscalculating the length of the input data? Entirely possible. Here are the two functions in which I calculate size: Actually, real dumb question but: arn't

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Robert Treat
On Monday 16 June 2008 09:54:16 Alvaro Herrera wrote: Mario Weilguni wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5'); Takes a few seconds, and then crashes the server with a Signal

Re: [HACKERS] pg_stat_statements

2008-06-16 Thread Josh Berkus
Jonah, It wouldn't be too hard to write the probes in such a way as they could be used by DTrace or by a loadable timing/counter implementation for platforms which don't support DTrace. I was under the impression that's the way our feature, the Generic Monitoring Interface was written. It's

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 13:41, Martijn van Oosterhout wrote: Actually, real dumb question but: arn't you assume that text* values are NULL terminated, because they're not... char * cilower(text * arg) { // Do I need to free anything here? char * str = VARDATA_ANY( arg ); str here is not

[HACKERS] Reducing overhead for repeat de-TOASTing

2008-06-16 Thread Tom Lane
Recent discussions with the PostGIS hackers led me to think about ways to reduce overhead when the same TOAST value is repeatedly detoasted. In the example shown here http://archives.postgresql.org/pgsql-hackers/2008-06/msg00384.php 90% of the runtime is being consumed by repeated detoastings of a

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread Tom Lane
David E. Wheeler [EMAIL PROTECTED] writes: Now I have just one more bizarre error: PostgreSQL thinks that a citext column is not in an aggregate even when it is: try=# select array_accum(name) from srt order by name; ERROR: column srt.name must appear in the GROUP BY clause or be used in

Re: [HACKERS] pltcl broken on tcl8.5 ?

2008-06-16 Thread Andrew Dunstan
Andrew Dunstan wrote: Devrim GÜNDÜZ wrote: Hi, On Sun, 2008-06-15 at 20:54 -0400, Andrew Dunstan wrote: Has anyone been able to get the tests to pass using Tcl 8.5.1? All regression tests passed on Fedora-9 while building new RPM sets. Do you specifically run the PL

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 14:38, Tom Lane wrote: It's complaining about the use in ORDER BY. Okay, so stupid question: How can I get an array of the values in a given order? I guess this works: select array_accum(b) from ( select name from srt order by name ) AS A(b); Thanks, David --

Re: [HACKERS] pltcl broken on tcl8.5 ?

2008-06-16 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Buildfarm bobcat is broken running the pltcl regression tests - see http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=bobcatdt=2008-06-15%2022:43:01 and I have reproduced this on Fedora 9 myself. This distro has Tcl 8.5.1. Hoo, nasty. Tcl_GetVar() is

Re: [HACKERS] pltcl broken on tcl8.5 ?

2008-06-16 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Buildfarm bobcat is broken running the pltcl regression tests - see http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=bobcatdt=2008-06-15%2022:43:01 and I have reproduced this on Fedora 9 myself. This distro has Tcl 8.5.1.

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread David Fetter
On Mon, Jun 16, 2008 at 02:48:42PM -0400, Robert Treat wrote: On Monday 16 June 2008 09:54:16 Alvaro Herrera wrote: Mario Weilguni wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or SELECT digest(null, 'md5');

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David Fetter
On Mon, Jun 16, 2008 at 02:45:57PM -0500, David Wheeler wrote: On Jun 16, 2008, at 14:38, Tom Lane wrote: It's complaining about the use in ORDER BY. Okay, so stupid question: How can I get an array of the values in a given order? I guess this works: select array_accum(b) from ( select

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Alvaro Herrera
David Fetter wrote: I, too, would be happy to do the legwork on this one. I believe we'd want to have both per-db and per-role settings for search_path. What's involved with creating that latter? I'm not sure what's your point here, but you can already use ALTER ROLE foo SET search_path=...

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Andrew Dunstan
David Fetter wrote: On Mon, Jun 16, 2008 at 02:48:42PM -0400, Robert Treat wrote: On Monday 16 June 2008 09:54:16 Alvaro Herrera wrote: Mario Weilguni wrote: Could someone using the pgcrypto extension please verify this? SELECT encode(digest(null, 'md5'::text), 'hex'); or

Re: [HACKERS] pltcl broken on tcl8.5 ?

2008-06-16 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: Hoo, nasty. Tcl_GetVar() is resetting interp-result. According to the manual page that's only supposed to happen if the TCL_LEAVE_ERR_MSG flag is used: TCL_LEAVE_ERR_MSG If an error is returned and this bit is set in flags, then an

Re: [HACKERS] TODO Item: Allow pg_hba.conf to specify host names along with IP addresses

2008-06-16 Thread Stephen Frost
* Andrew Sullivan ([EMAIL PROTECTED]) wrote: On Mon, Jun 16, 2008 at 11:47:21AM +0200, Peter Eisentraut wrote: I'm a bit curious how useful in practice this would actually be. Obviously, you want to use host names to simplify the management of hosts, currently being done with IP

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread David Fetter
On Mon, Jun 16, 2008 at 06:00:33PM -0400, Andrew Dunstan wrote: I, too, would be happy to do the legwork on this one. I believe we'd want to have both per-db and per-role settings for search_path. What's involved with creating that latter? Proper support for module install / uninstall will

Re: [HACKERS] Reducing overhead for repeat de-TOASTing

2008-06-16 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: One unsolved problem is that this scheme doesn't provide any way to cache the result of decompressing an inline-compressed datum, because those have no unique ID that could be used for a lookup key. That's pretty unfortunate. Ideas? Not at the moment,

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Andrew Dunstan
David Fetter wrote: On Mon, Jun 16, 2008 at 06:00:33PM -0400, Andrew Dunstan wrote: I, too, would be happy to do the legwork on this one. I believe we'd want to have both per-db and per-role settings for search_path. What's involved with creating that latter? Proper support for

Re: [HACKERS] Crash in pgCrypto?

2008-06-16 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: David Fetter wrote: Maybe I'm missing something big, but I don't quite see what constitutes proper that doesn't involve the module's having at least one schema to itself. ISTM that uninstall foomodule will be a whole lot nicer. Right. We have all

Re: [HACKERS] Reducing overhead for repeat de-TOASTing

2008-06-16 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: Comments, better ideas? Anyone think this is too much trouble to take for the problem? I definitely think it's worth it, even if it doesn't handle an inline-compressed datum. Yeah. I'm not certain how much

Re: [HACKERS] Question about Encoding a Custom Type

2008-06-16 Thread David E. Wheeler
On Jun 16, 2008, at 16:48, David Fetter wrote: select array_accum(b) from ( select name from srt order by name ) AS A(b); SELECT ARRAY(SELECT name FROM srt ORDER BY name); -- also works. Wow, somehow I'd missed that syntax over the years. Thanks David! Best, David -- Sent via