Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Pavan Deolasee
On Fri, Apr 4, 2008 at 11:10 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > The > policy of this project is that we only put nontrivial bug fixes into > back branches, and I don't think this item qualifies ... > Got it. I will submit a patch for HEAD. Thanks, Pavan -- Pavan Deolasee EnterpriseD

Re: [HACKERS] best way for export gram.y symbols

2008-04-03 Thread Pavel Stehule
On 03/04/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: > >> What exactly are you trying to accomplish? > > > when I build CASE expression, I have to merge some PLpgSQL_expr > > together. Then I have to reparse expr->query and I have to find params > > a

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Tom Lane
"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > On Thu, Apr 3, 2008 at 10:39 PM, Tom Lane <[EMAIL PROTECTED]> wrote: >> I didn't think it merited back-patching. It's strictly cosmetic in >> terms of being about what VACUUM VERBOSE prints, no? > Umm.. Whatever we decide on the fix, I think we shoul

Re: [HACKERS] modules

2008-04-03 Thread Jeremy Drake
On Thu, 3 Apr 2008, Peter Eisentraut wrote: > Am Donnerstag, 3. April 2008 schrieb Andrew Dunstan: > > If this were at all true we would not not have seen the complaints from > > people along the lines of "My ISP won't install contrib". But we have, > > and quite a number of times. We have concret

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Pavan Deolasee
On Thu, Apr 3, 2008 at 10:39 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Pavan Deolasee" <[EMAIL PROTECTED]> writes: > > > Thanks. I had another concern about VACUUM not reporting DEAD line > > pointers (please see up thread). Any comments on that ? > > If you want to work on that, go ahead Ok. I

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Tom Lane
Sam Mason <[EMAIL PROTECTED]> writes: > On Thu, Apr 03, 2008 at 03:57:38PM -0400, Tom Lane wrote: >> I liked the idea of allowing COPY FROM to act as a table source in a >> larger SELECT or INSERT...SELECT. Not at all sure what would be >> involved to implement that, but it seems a lot more flexib

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Sam Mason
On Thu, Apr 03, 2008 at 03:57:38PM -0400, Tom Lane wrote: > Gregory Stark <[EMAIL PROTECTED]> writes: > > AFAIK the state of the art is actually to load the data into a table which > > closely matches the source material, sometimes just columns of text. Then > > copy > > it all to another table do

Re: [HACKERS] About numeric division again

2008-04-03 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "Tom Lane" <[EMAIL PROTECTED]> writes: >> The code that's currently in there sometimes has to propagate rounding >> to the left, meaning that you can never be certain whether all of the >> digits you have so far are good, and that means that it can someti

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Sam Mason
On Thu, Apr 03, 2008 at 04:42:47PM -0700, Ron Mayer wrote: > Sam Mason wrote: > >On Thu, Apr 03, 2008 at 07:07:56PM +0200, Svenne Krap wrote: > >> > >>ID serial > >>Username varchar > >>Password_md5 varchar > >>Password_sha1 varchar > >... > >Why not just use SHA-512, you get many more quality bit

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Sam Mason
On Fri, Apr 04, 2008 at 12:06:03AM +0200, Svenne Krap wrote: > Sam Mason wrote: > >Are you a cryptanalyst and are you sure that this doesn't actually make > >things worse? I'm sure it gives you a warm fuzzy feeling that it's > >*got* to be better, but unless someone has done some hard maths I'm no

Re: [HACKERS] About numeric division again

2008-04-03 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > One of the items on the commit-fest list is my patch from last year > to rewrite the numeric division operator using "schoolbook division": > http://archives.postgresql.org/pgsql-patches/2007-06/msg00173.php > > The code that's currently in there sometimes

Re: [HACKERS] [PATCHES] psql slash# command

