[HACKERS] fix schema ownership on first connection preliminary patch

2004-05-08 Thread Fabien COELHO
Dear hackers, Please find attached a preliminary patch to fix schema ownership on first connection. It is for comments and advices as I still have doubts about various how-and-where issues, thus it is not submitted to the patch list. (1) It adds a new datisinit attribute to pg_database, which

Re: [HACKERS] Aclitem high level description

2004-05-08 Thread Fabien COELHO
Dear Peter, The functionality of the ACL system is to answer questions like does user X have privilege Y on object Z. ONE OF the functionality, and THE functionality from the backend point of view. As I'm developing slowly a pg_advisor schema to check for various consistency issues. For

Re: [HACKERS] Constraint not shown on \d ?

2004-05-08 Thread Christopher Kings-Lynne
CREATE UNIQUE INDEX activation_code_code_key ON public.activation_code USING btree (code, id_code_pool); or ALTER TABLE activation_code ADD UNIQUE ( code, id_code_pool ); with \d command there is no difference but is different because the first command create an index deleteable with a drop

[HACKERS] email built in type

2004-05-08 Thread Gaetano Mendola
Hi all, about you is it ok for you if I write the email built in type ? I know of course that I can do it with a DOMAIN. Regards Gaetano Mendola ---(end of broadcast)--- TIP 6: Have you searched our list archives?

Re: [HACKERS] Constraint not shown on \d ?

2004-05-08 Thread Gaetano Mendola
Christopher Kings-Lynne wrote: CREATE UNIQUE INDEX activation_code_code_key ON public.activation_code USING btree (code, id_code_pool); or ALTER TABLE activation_code ADD UNIQUE ( code, id_code_pool ); with \d command there is no difference but is different because the first command create

Re: [HACKERS] email built in type

2004-05-08 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: about you is it ok for you if I write the email built in type ? You're going to have to explain why it has to be a built-in type. Can't you do what you want as a local add-on? Is it likely that the functionality you have in mind would be exactly what

[HACKERS] Changing printed representation of integer and OID lists

2004-05-08 Thread Tom Lane
I've been having an off-list discussion with Neil Conway about the handling of lists in the backend's nodeToString and stringToNode routines (outfuncs.c and readfuncs.c). Currently, the same string representation (1 2 3 4) is used for a List of integer-flavor Value nodes, a List

Re: [HACKERS] email built in type

2004-05-08 Thread Gaetano Mendola
Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] writes: about you is it ok for you if I write the email built in type ? You're going to have to explain why it has to be a built-in type. Can't you do what you want as a local add-on? Is it likely that the functionality you have in mind would

[HACKERS] Comments on all system objects

2004-05-08 Thread Christopher Kings-Lynne
Hi, Is there any reason I shouldn't submit a patch that makes it so that we have comments on 100% of the catalog objects? I don't see any reason why we shouldn't do it... Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [HACKERS] email built in type

2004-05-08 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: Tom Lane wrote: Can't you do what you want as a local add-on? I guess that for manage efficiently million of email addresses I need to have a built in type instead of a domain with a regex as validator, You probably ought to do some measurements

Re: [HACKERS] Comments on all system objects

2004-05-08 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Is there any reason I shouldn't submit a patch that makes it so that we have comments on 100% of the catalog objects? Bulk? Redundancy with the SGML documentation? There are already more than enough places to have to edit documentation when

Re: [HACKERS] Comments on all system objects

2004-05-08 Thread Peter Eisentraut
Christopher Kings-Lynne wrote: Is there any reason I shouldn't submit a patch that makes it so that we have comments on 100% of the catalog objects? The ability to comment on all types of catalog objects or actual comments on all predefined catalog objects? Both are more or less reasonable.

Re: [HACKERS] email built in type

2004-05-08 Thread Gaetano Mendola
Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] writes: Tom Lane wrote: Can't you do what you want as a local add-on? I guess that for manage efficiently million of email addresses I need to have a built in type instead of a domain with a regex as validator, You probably ought to do some

[HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Win32 is going to need relocatable installs, and Unix packagers have asked for this too. A relocatable install is one where you can do 'gmake install', tar up the directory where you installed it, then untar it on to another machine with the same operating system, but into a different directory

Re: [HACKERS] email built in type

2004-05-08 Thread Bernd Helmle
--On Samstag, Mai 08, 2004 14:14:10 +0200 Gaetano Mendola [EMAIL PROTECTED] wrote: Hi all, about you is it ok for you if I write the email built in type ? I know of course that I can do it with a DOMAIN. Regards Gaetano Mendola Funny, I had the idea some time ago, too. The problem was that I

Re: [HACKERS] Aggregation question

2004-05-08 Thread Hans-Jürgen Schönig
if you want to put 1000 columns into one table, your data structure needs some further investigation. you are trying to solve the wrong problem. Regards, Hans Dilip Angal wrote: Hi I have a situation that I need flexible number columns to model the business requirements. It could go up

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: My idea is to write a /port function that uses various methods to find the needed files. We could look in the relative location first, and if the needed file is not found, look in the hardcoded directory. I think a search until you find something

Re: [HACKERS] Aggregation question

2004-05-08 Thread Oleg Bartunov
On Sat, 7 Feb 2004, [ISO-8859-1] Hans-J?rgen Sch?nig wrote: if you want to put 1000 columns into one table, your data structure needs some further investigation. you are trying to solve the wrong problem. Dilip, you may try our contrib/hstore from http://www.sai.msu.su/~megera/postgres/gist/

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Marc G. Fournier
On Sat, 8 May 2004, Bruce Momjian wrote: Win32 is going to need relocatable installs, and Unix packagers have asked for this too. A relocatable install is one where you can do 'gmake install', tar up the directory where you installed it, then untar it on to another machine with the same

[HACKERS]

2004-05-08 Thread elein
Bcc: Subject: Adding MERGE to the TODO list Reply-To: Can we add the MERGE command to the TODO list? Is anyone actively examining this issue? And yes, I realize it is not for 7.5. It would be good to be able to say it is on the list for some future release, however. Thanks, elein

[HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread elein
Can we add the MERGE command to the TODO list? Is anyone actively examining this issue? And yes, I realize it is not for 7.5. It would be good to be able to say it is on the list for some future release, however. Thanks, elein [EMAIL

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Marc G. Fournier wrote: However, right now, if you try to move /usr/local/pgsql to /var/pgsql, the database will not work because there are hard-coded directory dependencies in the binaries: initdb has to find its *.bki files in /share initdb has to find the postgres binary in

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Bruce Momjian
elein wrote: Can we add the MERGE command to the TODO list? Is anyone actively examining this issue? And yes, I realize it is not for 7.5. It would be good to be able to say it is on the list for some future release, however. What does the MERGE command do? I have never heard of it, so

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: My idea is to write a /port function that uses various methods to find the needed files. We could look in the relative location first, and if the needed file is not found, look in the hardcoded directory. I think a search until you

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: My idea is to write a /port function that uses various methods to find the needed files. We could look in the relative location first, and if the needed file is not found, look in the hardcoded directory. I think a search until you

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Marc G. Fournier wrote: Is there a reason why we can't use a PGSQL_PREFIX ENV variable or something like that? If not defined, use compiled in default? Win32 isn't going to be able to define that. And this idea is even worse than the other one as far

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Andrew Dunstan wrote: I think we should use the relative-path method *unless* the configure command called out specific installation directories (that is, not just --prefix but --datadir and/or related options). If you use one of those then that absolute path should be used always, ie, you

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Tom Lane wrote: I think we should use the relative-path method *unless* the configure command called out specific installation directories (that is, not just --prefix but --datadir and/or related options). I think we could adopt a simple rule: if you

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Ah, got it. Makes sense. We do searches for finding our own path, but you can argue that this predictable --- we know we are running so the binary must be somewhere. :-) However, the version checking we do now is a little

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Ah, got it. Makes sense. We do searches for finding our own path, but you can argue that this predictable --- we know we are running so the binary must be somewhere. :-) However, the version checking we do now is a little non-predictable because if

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Christopher Kings-Lynne
What does the MERGE command do? I have never heard of it, so I doubt someone is working on it. It is basically the SQL standard version of MySQL's REPLACE syntax. It does an update-else-insert set. However, the trick is that it uses some sort of next key locking to ensure that it cannot fail.

Re: [HACKERS] Comments on all system objects

2004-05-08 Thread Christopher Kings-Lynne
The ability to comment on all types of catalog objects or actual comments on all predefined catalog objects? Both are more or less reasonable. But I think we should have some sort of internationalization mechanism for the actual comments. One of my first commits for 7.5 was the format, I

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Alvaro Herrera
On Sun, May 09, 2004 at 09:50:00AM +0800, Christopher Kings-Lynne wrote: What does the MERGE command do? I have never heard of it, so I doubt someone is working on it. It is basically the SQL standard version of MySQL's REPLACE syntax. It does an update-else-insert set. However, the

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Christopher Kings-Lynne
I intend to release locks on subtransaction abort, so if the update fails there's room for another transaction to insert the key (which I understand should fail?). I guess there's a different locking mechanism needed; I believe nested transactions will not be enough. Except you can keep trying

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Bruce Momjian
Shachar Shemesh wrote: Bruce Momjian wrote: Comments? What's wrong with the way it's done by everybody else? Have hardcoded paths (determined at configure time), and allow override using a config file. Have a command line option for saying where the config file should be. Where

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Shachar Shemesh
Bruce Momjian wrote: Comments? What's wrong with the way it's done by everybody else? Have hardcoded paths (determined at configure time), and allow override using a config file. Have a command line option for saying where the config file should be. For Windows, replace config file with

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Shachar Shemesh
Bruce Momjian wrote: Shachar Shemesh wrote: Bruce Momjian wrote: Comments? What's wrong with the way it's done by everybody else? Have hardcoded paths (determined at configure time), and allow override using a config file. Have a command line option for saying where the config

Re: [HACKERS] Relocatable installs

2004-05-08 Thread Marc Slemko
On Sun, 9 May 2004, Bruce Momjian wrote: Shachar Shemesh wrote: Bruce Momjian wrote: Comments? What's wrong with the way it's done by everybody else? Have hardcoded paths (determined at configure time), and allow override using a config file. Have a command line option for

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Alvaro Herrera
On Sun, May 09, 2004 at 12:13:31PM +0800, Christopher Kings-Lynne wrote: I intend to release locks on subtransaction abort, so if the update fails there's room for another transaction to insert the key (which I understand should fail?). I guess there's a different locking mechanism needed; I