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

2008-04-03 Thread Dave Page
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 thing for one of the founders of the

Re: [HACKERS] modules

2008-04-03 Thread Tom Dunstan
I had some thoughts about similar issues when looking at what it would take to make pl/java yum-installable. The end goal was to be able to say e.g. yum install pljava; echo create language pljava; | psql mydb. Currently there's a non-trivial install process involving running an sql script and

Re: [HACKERS] modules

2008-04-03 Thread Zeugswetter Andreas OSB SD
The closest analogy to what I'm thinking is the perl CPAN or ruby gems. I think this is more a developer thing. I don't think an ISP would want all that automagic (and certainly does not do that for joe user). One thing that might be worth looking at is an install command at the SQL

Re: [HACKERS] modules

2008-04-03 Thread Andrew Dunstan
Zeugswetter Andreas OSB SD wrote: The closest analogy to what I'm thinking is the perl CPAN or ruby gems. I think this is more a developer thing. I don't think an ISP would want all that automagic (and certainly does not do that for joe user). I think you are missing an

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

2008-04-03 Thread Dawid Kuroczko
Hi! I have sent a patch to pgsql-patches: http://archives.postgresql.org/pgsql-patches/2008-04/msg00050.php ...which adds \G command to psql client. The idea of \G command is to perform the query, but with printing query results using extended table output format. For example: postgres=#

[HACKERS] COPY Transform support

2008-04-03 Thread Dimitri Fontaine
Hi, 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 datatype_in functions. This needs some syntax

Re: [HACKERS] modules

2008-04-03 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 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.

Re: [HACKERS] COPY Transform support

2008-04-03 Thread NikhilS
Hi, On Thu, Apr 3, 2008 at 6:47 PM, Dimitri Fontaine [EMAIL PROTECTED] wrote: 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

Re: [HACKERS] modules

2008-04-03 Thread Aidan Van Dyk
* 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 much a kiss of death. But that begs the question of

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

2008-04-03 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 That line of argument could be used to justify putting anything and everything in core. I think that our extensible architecture is an important feature and one we should not hesitate to use to the fullest. I agree, but part of the problem

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

2008-04-03 Thread Aidan Van Dyk
The one concern I have with the way the last commitfest went (and I say this as strictly an observer), there was no discussion on anything. Now, I know that discussion happened, but it happened somewhere, in some web-forum, in a community that seems to generally promote mailing lists as the

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

2008-04-03 Thread Tom Lane
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, wouldn't you prefer it all the time? Or at least often enough that the toggling command

Re: [HACKERS] COPY Transform support

2008-04-03 Thread PFC
Data transformation while doing a data load is a requirement now and then. Considering that users will have to do mass updates *after* the load completes to mend the data to their liking should be reason enough to do this while the loading is happening. I think to go about it the right way

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

2008-04-03 Thread Tom Lane
Aidan Van Dyk [EMAIL PROTECTED] writes: The one concern I have with the way the last commitfest went (and I say this as strictly an observer), there was no discussion on anything. Umm ... in the first place, the fest isn't over yet. In the second place, the reason you haven't seen much

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, wouldn't you

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

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, NULLIF(

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 object

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 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] [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

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 contrib

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 the lines of

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 do

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 thing for one

[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

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

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 --- if you prefer

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 the

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 handle the

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 about ideas

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 mechanism to

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 perl

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] [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] 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

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

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! I

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: Looking for

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 to categorize

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 of contrib... The

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. Consider

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 PROTECTED] wrote: Right

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+c, \x,

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] [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] [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] 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:31 -0400 D'Arcy

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. Yup - a

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 there

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 screen

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
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 expanded

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 wrong to

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

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 strictly

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 run a function

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 and we can

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 swift.

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

[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

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 change.

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 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 have

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

[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

[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

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

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 so expanded

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 letting

[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

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 can

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 from people

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 mechanism

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

[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: http://archives.postgresql.org/pgsql-patches/2008-04/msg5.php On Fri, Apr 4, 2008 at 4:19 AM, Tom

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 pretty good

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 would

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 FROM

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 \df+ go to \x

[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] 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 you

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

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: Some sort of \x

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 query 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 using it as

[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 completely

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

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 query does it only for this one statement. It would solve the OPs problem. But break for others who want all output \x. I think

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

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 the

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. -- so, there is

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 CASE syntax

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.

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 assume it

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: [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... What do

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. Agreed, the

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] 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 query end? Yech.

  1   2   >