2008-04-03 Thread Sibte Abbas
On Sun, Mar 30, 2008 at 3:09 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > > I looked this over and realized that it has little to do with the > functionality that was so painfully hashed out in the original > discussion thread here: > > http://archives.postgresql.org/pgsql-hackers/2006-12/msg00207.ph

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Ron Mayer
Sam Mason wrote: On Thu, Apr 03, 2008 at 07:07:56PM +0200, Svenne Krap wrote: ID serial Username varchar Password_md5 varchar Password_sha1 varchar ... Why not just use SHA-512, you get many more quality bits that way. Or if he just wanted to use builtin tools and reduce accidental collision

Re: [HACKERS] modules

2008-04-03 Thread Ron Mayer
Joshua D. Drake wrote: On Thu, 3 Apr 2008 13:54:11 - "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: Right now contrib is a real catch-all of various things; it would be nice to categorize them somehow. And by categorize, I emphatically do NOT mean move to pgfoundry, which is pretty much a

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> Huh? The proposed syntax was >> >> \x query... >> >> What do you do when you'd like the query to extend over multiple lines? >> Backslash commands can't cross lines. > Save the fact that the current query is extended, until que

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Alvaro Herrera
Tom Lane escribió: > Huh? The proposed syntax was > > \x query... > > What do you do when you'd like the query to extend over multiple lines? > Backslash commands can't cross lines. Save the fact that the current query is extended, until query end? I haven't actually looked at what the

Re: [HACKERS] Small TRUNCATE glitch

2008-04-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Just noticed that TRUNCATE fails to clear the stats collector's counts >> for the table. I am not sure if it should reset the event counts or >> not (any thoughts?) but surely it is wrong to not zero the live/dead >> tuple counts. >

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> A bigger problem is that it doesn't play nicely at all with multi-line >> queries. > Hmm, why wouldn't it? I assume it would only be recognized if the query > buffer is empty. Huh? The proposed syntax was \x query...

Re: [HACKERS] Small TRUNCATE glitch

2008-04-03 Thread Alvaro Herrera
Tom Lane wrote: > Just noticed that TRUNCATE fails to clear the stats collector's counts > for the table. I am not sure if it should reset the event counts or > not (any thoughts?) but surely it is wrong to not zero the live/dead > tuple counts. Agreed, the live/dead counters should be reset. Re

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > I think Martijn is proposing using it as some sort of prefix which would > > take effect only on the current query. > > A bigger problem is that it doesn't play nicely at all with multi-line > queries. Hmm, why wouldn't it? I a

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Svenne Krap
Sam Mason wrote: Are you a cryptanalyst and are you sure that this doesn't actually make things worse? I'm sure it gives you a warm fuzzy feeling that it's *got* to be better, but unless someone has done some hard maths I'm not sure how you can be so sure. No sadly I am no cryptoanalyst. Wh

Re: [HACKERS] Row estimation for "var <> const" and for "NOT (...)" queries

2008-04-03 Thread Tom Lane
"Nikolay Samokhvalov" <[EMAIL PROTECTED]> writes: > I have a table "table1" with ~100k rows, the table having "flag1" > column. The value of "flag1" is NULL in 85k+ rows, and it's TRUE in > 7k+ rows, and FALSE in 6k rows. Yeah, you're going to have some problems with so many NULLs, I'm sure. > --

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Andrew Dunstan
Tom Lane wrote: Gregory Stark <[EMAIL PROTECTED]> writes: AFAIK the state of the art is actually to load the data into a table which closely matches the source material, sometimes just columns of text. Then copy it all to another table doing transformations. Not impressed. I liked th

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Svenne Krap
Heikki Linnakangas wrote: Mark Mielke wrote: One must also remember that if you use two hashes, if *either* one of them is broken in the future so that you can reconstruct the password from the hash, you're screwed. That is quite a good argument actually :) -- Sent via pgsql-hackers mailing l

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Bruce Momjian escribió: >> Martijn van Oosterhout wrote: >>> I was thinking that maybe \x should have a one-shot mode, i.e. >>> \x >>> does it only for this one statement. It would solve the OPs problem. >> >> But break for others who want all output \

Re: [HACKERS] best way for export gram.y symbols

2008-04-03 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: >> What exactly are you trying to accomplish? > when I build CASE expression, I have to merge some PLpgSQL_expr > together. Then I have to reparse expr->query and I have to find params > and actualize it. There has to be a better way than that. What CA

