[HACKERS] Testing for a shared library

2005-09-07 Thread Christopher Kings-Lynne
Hi, Is there any way of checking to see if a particular shared library is installed? eg. select is_shared_library('$libdir/tsearch2'); If not, can we please have one :D This will greatly help in GUI apps like phpPgAdmin... Chris ---(end of

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Christopher Kings-Lynne
Is there any way of checking to see if a particular shared library is installed? eg. select is_shared_library('$libdir/tsearch2'); How well do you know the library you are looking for? You could just try creating a function from it and seeing if it fails. I know it pretty well, but it

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Kings-Lynne Sent: 07 September 2005 09:03 To: PostgreSQL-development Subject: [HACKERS] Testing for a shared library Hi, Is there any way of checking to see if a particular

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Dave Page
-Original Message- From: Christopher Kings-Lynne [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 09:16 To: Dave Page Cc: PostgreSQL-development Subject: Re: [HACKERS] Testing for a shared library Is there any way of checking to see if a particular shared library is

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Teodor Sigaev
As you know, presence of shared library doesn't mean precense of module in db :). You can try selecting: # select count(*) from pg_opclass where opcname = 'tsvector_ops'; or, more general, # select count(*) from pg_proc where probin = '$libdir/tsearch2'; But not all modules adds new

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Christopher Kings-Lynne
No, I want to check that the shared library exists (eg. the slony libraries) BEFORE executing the slony sql script that creates all the objects. Chris Teodor Sigaev wrote: As you know, presence of shared library doesn't mean precense of module in db :). You can try selecting: # select

[HACKERS] PL/PGSQL and drop/create table

2005-09-07 Thread Teodor Sigaev
# create table foo ( bar int ); CREATE TABLE # create or replace function func (int) returns int as $$ DECLARE IID alias for $1; CNT int; BEGIN select into CNT count(*) from foo where bar = IID; RETURN CNT; END; $$ language plpgsql; CREATE FUNCTION #

Re: [HACKERS] inet increment with int

2005-09-07 Thread Patrick Welche
On Wed, Sep 07, 2005 at 02:48:00AM -, Andrew - Supernews wrote: On 2005-09-06, Patrick Welche [EMAIL PROTECTED] wrote: Now with: test=# select '192.168.0.0/24'::inet + 1; ERROR: Trying to increment a network (192.168.0.0/24) rather than a host What possible justification is there

[HACKERS]

2005-09-07 Thread James Robinson
After reconnecting to database all is ok. Is it supposed behaviour? Yes. The plpgsql interpreter in the backend directs the backend to prepare and cache every sql statement in the function. The planned statements reference oids of the tables referenced. Dropping the connection gets rid of

Re: [HACKERS] PL/PGSQL and drop/create table

2005-09-07 Thread Michael Fuhr
On Wed, Sep 07, 2005 at 03:51:05PM +0400, Teodor Sigaev wrote: ERROR: relation with OID 16628 does not exist CONTEXT: SQL statement SELECT count(*) from foo where bar = $1 http://www.postgresql.org/docs/faqs.FAQ.html#4.19 -- Michael Fuhr ---(end of

Re: [HACKERS] inet increment with int

2005-09-07 Thread Sam Mason
Patrick Welche wrote: Comments anyone? Is incrementing an inet address a valid thing to do, or is its meaning too open to interpretation? How about either a pair of functions, one for incrementing the network and another for the host, or a combined function that allows you to work with both

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: I assume that the path of the shared library will be somehow relative to the GUC dynamic_library_path? Well, whatever you put in the template is what will be in the probin field of the support functions. I suppose it does not *have* to use $libdir,

Re: [HACKERS] Testing for a shared library

2005-09-07 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Is there any way of checking to see if a particular shared library is installed? Try to LOAD it, perhaps. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Thomas Hallgren
Tom Lane wrote: Thomas Hallgren [EMAIL PROTECTED] writes: I assume that the path of the shared library will be somehow relative to the GUC dynamic_library_path? Well, whatever you put in the template is what will be in the probin field of the support functions. I suppose it does not

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-06 17:54:34 -0400: There's a fair amount of nearly unmaintained cruft in the core distro already (eg, the never-finished line datatype ... or the entire rtree index module ...) and a datatype that might be used by only a few people is a likely candidate to become

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: Wouldn't it be better if all PL's used the dynamic_library_path setting at all times? I wouldn't think so at all. That's just another way to shoot yourself in the foot; $libdir is the correct place by definition, and any other directory is not the

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Josh Berkus
Nathan, Take a look at the version 3 or version 5 UUIDs. They essentially do this. The hash isn't reversable, but rather recreatable. Seems that if it were reversable, it would be compression, not a hash. Anyway. Hmmm, yes, true. You're assuming though that you want to leak this

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Josh Berkus
Nathan, - linking against libuuid is fine for a contrib/ extension, but no good for a built-in type. A real uuid would have to do a proper independent implementation of uuid creation within pgsql. Why? I think the issue is portability. Remember that this type needs to work on Windows

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-07 Thread Alvaro Herrera
On Wed, Sep 07, 2005 at 12:31:01AM -0500, Jim C. Nasby wrote: On Tue, Sep 06, 2005 at 07:02:20PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: If the 4 header fields in question were just normalized out, wouldn't all the semantics continue to work the same? All I'm

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread nathan wagner
On Wed, Sep 07, 2005 at 09:45:17AM -0700, josh@agliodbs.com wrote: I think the issue is portability. Remember that this type needs to work on Windows as well as all POSIX platforms and AIX. I had forgotten about windows. I'll see to what extent the library i'm using is portable to windows.

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-07 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 01:05:52PM -0400, Alvaro Herrera wrote: Anyway you are just moving the storage somewhere else -- instead of having 4 fields in the tuple itself, you have one field which points the same 4 fields elsewhere. I don't see how is that a win; it's actually worse because you

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-07 Thread Alvaro Herrera
On Wed, Sep 07, 2005 at 01:20:27PM -0400, Tom Lane wrote: Anyway the fundamental insight has been completely lost here. The original point was that cmin and cmax are only interesting within the originating transaction, and not to anyone else, and thus perhaps don't need to be kept in

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Patrick Welche
On Wed, Sep 07, 2005 at 09:45:17AM -0700, Josh Berkus wrote: Nathan wrote: Quite a list. I wonder what readline is doing there. Readline is for PSQL command completion and history. As for the rest, they are *optional* modules that apparently your RPM builder chose to include; I

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-07 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I'm curious to know how can you store the cmin/cmax pair completely out of the tuple. It's easy to see how to store a single identifier in each tuple that would be an index to a structure in local memory. However, to eliminate both you'd have to keep

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-07 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I think this could be done with our SLRU mechanism, just like pg_clog, pg_subtrans and pg_multixact do. Whether it's really a good idea or not, it's another story. The problem is that you would be creating new ones all the time, it would become a huge

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread nathan wagner
On Wed, Sep 07, 2005 at 09:48:08AM -0700, josh@agliodbs.com wrote: That's good, it gives users options. And I can see why you don't want to re-create the functionality in PG code, it's probably pretty large. It would also be something else that would have to be maintained and debugged.

Re: [HACKERS] statement logging / extended query protocol issues

2005-09-07 Thread Simon Riggs
On Tue, 2005-09-06 at 07:47 +, Oliver Jowett wrote: Simon Riggs wrote: Looking more closely, I don't think either is correct. Both can be reset according to rewind operations - see DoPortalRewind(). We'd need to add another bool onto the Portal status data structure. AFAIK this

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Josh Berkus
Nathan, I was thinking of cryptographic applications.  Then, to use an example from another domain, initial TCP sequence numbers should be random (i.e. unguessable).  A problem with TCP perhaps.  It's been a while since i've read over my copy of _Applied Cryptography_, but I seem to recall

[HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Lee, Patricia S.
Hi, All.   Has anyone successfully built PostgreSQL from source using MinGW?  Anyone have step-by-step instructions on how to do this? I am willing to write the documentation on this if I can just get it to work. :-) I have done the following: 1. Install MinGW a. Go to URL: 

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread nathan wagner
I have made a new version, and made a web page for it. http://granicus.if.org/~nw/uuid/ Given the statement that it won't be accepted for contrib or core unless it compiles on windows, I guess I won't really have anything further to say on the topic. I don't have any way to compile on windows,

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Bruce Momjian
Have you read doc/FAQ_MINGW? --- Lee, Patricia S. wrote: Hi, All. ? Has anyone successfully built PostgreSQL from source using MinGW?? Anyone have step-by-step instructions on how to do this? I am willing to write

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Thomas Hallgren wrote: If my assumptions are correct, then please add: { java, true, sqlj.java_call_handler, NULL, libpljava }, { javaU, false, sqlj.javau_call_handler, NULL, libpljava }, In the interest of uniformity, please rename your libraries to

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Merlin Moncure
please direct to -win32-hackers, -general, or -novice. take your pick. Also please don't cc unless you have a reason to speak directly to that person. anyways, install bison. Merlin -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-hackers- [EMAIL PROTECTED] On Behalf Of

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Tom Lane
Josh Berkus josh@agliodbs.com writes: One of the differences between an add-in and core code is support for all PostgreSQL platforms. These days, things won't get into contrib either if they don't work on all the buildfarm machines. regards, tom lane

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: What I'm trying to say here is that it might be OK to hardcode the properties of core languages in the server, because considering that the only officially supported way to activate those is createlang (rather than using SQL), the properties of

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Tom Lane
nathan wagner [EMAIL PROTECTED] writes: On Wed, Sep 07, 2005 at 09:45:17AM -0700, josh@agliodbs.com wrote: How does it generate its machine identifier? No idea. Does it matter? Not having to fret this kind of detail is the advantage of using someone else's library. It absolutely matters,

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: The other problem I see emerging here is that in certain environments, the java language may not be trusted, such as when it is compiled with GCJ. Hmm, is that really the case? I thought Java is Java. Then, this built-in template will override

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 06:35:51PM +, nathan wagner wrote: I have made a new version, and made a web page for it. http://granicus.if.org/~nw/uuid/ Given the statement that it won't be accepted for contrib or core unless it compiles on windows, I guess I won't really have anything

Re: [HACKERS] [ADMIN] How to determine date / time of last postmaster restart

2005-09-07 Thread Alvaro Herrera
On Wed, Sep 07, 2005 at 12:38:44AM -0500, Jim C. Nasby wrote: On Tue, Sep 06, 2005 at 08:22:34PM -0400, Tom Lane wrote: PG 8.1 will have a function to return postmaster start time, but not database reset time. I wonder if this is misdefined --- if you are trying to measure database uptime,

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Tom Lane
Patrick Welche [EMAIL PROTECTED] writes: Still seems odd to me: I would expect psql to have readline, not postgres. That's because we generate just one LIBS list and use it for all the executables we build. Autoconf makes it a bit difficult to do otherwise. There is an option in the linux

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
I wrote: Another note: PLs that are not in the core distribution are not created with createlang in the first place, so the issues that led up to this proposal don't apply AFAICT, What I'm trying to say here is that it might be OK to hardcode the properties of core languages in the server,

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: We are only talking about well-known procedural languages. The issue of completely new languages added by the user is addressed by neither proposal. Sure it is: in my proposal, you can add new languages to the template catalog. (Which admittedly

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Joshua D. Drake
Bruce Momjian wrote: Have you read doc/FAQ_MINGW? --- Lee, Patricia S. wrote: To be a little more helpful. Patricia everything you need is here: http://www.postgresql.org/docs/faqs.FAQ_MINGW.html Sincerely, Joshua

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: Barring further changes, we'll have a hard-wired template list for 8.1 and a real system catalog in 8.2. So there's a choice now for PLs that are not part of the core distribution: do you want to be listed in the hard-wired template? Another note: PLs that are not in the core

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Andrew Dunstan
Thjis is done all the time - see for example http://www.pgbuildfarm.org/cgi-bin/show_history.pl?nm=goosebr=HEAD At a minumum you will need to install the DTK and from recollection also bison (must be 1.875) and flex (must be 2.5.4) from the gnuwin32 project You don't need an extra make -

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Josh Berkus
Nathan, http://granicus.if.org/~nw/uuid/ Given the statement that it won't be accepted for contrib or core unless it compiles on windows, I guess I won't really have anything further to say on the topic. I don't have any way to compile on windows, so it's not an obstacle I can readily

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Alvaro Herrera
On Wed, Sep 07, 2005 at 06:48:41PM +0100, Patrick Welche wrote: On Wed, Sep 07, 2005 at 09:45:17AM -0700, Josh Berkus wrote: Nathan wrote: Quite a list. I wonder what readline is doing there. Readline is for PSQL command completion and history. As for the rest, they are

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread John DeSoi
On Sep 7, 2005, at 2:31 PM, Lee, Patricia S. wrote: However, I cannot get the make to work. Do I still need to install the GNU Make utility? Any suggestions? LEEP ~/sources/PostgreSQL/postgresql-8.0.3 $ configure --prefix=/c/PostgreSQL/8.0.3 Try adding --without-zlib to your configure.

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: How is this different from 1. register language in pg_language without privileges 2. activate language by granting privileges Because you can't create a language without first creating the support procedures, which ordinarily requires having the shared library present.

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Bob Ippolito
On Sep 7, 2005, at 10:04 AM, nathan wagner wrote: On Wed, Sep 07, 2005 at 09:45:17AM -0700, josh@agliodbs.com wrote: I think the issue is portability. Remember that this type needs to work on Windows as well as all POSIX platforms and AIX. I had forgotten about windows. I'll see to

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Andrew Dunstan
Joshua D. Drake wrote: Bruce Momjian wrote: Have you read doc/FAQ_MINGW? --- Lee, Patricia S. wrote: To be a little more helpful. Patricia everything you need is here:

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Andrew Dunstan
Alvaro Herrera wrote: This is a fairly recent 8.1, maybe post-beta1. Not sure what happened. I certainly don't see the --as-needed in LDFLAGS: $ pg_config | grep LDFLA LDFLAGS = -Wl,-rpath,/pg/install/00orig/lib LDFLAGS_SL = It was removed because it was very badly broken. cheers

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread mark
On Wed, Sep 07, 2005 at 11:31:16AM -0700, Josh Berkus wrote: I'm also a little baffled to come up with any real application where making an id number for most tables unguessable would provide any kind of real protection not far better provided by other means. For your users table, sure,

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Petr Jelinek
Andrew Dunstan wrote: http://www.postgresql.org/docs/faqs.FAQ_MINGW.html That information is not adequate in my experience, and needs to be expanded. See my previous email for more details. It is adequate for building sources downloaded from ftp (you don't need bison, flex, DTK for

Re: [HACKERS] uuid type for postgres

2005-09-07 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: This is a fairly recent 8.1, maybe post-beta1. Not sure what happened. This: 2005-05-07 01:48 neilc * configure, configure.in: Revert the ld --as-needed patch. This breaks Fedora Core 3, due to a strange interaction between ld,

[HACKERS] pg_config/share_dir

2005-09-07 Thread Andrew Dunstan
pg_config doesn't currently seem to have an option to report the share_dir. Should it? cheers andrew ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] PostgreSQL from source using MinGW

2005-09-07 Thread Andrew Dunstan
Petr Jelinek wrote: Andrew Dunstan wrote: http://www.postgresql.org/docs/faqs.FAQ_MINGW.html That information is not adequate in my experience, and needs to be expanded. See my previous email for more details. It is adequate for building sources downloaded from ftp (you don't need

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: These are straw men. No, these are real problems that exist today. We know we have a problem with hard-coded paths in old dumps. This is irrelevant for non-core languages. If I have PL/foo 1.0 installed and upgrade from PostgreSQL 8.0 to 8.1, then I have to manually

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: But it's exactly the same hole the user would create by manually saying CREATE TRUSTED LANGUAGE in error. I don't think that's a reasonable argument against the template idea --- it just says that you have to be aware of what you're doing. (An appropriate solution, in my

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: We know we have a problem with hard-coded paths in old dumps. This is irrelevant for non-core languages. If I have PL/foo 1.0 installed and upgrade from PostgreSQL 8.0 to 8.1, then I have to manually recompile PL/foo and install

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Peter Eisentraut
Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Andrew Dunstan
Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? Why would they need pkglibdir either? I was asked about this by an author who

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Thomas Hallgren
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: The other problem I see emerging here is that in certain environments, the java language may not be trusted, such as when it is compiled with GCJ. Well, yes. But use the word environment in singular please :-) To my knowledge

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: The case in reality is this: First of all, the language name java is fixed by the SQL standard, so we ought to allow alternative implementations to use that name. I'm not sure what kind of interface the PL/J people are working on, but if they

[HACKERS] initdb profiles

2005-09-07 Thread Andrew Dunstan
One regular topic of conversation on IRC and elsewhere is that the settings initdb installs especially for memory use, connections, and so on, are often very conservative. Of course, we tell people how to tune them to some extent, although performance tuning seems to remain a black art. But

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: GCJ is a clean house implementation of Java. They don't use the runtime libraries from Sun and they are not really there yet in their efforts to copy the functionality. One of the things that lag behind is security. They hope to have a better

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: Now this certainly discriminates against installing PLs outside $libdir, but I haven't heard any good reason why people would need to do that. Development, testing, staging, ... If I have PL/foo 1.0 installed and upgrade from PostgreSQL 8.0 to 8.1, the validator in

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: In any case, not one of these arguments seems to me to favor the alternative of preloading definitions into pg_language: That is not the alternative I am proposing. Your template idea, hard-coded even, is just fine for core

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Thomas Hallgren wrote: Well, yes. But use the word environment in singular please :-) To my knowledge the security is full-proof with all other VM's since they all use the standard runtime libraries. It's not quite as simple as that. There are a bunch of VMs and a bunch of libraries (and a

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: Are you seriously suggesting that it's a good idea for the single language name java to mean different things at different installations? I can't believe that that wouldn't lead to chaos. There is a standard for the SQL integration of a java language, and I don't see why

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Peter Eisentraut
Andrew Dunstan wrote: Why would they need pkglibdir either? To determine what $libdir resolves to. I was asked about this by an author who wanted to use it to find where to put module config/setup scripts. Probably not in PostgreSQL's data directory, but his own. -- Peter Eisentraut

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: (What the PL template approach *would* do is make it difficult to create a language that is trusted but named pljavau, or untrusted and named pljava. But the latter is exactly what I would like to do. Personally I don't see that as a bad thing, however. The opportunity for

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Darcy Buskermolen
On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? the way wo do this in slony is with

Re: [HACKERS] initdb profiles

2005-09-07 Thread Peter Eisentraut
Andrew Dunstan wrote: But I wondered if it might not be a good idea to allow an option to initdb which would provide a greater possible range of settings for max_connections, shared_buffers and so on. For example, we might offer a profile which is very conservative for memory bound That

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Tom Lane wrote: In any case, java has not been put forward as one of the template entries, and as long as we don't accept a template for it, we have not made the situation any worse. Hmm, Thomas Hallgren sent in a template using java as name and you

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? pg_config serves a function of recording the configuration, so I tend to agree

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Peter Eisentraut
Tom Lane wrote: pg_config serves a function of recording the configuration, pg_config was meant (as opposed to serves) to provide information that is of use for building third-party things. Hence includedir, libdir for building, pkglibdir for installing. The option --configure records the

Re: [HACKERS] initdb profiles

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: All jokes aside, tuning aids are surely needed, but letting initdb guess the required profile isn't going to do it. initdb is really the wrong place for this anyway, because in many situations (RPM installations for instance) initdb is run behind the

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Andrew Dunstan
Darcy Buskermolen wrote: On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need

[HACKERS] PQ versions request message

2005-09-07 Thread James William Pye
I have been writing a PQ client and I have come to think that a supported PQ versions request startup packet would be useful to client authors. That is, sending a StartupPacket(Version(0, 0))(or whatever) would return a message containing a list of supported PQ versions, and maybe the server

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Now this certainly discriminates against installing PLs outside $libdir, but I haven't heard any good reason why people would need to do that. Well one example would be distributions that package up some PLs but want to allow you to install some on your own.

Re: [HACKERS] initdb profiles

2005-09-07 Thread Peter Eisentraut
Andrew Dunstan wrote: The idea was in fact to allow the user to provide additional information to allow initdb to make better guesses than it currently does. There's certainly going to be opposition to making initdb an interactive tool. The other problem is that no one has ever managed to

Re: [HACKERS] PQ versions request message

2005-09-07 Thread Tom Lane
James William Pye [EMAIL PROTECTED] writes: I have been writing a PQ client and I have come to think that a supported PQ versions request startup packet would be useful to client authors. Given that it'd be guaranteed not to work with any existing server versions, I find the usefulness a bit

Re: [HACKERS] PQ versions request message

2005-09-07 Thread Peter Eisentraut
James William Pye wrote: I have been writing a PQ client and I have come to think that a supported PQ versions request startup packet would be useful to client authors. That is, sending a StartupPacket(Version(0, 0))(or whatever) would return a message containing a list of supported PQ

Re: [HACKERS] initdb profiles

2005-09-07 Thread Joshua D. Drake
What I would like to see is that initdb would end with saying that the system is not really tuned and that I should run pg-some-program to improve that. pg-some-program would analyze my system, ask me a few questions, and then output a suggested configuration (or apply it right away).

Re: [HACKERS] initdb profiles

2005-09-07 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: What I would like to see is that initdb would end with saying that the system is not really tuned and that I should run pg-some-program to improve that. Perhaps at the end of initdb it would say would you like to run the PostgreSQL configuration

Re: [HACKERS] Attention PL authors: want to be listed in template table?

2005-09-07 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: I'm not sure how that relates to the template work you're discussing. Are all of the templates you're creating for components that are built out of core and therefore can be expected to be packaged? Well, that's exactly the point Peter is arguing: he

Re: [HACKERS] initdb profiles

2005-09-07 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: I accept the run from init.d argument. So then, is there a case for increasing the limits that initdb works with, to reflect the steep rise we have seen in typically available memory at the low end? I can't see any

Re: [HACKERS] pg_config/share_dir

2005-09-07 Thread Peter Eisentraut
Why do you need access to postgresql.conf.sample? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] initdb profiles

2005-09-07 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: There is a compromise that I think we cannot make. For production deployment, shared buffers are typically sized at about 10% to 25% of available phyiscal memory. I don't think we want to have a default installation of PostgreSQL that takes 10%

Re: [HACKERS] PQ versions request message

2005-09-07 Thread James William Pye
On Thu, 2005-09-08 at 03:48 +0200, Peter Eisentraut wrote: This doesn't make sense to me, because a server does not have any version requirements on the client (aside from the protocol versions, which are negotiated automatically). The use case primarily applies to custom clients(non-libpq,

Re: [HACKERS] initdb profiles

2005-09-07 Thread Andrew Dunstan
Peter Eisentraut wrote: Andrew Dunstan wrote: I accept the run from init.d argument. So then, is there a case for increasing the limits that initdb works with, to reflect the steep rise we have seen in typically available memory at the low end? There is a compromise that I think we

Re: [HACKERS] [COMMITTERS] pgsql: Update timezone data files to release 2005m of the zic database

2005-09-07 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes: On Wed, Sep 07, 2005 at 18:39:26 -0300 (ADT), Tom Lane wrote: Update timezone data files to release 2005m of the zic database. Among other changes, this reflects the recently passed change in USA daylight savings rules. Looks like some horology tests

Re: [HACKERS] PQ versions request message

2005-09-07 Thread Oliver Jowett
James William Pye wrote: The use case primarily applies to custom clients(non-libpq, atm) that support multiple PQ versions that may be implemented in separate modules/libraries. (Avoid loading client-2.0 code for a 3.0 connection, and/or future versions.) libpq automatically negotiates

Re: [HACKERS] initdb profiles

2005-09-07 Thread Christopher Kings-Lynne
heuristics that initdb could apply. We'd have to let all of these degrade nicely, so that even if the user select the machine hog setting, if we find we can only do something like the tiny setting that's what s/he would get. Also, we might need to have some tolerably portable way of finding

Re: [HACKERS] PQ versions request message

2005-09-07 Thread James William Pye
On Wed, 2005-09-07 at 22:02 -0400, Tom Lane wrote: Given that it'd be guaranteed not to work with any existing server versions, I find the usefulness a bit debatable... Indeed =(. However, older servers could be easily detected then if the returned message type is 'E'. If 'E' is returned, it