[HACKERS] Row estimation for "var <> const" and for "NOT (...)" queries

2008-04-03 Thread Nikolay Samokhvalov
Hi, I have a table "table1" with ~100k rows, the table having "flag1" column. The value of "flag1" is NULL in 85k+ rows, and it's TRUE in 7k+ rows, and FALSE in 6k rows. I use EXPLAIN to get apprx. number of rows for simple SELECT queries. But in case of "...WHERE NOT flag1" the optimizer is compl

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Heikki Linnakangas
Mark Mielke wrote: In any case, this is all irrelevant, because md5 passwords are still very useful, and the argument that "more = better" is a never ending infinite resource trap. More is not better. Better is better. If you can prove md5 is insufficient for PostgreSQL passwords, the correct d

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Alvaro Herrera
Bruce Momjian escribió: > Martijn van Oosterhout wrote: > > I was thinking that maybe \x should have a one-shot mode, i.e. > > > > \x > > > > does it only for this one statement. It would solve the OPs problem. > > But break for others who want all output \x. I think Martijn is proposing usin

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Merlin Moncure
On Thu, Apr 3, 2008 at 4:08 PM, David Fetter <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 03, 2008 at 03:43:50PM -0400, Merlin Moncure wrote: > > On Thu, Apr 3, 2008 at 2:43 PM, David Fetter <[EMAIL PROTECTED]> wrote: > > > On Thu, Apr 03, 2008 at 01:06:26PM -0400, Bruce Momjian wrote: > > > > >

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Mark Mielke
Svenne Krap wrote: I would still prefer two hash functions as they do add a better safeguard towards collisions (the gentoo distribtion actually hashes the files by three different algorithms SHA1, SHA256 and RMD160) - i would be inclined to use three hashes too, if they were instantly availa

Re: [HACKERS] best way for export gram.y symbols

2008-04-03 Thread Pavel Stehule
> > > No, you don't. Whatever you think you need those for, there's probably > a better way to do it. We got out of the business of letting anything > but scan.c and gram.c depend on Bison symbol numbers years ago, and > I don't much want to re-introduce that dependency. > > What exactly are

[HACKERS] Re: Separate psql commands from arguments (was: psql command aliases support)

2008-04-03 Thread Bernd Helmle
--On Freitag, April 04, 2008 06:52:37 +1100 Brendan Jurd <[EMAIL PROTECTED]> wrote: I didn't realise it would be that straightforward! Stumbled across it during hacking... You could probably also do away with psql_scan_slash_pushback() (psqlcan.h, psqlcan.l) as it is only used by the code

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread David Fetter
On Thu, Apr 03, 2008 at 03:43:50PM -0400, Merlin Moncure wrote: > On Thu, Apr 3, 2008 at 2:43 PM, David Fetter <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 03, 2008 at 01:06:26PM -0400, Bruce Momjian wrote: > > > > Some sort of "\x auto"? Sounds interesting ... > > > > > > Yep. > > > > Having \d

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > AFAIK the state of the art is actually to load the data into a table which > closely matches the source material, sometimes just columns of text. Then copy > it all to another table doing transformations. Not impressed. I liked the idea of allowing COPY

Re: [HACKERS] Separate psql commands from arguments (was: psql command aliases support)

2008-04-03 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Apr 4, 2008 at 6:35 AM, Bernd Helmle wrote: > Here's a quick and dirty patch which removes the responsible code from psql > (maybe not enough, but short testing shows it's working). Sorry for the > unified diff > I didn't realise it woul

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Merlin Moncure
On Thu, Apr 3, 2008 at 2:43 PM, David Fetter <[EMAIL PROTECTED]> wrote: > On Thu, Apr 03, 2008 at 01:06:26PM -0400, Bruce Momjian wrote: > > > Some sort of "\x auto"? Sounds interesting ... > > > > Yep. > > Having \df+ go to \x automatically sounds like a really great idea :) you can get pret

[HACKERS] Re: Separate psql commands from arguments (was: psql command aliases support)

2008-04-03 Thread Bernd Helmle
--On Freitag, April 04, 2008 05:04:04 +1100 Brendan Jurd <[EMAIL PROTECTED]> wrote: For everyone else who hasn't read the original discussion on -patches, here's a link into the archives: On Fri, Apr 4, 2008 at 4:19 AM, To

Re: [HACKERS] Locale, Collation, ICU patch

2008-04-03 Thread Andrew Dunstan
Tom Lane wrote: The other issue that'd have to be resolved is the problem of system log output. I think we'd wish that log messages are written in a uniform encoding (CSV output in particular is going to have a hard time otherwise) but what do you do when you need to report something that incl

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 12:03:43 -0700 Darcy Buskermolen <[EMAIL PROTECTED]> wrote: > > This would install all the modules but not enable them in the > > database itself (of course). This could also be extended to the pls > > so that we have exactly one me

Re: [HACKERS] modules

2008-04-03 Thread Darcy Buskermolen
On Thursday 03 April 2008 08:47:12 Joshua D. Drake wrote: > On Thu, 3 Apr 2008 21:03:05 +0530 > > "Tom Dunstan" <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 3, 2008 at 8:25 PM, Andrew Dunstan <[EMAIL PROTECTED]> > > > > wrote: > > > If this were at all true we would not not have seen the complaints

Re: [HACKERS] Locale, Collation, ICU patch

2008-04-03 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > The big gotcha is what collation to use when comparing with data in the system > tables, especially the shared system tables. I think we do need to define a > database-wide encoding and collation to use for system tables. You mean cluster-wide? If we ca

Re: [HACKERS] best way for export gram.y symbols

2008-04-03 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I would to use main scanner from plpgsql. I need some values from > parser/parse.h > #define SELECT 543 > #define PARAM 642 No, you don't. Whatever you think you need those for, there's probably a better way to do it. We got out of the business of

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread David Fetter
On Thu, Apr 03, 2008 at 01:06:26PM -0400, Bruce Momjian wrote: > Alvaro Herrera wrote: > > Bruce Momjian escribi?: > > > > > It seems more helpful if there were \x option to use extended format > > > only when the output is too wide. TODO already has: > > > > > > o Add auto-expanded mode

[HACKERS] About numeric division again

2008-04-03 Thread Tom Lane
One of the items on the commit-fest list is my patch from last year to rewrite the numeric division operator using "schoolbook division": http://archives.postgresql.org/pgsql-patches/2007-06/msg00173.php The code that's currently in there sometimes has to propagate rounding to the left, meaning th

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Sam Mason
On Thu, Apr 03, 2008 at 07:07:56PM +0200, Svenne Krap wrote: > I currently save only md5(id || username || 'password')* into password, > if I had access to sha1 (for example) i would add another password > column so, having for example > > ID serial > Username varchar > Password_md5 varchar > P

[HACKERS] Separate psql commands from arguments (was: psql command aliases support)

2008-04-03 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Moving to -hackers ... -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: http://getfiregpg.org iD8DBQFH9RwN5YBsbHkuyV0RAr9ZAKD+XwNYYw3ugsTvowvKImOlKMZzPQCfTHkQ u9jLkEIAWI/0MbNzzxBt0ok= =So1n -END PGP SIGNATURE- On Fri,

[HACKERS] Locale, Collation, ICU patch

2008-04-03 Thread Gregory Stark
Regarding the ICU patch in the commitfest here's my plan. IMHO the idea of making ICU a hard dependency which Postgres will have to use forevermore on all systems is a non-starter. I'm not entirely against having ICU as a supported collation system which packagers on systems where the system loc

Re: [HACKERS] modules

2008-04-03 Thread Aidan Van Dyk
* Tom Dunstan <[EMAIL PROTECTED]> [080403 13:30]: > As a side note, how were you intending to rename contrib? Directory > shenanigans in CVS are horrible, particularly if you want all your > old branches to still work. Well, please, anybody doing this, just simply copy and use cvs remove and cvs

Re: [HACKERS] modules

2008-04-03 Thread Andrew Dunstan
D'Arcy J.M. Cain wrote: On Thu, 03 Apr 2008 13:06:25 -0400 Andrew Dunstan <[EMAIL PROTECTED]> wrote: D'Arcy J.M. Cain wrote: In fact, this may be the way to deprecate contrib. Start building modules and move the contrib packages to it one at a time. That way people using contrib hav

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Svenne Krap
Mark Mielke wrote: Svenne Krap wrote: Mark Mielke wrote: Svenne Krap wrote: More two or even three different hashes with different collion-points will strongly increase the security. No it doesn't unless you are thinking about a security through obscurity argument Your logic is invalid - the

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 13:27:03 -0400 "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > Well, OK, but given that this is a huge public project with lots of > users expecting things to be in certain places, how fast do you think > we could make such a chang

[HACKERS] best way for export gram.y symbols

2008-04-03 Thread Pavel Stehule
Hello I would to use main scanner from plpgsql. I need some values from parser/parse.h #define SELECT 543 #define PARAM 642 and YYSTYPE any ideas how to do it? I would not copy it by hand. Regards Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make c

Re: [HACKERS] modules

2008-04-03 Thread Tom Dunstan
On Thu, Apr 3, 2008 at 10:36 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > No. I don't want to deprecate it, I want to get rid of it, lock, stock and > barrel. If you think that we need more than renaming then we can discuss it, > but I don't want a long death, I want one that is certain and swi

Re: [HACKERS] modules

2008-04-03 Thread D'Arcy J.M. Cain
On Thu, 03 Apr 2008 13:06:25 -0400 Andrew Dunstan <[EMAIL PROTECTED]> wrote: > D'Arcy J.M. Cain wrote: > > In fact, this may be the way to deprecate contrib. Start building > > modules and move the contrib packages to it one at a time. That way > > people using contrib have some time to switch an

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Dimitri Fontaine <[EMAIL PROTECTED]> writes: >> Here's a proposal for COPY to support the T part of an ETL, that is adding >> the >> capability for COPY FROM to Transform the data it gets. > >> The idea is quite simple: adding to COPY FROM the option to r

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Andrew Dunstan
Svenne Krap wrote: If I have a simple table now ID serial Username varchar Password varchar I currently save only md5(id || username || 'password')* into password, if I had access to sha1 (for example) i would add another password column so, having for example ID serial Username varchar

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Tom Lane
"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > Thanks. I had another concern about VACUUM not reporting DEAD line > pointers (please see up thread). Any comments on that ? If you want to work on that, go ahead, but I wanted it separate because I didn't think it merited back-patching. It's strictl

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Svenne Krap
Mark Mielke wrote: More two or even three different hashes with different collion-points will strongly increase the security. No it doesn't unless you are thinking about a security through obscurity argument. It is really the same argument on all your questions If I have a simple table now

Re: [HACKERS] Small TRUNCATE glitch

2008-04-03 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Thu, Apr 03, 2008 at 11:58:11AM -0400, Tom Lane wrote: >> Just noticed that TRUNCATE fails to clear the stats collector's counts >> for the table. I am not sure if it should reset the event counts or >> not (any thoughts?) but surely it is wr

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Bruce Momjian
Martijn van Oosterhout wrote: -- Start of PGP signed section. > On Thu, Apr 03, 2008 at 12:07:54PM -0400, Bruce Momjian wrote: > > > Alternating between formats using "\x" is, at least for me, a bit > > > cumbersome: usually _after_ I wrote a query I realize "it would > > > look more readable in ex

Re: [HACKERS] modules

2008-04-03 Thread Andrew Dunstan
D'Arcy J.M. Cain wrote: In fact, this may be the way to deprecate contrib. Start building modules and move the contrib packages to it one at a time. That way people using contrib have some time to switch and we can point people to modules if they are just starting out. Is there support for

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian escribi?: > > > It seems more helpful if there were \x option to use extended format > > only when the output is too wide. TODO already has: > > > > o Add auto-expanded mode so expanded output is used if the row > > length is wider than the

Re: [HACKERS] Small TRUNCATE glitch

2008-04-03 Thread Martijn van Oosterhout
On Thu, Apr 03, 2008 at 11:58:11AM -0400, Tom Lane wrote: > Just noticed that TRUNCATE fails to clear the stats collector's counts > for the table. I am not sure if it should reset the event counts or > not (any thoughts?) but surely it is wrong to not zero the live/dead > tuple counts. Wern't th

Re: [HACKERS] modules

2008-04-03 Thread D'Arcy J.M. Cain
On Thu, 03 Apr 2008 09:31:01 -0700 Ron Mayer <[EMAIL PROTECTED]> wrote: > D'Arcy J.M. Cain wrote: > > Check out NetBSD pkgsrc as a model. It is very flexible. One nice > > thing would be the ability to specify where the packages are rather > > than always insisting that they be on pgfoundry. > >

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 12:46:30 -0400 "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Thu, 3 Apr 2008 09:41:57 -0700 > "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 3 Apr 2008 12:35:

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Sam Mason
On Thu, Apr 03, 2008 at 06:14:17PM +0200, Svenne Krap wrote: > Hashes are an absolute minimum for keeping passwords stored somehat > safely in a database. > More two or even three different hashes with different collion-points > will strongly increase the security. Not only that, but they also

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Pavan Deolasee
On Thu, Apr 3, 2008 at 10:02 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > > I've applied a modified/extended form of this patch for 8.3.2. > Thanks. I had another concern about VACUUM not reporting DEAD line pointers (please see up thread). Any comments on that ? Thanks, Pavan -- Pavan Deolasee

Re: [HACKERS] modules

2008-04-03 Thread Steve Atkins
On Apr 3, 2008, at 7:01 AM, Aidan Van Dyk wrote: * Greg Sabino Mullane <[EMAIL PROTECTED]> [080403 09:54]: Right now contrib is a real catch-all of various things; it would be nice to categorize them somehow. And by categorize, I emphatically do NOT mean move to pgfoundry, which is pretty

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Martijn van Oosterhout
On Thu, Apr 03, 2008 at 12:07:54PM -0400, Bruce Momjian wrote: > > Alternating between formats using "\x" is, at least for me, a bit > > cumbersome: usually _after_ I wrote a query I realize "it would > > look more readable in expanded format", which is a bit too late. > > So I run the query, ctrl+

Re: [HACKERS] modules

2008-04-03 Thread D'Arcy J.M. Cain
On Thu, 3 Apr 2008 09:41:57 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Thu, 3 Apr 2008 12:35:31 -0400 > "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > > > On Thu, 3 Apr 2008 13:54:11 - > > "Greg Sabino Mullane" <[EMAIL PROTECT

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Alvaro Herrera
Bruce Momjian escribió: > It seems more helpful if there were \x option to use extended format > only when the output is too wide. TODO already has: > > o Add auto-expanded mode so expanded output is used if the row > length is wider than the screen width. > > Consid

Re: [HACKERS] modules

2008-04-03 Thread Magnus Hagander
Andrew Dunstan wrote: > > > Ron Mayer wrote: > > Andrew Dunstan wrote: > >> Tom Lane wrote: > >>> as having better system support for packages or modules or > >>> whatever you want to call them; and maybe we also need some > >>> marketing-type > >> > >> ...re-raise the question of getting rid

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 12:35:31 -0400 "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Thu, 3 Apr 2008 13:54:11 - > "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > > Right now contrib is a real catch-all of various things; it would > > be nice t

Re: [HACKERS] modules

2008-04-03 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/04/2008, Joshua D. Drake wrote: > "Tom Dunstan" wrote: > > > > One answer is: what do you do if some required library isn't > > available? > > > If we build by default, then when a library isn't found the configure > output tells you: > >

Re: [HACKERS] modules

2008-04-03 Thread D'Arcy J.M. Cain
On Thu, 3 Apr 2008 13:54:11 - "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > Right now contrib is a real catch-all of various things; it would be nice to > categorize them somehow. And by categorize, I emphatically do NOT mean > move to pgfoundry, which is pretty much a kiss of death. Yes

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Tom Lane
"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > Please see the attached patch. One change I made is to hold the SHARE lock > on the page while ANALYZE is reading tuples from it. I thought it would > be a right thing to do instead of repeatedly acquiring/releasing the lock. I've applied a modified/e

Re: [HACKERS] modules

2008-04-03 Thread Ron Mayer
D'Arcy J.M. Cain wrote: Check out NetBSD pkgsrc as a model. It is very flexible. One nice thing would be the ability to specify where the packages are rather than always insisting that they be on pgfoundry. Yup - a feature shared by RubyGems: gem install rails –source http://gems.rubyonrai

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Mark Mielke
Svenne Krap wrote: Mark Mielke wrote: This presumes that better hashes truly exist. It is basic math to show that all hashes will include collisions. Ignoring the possibility that one hash has theoretical better distribution for real documents, the real "benefit" of SHA-1 over MD5, is that it

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Svenne Krap
Mark Mielke wrote: This presumes that better hashes truly exist. It is basic math to show that all hashes will include collisions. Ignoring the possibility that one hash has theoretical better distribution for real documents, the real "benefit" of SHA-1 over MD5, is that it has more bits. The

Re: [HACKERS] modules

2008-04-03 Thread Ron Mayer
Aidan Van Dyk wrote: * Greg Sabino Mullane <[EMAIL PROTECTED]> [080403 09:54]: I emphatically do NOT mean move to pgfoundry, which is pretty much a kiss of death. But that begs the question of *why* it's a kiss of death? For instance, in "perl land", having something in "CPAN" and not in "p

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 21:45:52 +0530 "Tom Dunstan" <[EMAIL PROTECTED]> wrote: > > This would install all the modules but not enable them in the > > database itself (of course). This could also be extended to the pls > > so that we have exactly one mecha

Re: [HACKERS] modules

2008-04-03 Thread Tom Dunstan
On Thu, Apr 3, 2008 at 9:17 PM, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > > It's hard to see ISPs who won't install contrib from installing > > ${random module} from the big bad internet as has been discussed in > > this thread, but who knows? > > Sure it is. The very word contrib brings abo

Re: [HACKERS] [GENERAL] ANALYZE getting dead tuple count hopelessly wrong

2008-04-03 Thread Pavan Deolasee
On Thu, Apr 3, 2008 at 4:34 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > > The right way seems to be to treat our own insertions as live during > ANALYZE, but then subtract off our own pending insertions from the > live-tuples count sent to the stats collector. pgstat_report_analyze() > can hand

Re: [HACKERS] printTable API (was: Show INHERIT in \du)

2008-04-03 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 31/03/2008, Tom Lane wrote: > "Brendan Jurd" writes: > > 1. describe malloc's the cells to zero, but print just does a local > > calloc without any initialisation. > > There isn't any functional difference there. I am not sure, but I think >

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Bruce Momjian
Dawid Kuroczko wrote: > On Thu, Apr 3, 2008 at 4:35 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > > "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > > > The idea of \G command is to perform the query, but with printing > > > query results using extended table output format. > > > > Seems a bit useless

Re: [HACKERS] modules

2008-04-03 Thread Peter Eisentraut
Am Donnerstag, 3. April 2008 schrieb Andrew Dunstan: > If this were at all true we would not not have seen the complaints from > people along the lines of "My ISP won't install contrib". But we have, > and quite a number of times. We have concrete evidence that calling it > contrib actually works a

[HACKERS] Small TRUNCATE glitch

2008-04-03 Thread Tom Lane
Just noticed that TRUNCATE fails to clear the stats collector's counts for the table. I am not sure if it should reset the event counts or not (any thoughts?) but surely it is wrong to not zero the live/dead tuple counts. regards, tom lane -- Sent via pgsql-hackers maili

Re: [HACKERS] Patch queue -> wiki (was varadic patch)

2008-04-03 Thread Bruce Momjian
Dave Page wrote: > On Thu, Apr 3, 2008 at 12:35 AM, Bruce Momjian <[EMAIL PROTECTED]> wrote: > > It is not clear to me how a wiki can be easily created for 2k emails and > > then maintained in a reasonable way, or how emails can be added to it > > easily. > > That seems like a *really* odd thin

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Dimitri Fontaine
Le jeudi 03 avril 2008, Tom Lane a écrit : > The major concern I have about this is to ensure that no detectable > overhead is added to COPY when the feature isn't being used. Well, when COLUMN x CONVERT USING or whatever syntax we choose is not used, we default to current code path, that is we d

Re: [HACKERS] modules

2008-04-03 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 3 Apr 2008 21:03:05 +0530 "Tom Dunstan" <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 8:25 PM, Andrew Dunstan <[EMAIL PROTECTED]> > wrote: > > > If this were at all true we would not not have seen the complaints > > from people along t

Re: [HACKERS] modules

2008-04-03 Thread Tom Dunstan
On Thu, Apr 3, 2008 at 8:25 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > If this were at all true we would not not have seen the complaints from > people along the lines of "My ISP won't install contrib". But we have, and > quite a number of times. We have concrete evidence that calling it con

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-04-03 Thread Mark Mielke
Greg Sabino Mullane wrote: 4) We're also encouraging the use of md5() by making it the only option. Yes, we can talk about why people *shouldn't* use it for this purpose or that, but they will. There is always the Java route - internal classes have package-scope constructors to specifically

Re: [HACKERS] COPY Transform support

2008-04-03 Thread PFC
INSERT INTO mytable (id, date, ...) SELECT id, NULLIF( date, '-00-00' ), ... FROM mydump WHERE (FKs check and drop the borken records); What do we gain against current way of doing it, which is: COPY loadtable FROM 'dump.txt' WITH ... INSERT INTO destination_table(...) SELECT .

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Csaba Nagy
On Thu, 2008-04-03 at 16:44 +0200, PFC wrote: > CREATE FLATFILE READER mydump ( > id INTEGER, > dateTEXT, > ... > ) FROM file 'dump.txt' > (followed by delimiter specification syntax identical to COPY, etc) > ; Very cool idea, but why would you need to create a reader ob

Re: [HACKERS] COPY Transform support

2008-04-03 Thread PFC
On Thu, 03 Apr 2008 16:57:53 +0200, Csaba Nagy <[EMAIL PROTECTED]> wrote: On Thu, 2008-04-03 at 16:44 +0200, PFC wrote: CREATE FLATFILE READER mydump ( id INTEGER, dateTEXT, ... ) FROM file 'dump.txt' (followed by delimiter specification syntax identical to COPY

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Dimitri Fontaine
Le jeudi 03 avril 2008, PFC a écrit : > CREATE FLATFILE READER mydump ( > id  INTEGER, > dateTEXT, > ... > ) FROM file 'dump.txt' > (followed by delimiter specification syntax identical to COPY, etc) > ; [...] > INSERT INTO mytable (id, date, ...) SELECT id,

Re: [HACKERS] COPY Transform support

2008-04-03 Thread Tom Lane
Dimitri Fontaine <[EMAIL PROTECTED]> writes: > Here's a proposal for COPY to support the T part of an ETL, that is adding > the > capability for COPY FROM to Transform the data it gets. > The idea is quite simple: adding to COPY FROM the option to run a function on > the data before to call dat

Re: [HACKERS] modules

2008-04-03 Thread Andrew Dunstan
Greg Sabino Mullane wrote: At any rate, that's a bit blue sky right now. I haven't seen any disagreement with our kissing "contrib" goodbye as a name, so let's work on that. Unfortunately, that's going to involve a bit of pain, Yes, I'm not sure I see the point of it. It's got a bad name

Re: [HACKERS] psql \G command -- send query and output using extended format

2008-04-03 Thread Dawid Kuroczko
On Thu, Apr 3, 2008 at 4:35 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > > The idea of \G command is to perform the query, but with printing > > query results using extended table output format. > > Seems a bit useless --- if you prefer \x format, woul

  1   2   >