Re: [HACKERS] Re: List response time...

2001-08-24 Thread speedboy

 It's in the configuration.  I run much more than the above and have no 
 issues at all.

Yeah, some people shouldn't have root even if they own the machine.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] Ignore this ...

2001-08-24 Thread Marc G. Fournier


Just a test ...


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Re: List response time...

2001-08-24 Thread David Ford



You are seeing sendmail's poorly designed queuing behaviour in action.
sendmail limits itself by outgoing messages, rather than outgoing
deliveries.  This causes one slow delivery to hold up many fast
deliveries.


Again, all in the configurationrinse, repeat.

Simply change your queue priority.

David



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] Re: List response time...

2001-08-24 Thread David Ford

Ian Lance Taylor wrote:

Both qmail and postfix radically outperform sendmail for large mailing
list delivery on identical hardware.  It seems strange to me to say
that there is no sendmail issue when sendmail itself is the issue.
The queuing structure sendmail uses is simply wrong when a single
message has many recipients.  I've run moderately serious (1000 users,
dozens of messages per day) mailing lists using both sendmail and
qmail, and there really is no comparison.


Ian, please

It's in the configuration.  I run much more than the above and have no 
issues at all.

-d



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Re: List response time...

2001-08-24 Thread David Ford

Vince Vielhaber wrote:

ooohh  I've been raggin on
Marc on that one for well over a year, maybe two..  I started using
qmail when it was still in .7something beta and never looked back.  The
folks at Security Focus have moved all of the lists to ezmlm (part of
qmail) and have had nothing but success...  But don't tell Marc.


And ezlm is -ever- so quick to tell you your mail is bouncing when your 
link goes down for a few hours or is sporadic.  I know of several others 
that simply send you the emails that are in queue.

-d



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [HACKERS] Re: List response time...

2001-08-24 Thread Hannu Krosing

David Ford wrote:
 
 Ian Lance Taylor wrote:
 
 Mailing lists don't scale well to large numbers of subscribers.  I see this
 delay constantly,on multiple lists.  The bigger the list gets, the slower the
 list gets (and the more loaded the server gets, right Marc? :-)).
 
 
 Note that the postgresql.org mail server is still running sendmail.
 In my personal experience with sources.redhat.com, qmail is a much
 better choice to handle large mailing lists.  When we switched from
 sendmail to qmail, mailing list delays dropped from hours, or
 sometimes even days, to seconds.
 
 
 It's all in the configuration.  I slam mails around dozens of machines
 in seconds using sendmail and I process a lot of mail.

Not only configuration. A friend of mine upgraded a computer that was
unable 
to handle the mail feed from P200 to PIII 800 going from sendmail to
qmail at 
the same time. The load average dropped from allways very busy to
0.02. 

It is possible that it is mainly from better conf and faster processor
but then 
I'd claim that qmail is easier to configure for big load.


Hannu

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[HACKERS] Fully qualified column names

2001-08-24 Thread Dave Cramer

This is from the jdbc list. Is there any way to get fully qualified
column names?

Dave

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Ben Carterette
Sent: August 16, 2001 11:02 AM
To: Rene Pijlman
Cc: [EMAIL PROTECTED]
Subject: Re: [JDBC] select on multiple tables


This won't work because I don't know in advance of the SELECT which 
tables I'm going to be selecting from.  The SELECT is done in a servlet 
that determines the tables based on request parameters.  I tried SELECT

table1.*, table2.* FROM table1, table2, but it still can't tell the 
difference between columns with the same name.

Thanks for your help

ben


On Wednesday, August 15, 2001, at 06:29  PM, Rene Pijlman wrote:

 On Wed, 15 Aug 2001 16:43:31 -0500, Ben Carterette wrote:
 I have a query like SELECT * FROM table1, table2 and I want to read
 values
 out of a ResultSet.  What if the two tables have column names in 
 common and
 I can't predict the column numbers?  Is there any way to get
table1.id 
 and
 table2.id?  rs.getString tells me The column name table1.id not 
 found.

 Does this also happen when you explicitly name the columns?

SELECT table1.id, ..., table2.id, ...
FROM table1, table2

 Or if that doesn't help, try if a column label with the AS clause 
 works:

 SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
 * | expression [ AS output_name ] [, ...] 
 http://www.postgresql.org/idocs/index.php?sql-select.html

   SELECT table.id AS id1, ..., table2.id AS id2
   FROM table1, table2

 And then rs.getString(id1);

 I think both solutions should work. Please let us know if they don't.

 Regards,
 René Pijlman


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Toast, Text, blob bytea Huh?

2001-08-24 Thread Peter T Mount

Quoting Joe Conway [EMAIL PROTECTED]:

 TEXT is a datatype which stores character data of unspecified length (up
 to
 the max value of a 4 byte integer in length, although I've seen
 comments
 indicating that the practical limit is closer to 1 GB -- not sure why).

It may be something to do with the 1Gb splitting of the physical files 
representing a table... Unless it changed recently, a table was split over 
multiple files at the 1Gb mark.

Peter

-- 
Peter Mount [EMAIL PROTECTED]
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[HACKERS] Re: [PATCHES] encoding names

2001-08-24 Thread Bruce Momjian

   BTW, what's wrong with encoding? I don't think, for example EUC-JP
   or utf-8, are character set names.
  
  Hmm, SQL talks of character sets, it has a CHARACTER_SETS view and such.
  It's slightly incorrect, I agree.
  
  Maybe we should not touch getdatabaseencoding() right now, given that the
  names we currently use are apparently almost correct anyway and
  considering the pain it creates to alter them, and instead implement the
  information schema views in the future?
 
 I thought schema stuffs would be introduced in 7.2 but apparently it
 would not happen...

I thought I could do it but ran out of time.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] A couple items on TODO

2001-08-24 Thread Peter Eisentraut

Tom Lane writes:

 Yeah, people have started to use 'const' in new code, but the older
 stuff doesn't use it, which means that the net effect is probably
 more annoyance than help.  I'm afraid that if we attack this in an
 incremental way, we'll end up with code that may have a lot of const
 markers in the declarations, but the actual code is riddled with
 explicit casts to remove const because at one time or another that
 was necessary in a particular place.

 Can anyone think of a way to get from here to there without either
 a lot of leftover cruft, or a big bang massive changeover?

What I usually do if I feel a parameter could be made const is to
propagate the change as far as necessary to the underlying functions.
From time to time this turns out to be impossible at some layer.  BUT:
This is an indicator that you really don't know whether the value is const
so you shouldn't declare it thus.

IMHO, a better project than putting const qualifiers all over interfaces
that you are not familiar with would be to clean up all the -Wcast-qual
warnings.

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] User locks code

2001-08-24 Thread Bruce Momjian

 Tom Lane wrote:
  
  I definitely agree with Vadim here: it's fairly silly that the
  contrib userlock code is GPL'd, when it consists only of a few dozen
  lines of wrapper for the real functionality that's in the main backend.
 

I was incorrect in something I said to Vadim.  I said stored procedures
would have to be released if linked against a GPL'ed backend.  They have
to be released only if they are in C or another object file linked into
the backend.  PlpgSQL or SQL functions don't have to be released because
their code is loaded into the backend as a script, not existing in the
backend binary or required for the backend to run.

 Maybe it makes Massimo feel good ? It seems a worhty reason to me, as 
 he has contributed a lot of useful stuff over the time.

Yes, that is probably it.  The GPL doesn't give anything to users, it
takes some control away from users and gives it to the author of the
code.

 I really think that mixing licences inside one program is bad, if not
 for 
 any other reason then for confusing people and making them have
 discussions 
 like this.

Yes, the weird part is that the BSD license is so lax (don't sue us)
that it is the addition of the GPL that changes the affect of the
license.  If you added a BSD license to a GPL'ed piece of code, the
effect would be near zero.

  Besides, anyone who actually wanted to use the userlock code would need
  only to write their own wrapper functions to get around the GPL license.
 
 This is a part of copyright law that eludes me - can i write a
 replacement
 function for something so simple that it can essentially be done in one 
 way only (like incrementing a value by one) ?

Sure, if you don't cut and paste the code line by line, or retype the
code while staring at the previous version.  That is how Berkeley got
unix-free version of the BSD operating system.  However, the few places
where they lazily copied got them in trouble.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Changelog and 7.1.3 release

2001-08-24 Thread Peter Eisentraut

Bruce Momjian writes:

 Can I ask why we are mentioning the changelog for the release and not
 the list from the HISTORY file?  Any why are we putting the changelog in
 the tarball anyway?  Seems that could easily go on a web site.

The point of these changelogs was to show the changes between beta and rc
versions, because those were not necessarily recorded in the HISTORY file.
However, putting these in the tarball is questionable (if you already
downloaded the tarball then you might as well proceed with installing it),
still having them there now is even more questionable (who cares?), and
making them for minor releases is redundant and confusing.  I vote for
removing them.

First prize for Consistency in Naming, btw.

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Toast, Text, blob bytea Huh?

2001-08-24 Thread Tom Lane

Peter T Mount [EMAIL PROTECTED] writes:
 Quoting Joe Conway [EMAIL PROTECTED]:
 indicating that the practical limit is closer to 1 GB -- not sure why).

 It may be something to do with the 1Gb splitting of the physical files 
 representing a table...

No, that's just a coincidence.  The reason that TOAST limits fields to
1Gb is that the high-order two bits of the varlena length word were
commandeered as TOAST state indicators.  There are now only thirty bits
available to represent the length of a variable-length Datum; hence the
hard limit on field width is 1Gb.

I'd think that the practical limit is quite a bit less than that, at
least until we devise an API that lets you read and write toasted values
in sections.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] User locks code

2001-08-24 Thread Hannu Krosing

Bruce Momjian wrote:
 
 
  This is a part of copyright law that eludes me - can i write a
  replacement
  function for something so simple that it can essentially be done in one
  way only (like incrementing a value by one) ?
 
 Sure, if you don't cut and paste the code line by line, or retype the
 code while staring at the previous version.  That is how Berkeley got
 unix-free version of the BSD operating system.  However, the few places
 where they lazily copied got them in trouble.


I can imagine that when writing a trivial code for performing a trivial
and 
well-known function it is quite possible to arrive at a result that is 
virtually indistinguishable from the original.

I know that Compaq was forced to do a clean-room re-engineering of PC
BIOS 
(two teams - the dirti one with access to real bios athat does
description 
and testin and the clean team to write the actual code so that they can 
prove they did not steal even if the result is byte-by-byte simila)
for 
similar reasons

I guess we dont have enough provably clean developers to do it ;)

BTW, teher seems to be some problem with mailing list - I get very few 
messages from the list that are not CC:d to me too

--
Hannu

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] libpq.dll psql.exe on Win32

2001-08-24 Thread Bruce Momjian


I have applied the attached patch that is basically your patch with
Tom's suggestion to use HAVE_UNIX_SOCKETS.
 

 Hi,
 
 There are two problems when compiling libpq.dll and psql.exe
 on Windows. I'm not sure it is the best way to fix them
 (see patch below.) Comments?
 
 Regards,
 Mikhail Terekhov
 
 Index: bin/psql/prompt.c
 ===
 RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/psql/prompt.c,v
 retrieving revision 1.19
 diff -C3 -r1.19 prompt.c
 *** bin/psql/prompt.c 2001/05/06 17:21:11 1.19
 --- bin/psql/prompt.c 2001/08/22 18:27:26
 ***
 *** 129,134 
 --- 129,135 
   if (*p == 'm')
   buf[strcspn(buf, .)] 
= '\0';
   }
 + #ifndef WIN32
   /* UNIX socket */
   else
   {
 ***
 *** 139,144 
 --- 140,146 
   else
   snprintf(buf, 
MAX_PROMPT_SIZE, [local:%s], host);
   }
 + #endif
   }
   break;
   /* DB server port number */
 Index: include/libpq/hba.h
 ===
 RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/libpq/hba.h,v
 retrieving revision 1.24
 diff -C3 -r1.24 hba.h
 *** include/libpq/hba.h   2001/08/16 16:24:16 1.24
 --- include/libpq/hba.h   2001/08/22 18:27:26
 ***
 *** 11,17 
 --- 11,19 
   #ifndef HBA_H
   #define HBA_H
   
 + #ifndef WIN32
   #include netinet/in.h
 + #endif
   
   #define CONF_FILE pg_hba.conf
/* Name of the config file  */
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://www.postgresql.org/search.mpl
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026


Index: src/bin/psql/prompt.c
===
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/psql/prompt.c,v
retrieving revision 1.19
diff -c -r1.19 prompt.c
*** src/bin/psql/prompt.c   2001/05/06 17:21:11 1.19
--- src/bin/psql/prompt.c   2001/08/24 16:55:13
***
*** 129,134 
--- 129,135 
if (*p == 'm')
buf[strcspn(buf, .)] 
= '\0';
}
+ #ifndef HAVE_UNIX_SOCKETS
/* UNIX socket */
else
{
***
*** 139,144 
--- 140,146 
else
snprintf(buf, 
MAX_PROMPT_SIZE, [local:%s], host);
}
+ #endif
}
break;
/* DB server port number */
Index: src/include/libpq/hba.h
===
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/libpq/hba.h,v
retrieving revision 1.24
diff -c -r1.24 hba.h
*** src/include/libpq/hba.h 2001/08/16 16:24:16 1.24
--- src/include/libpq/hba.h 2001/08/24 16:55:13
***
*** 11,17 
--- 11,19 
  #ifndef HBA_H
  #define HBA_H
  
+ #ifndef WIN32
  #include netinet/in.h
+ #endif
  
  #define CONF_FILE pg_hba.conf
   /* Name of the config file  */



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] PATCH proposed with new features for CREATE TABLE

2001-08-24 Thread Bruce Momjian


Can someone comment on this?

 Hi people!.I  developed a work for an university course, which I wish to share with 
you.
 
 I extended the foreign key clause in the create table in order to permit insertions 
and updates on a referencing table (a table with foreign key
 attributes) with all kind of actions (the existing ones plus CASCADE, SET NULL and 
SET DEFAULT).
 
 I think it is important to handle situations where the referencing data is available 
but it cannot be inserted due to the lack of the referenced
 tuple. It is ugly, for example, to request the user to create a dummy referenced 
entry previous to the insertion since it can be done
 automatically with the proposed functionality.
 Applying it in the context of a product with a well-defined execution model of 
triggers, like PostgreSQL, I do not introduce any kind of
 indetermination in the sequence of verification of the referential constraints, 
because we know beforehand, depending on the order of creation of
 the tables and constraints, which will be the resulting order of the chain of 
verifications. So, when a referencing table is updated or tuples
 are added to it, even when this table is the origin of various referential chains of 
verifications, the resulting behavior only depends on the
 order of creation mentioned above. (I insist with the theme of determinism because I 
think this is the main problem for which no database product
 includes this characteristic). I tested the code with examples of such cases (taking 
modified problematical examples from a text of Markowitz)
 and it works well.
 
 The new syntax for the column_constraint_clause (and table_constraint_clause) of the 
CREATE TABLE statement that I propose (and implement) is:
 
  ...
  [ ON INSERT action ]
  [ ON DELETE action ]
  [ ON UPDATE_LEFT action ]
  [ ON UPDATE_RIGHT action ]
  ...
 where
 
 ON DELETE action
stays the same as before (it refers to deletes in the referenced table),
 
 ON UPDATE_RIGHT action
is the original ON UPDATE action (like before, it refers to modifications in the 
referenced table),
 
 ON UPDATE_LEFT action
specifies the action to do when a referencing column (a FK_column) in the 
referencing table is being updated to a new value, and this new
 value do not exist like pk_value in the pk_table. If the row is updated, but the 
referencing column is not changed, no action is done. There are
 the following actions.
 
NO ACTION
   Disallows update of row.
 
RESTRICT
   Disallows update of row.
 
CASCADE
   Updates the value of the referenced column (the pk_column) to the new 
value of the
   referencing column (the fk_column).
 
SET NULL
   Sets the referencing column values to NULL.
 
SET DEFAULT
   Sets the referencing column values to their default value.
 
 ON INSERT action
specifies the action to do when a referencing row (a FK_row) in the referencing 
table is being inserted, and the new fk_values do not exist
 like pk_values in the referenced table (pk_table). There are the following actions.
 
NO ACTION
   Disallows insert of row.
 
RESTRICT
   Disallows insert of row.
 
CASCADE
   Inserts a new row into the referenced table which pk_columns take the 
values of the new fk_columns, and the other attributes are set to
 NULL values (if it is allowed).
 
SET NULL
   Sets the referencing column values to NULL.
 
SET DEFAULT
   Sets the referencing column values to their default value.
 
 I have not added new files, just modified the existing ones (so the makefiles stay 
like before). I  send a diff (-c) against the version 7.0.2
 (the one I worked with).
 
 In summary, the patch contains:
 
 * modifications to the grammar to include the new syntax of the CREATE TABLE 
statement (to recognize the new tokens and do the appropriate
 stuff).
 
 * Addition of definitions of flags and masks for FOREIGN KEY constraints in 
CreateStmt.
 
 * the new generic trigger procedures for referential integrity constraint checks.
 
 * modifications to the parser stage to accept them (in procedures 
transformCreateStmt() and
transformAlterTableStmt() ).
 
 * update to declarations for operations on built-in types.
 
 * extension of the definition of the system procedure relation (pg_proc) along 
with the
relation's initial contents.
 
 * modifications to the TRIGGERs support code to accept the new characteristics.
 
 Many thanks in advance to those who read and (maybe) consider all this, regards
 
 Jose Luis Ozzano  ([EMAIL PROTECTED])
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://www.postgresql.org/search.mpl
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard 

Re: [HACKERS] Toast, Text, blob bytea Huh?

2001-08-24 Thread Bruce Momjian

 No, that's just a coincidence.  The reason that TOAST limits fields to
 1Gb is that the high-order two bits of the varlena length word were
 commandeered as TOAST state indicators.  There are now only thirty bits
 available to represent the length of a variable-length Datum; hence the
 hard limit on field width is 1Gb.
 
 I'd think that the practical limit is quite a bit less than that, at
 least until we devise an API that lets you read and write toasted values
 in sections.

Yes, passing around multi-gigabytes memory chunks in a process is pretty
slow.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



[OT] Re: [HACKERS] User locks code

2001-08-24 Thread Serguei Mokhov

- Original Message - 
From: Bruce Momjian [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 10:42 AM


  I really think that mixing licences inside one program is bad, if not
  for 
  any other reason then for confusing people and making them have
  discussions 
  like this.
 
 Yes, the weird part is that the BSD license is so lax (don't sue us)
 that it is the addition of the GPL that changes the affect of the
 license.  If you added a BSD license to a GPL'ed piece of code, the
 effect would be near zero.

Sorry for asking this off-topic question, but I'm not sure I completely
understand this license issue... How GPL, LGPL, and BSD are conflicting
and or overlap, so that it causes such problems? AFAIK with the GPL
one has to ship the source code along with the product every time, but
under BSD it can be shipped without the source (that's why M$ doesn't attack
BSD as it does for GPL), and why the PostgreSQL project originally is being
released under the BSD-like license? Just curious...

Serguei



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[OT] Re: [HACKERS] User locks code

2001-08-24 Thread Serguei Mokhov

- Original Message - 
From: Bruce Momjian [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 10:42 AM


  I really think that mixing licences inside one program is bad, if not
  for 
  any other reason then for confusing people and making them have
  discussions 
  like this.
 
 Yes, the weird part is that the BSD license is so lax (don't sue us)
 that it is the addition of the GPL that changes the affect of the
 license.  If you added a BSD license to a GPL'ed piece of code, the
 effect would be near zero.

Sorry for asking this off-topic question, but I'm not sure I completely
understand this license issue... How GPL, LGPL, and BSD are conflicting
and or overlap, so that it causes such problems? AFAIK with the GPL
one has to ship the source code along with the product every time, but
under BSD it can be shipped without the source (that's why M$ doesn't attack
BSD as it does for GPL), and why the PostgreSQL project originally is being
released under the BSD-like license? Just curious...

Serguei



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [HACKERS] CURRENT OF cursor without OIDs

2001-08-24 Thread Mikheev, Vadim
 Oops I'm referring to client side cursors in our ODBC
 driver. We have no cross-transaction cursors yet though
 I'd like to see a backend cross-transaction cursor also.

Ops, sorry.
BTW, what are "visibility" rules for ODBC cross-tx cursor?
No Repeatable reads, no Serializability?
Do you hold some locks over table while cursor opened
(I noticed session locking in lmgr recently)?
Could ODBC cross-tx cursors be implemented using server
cross-tx cursors?

  I think we'll be able to restore old tid along with other tuple
  data from rollback segments, so I don't see any problem from
  osmgr...
 
 How do we detect the change of tuples from clients ?

What version of tuple client must see? New one?

 TIDs are invariant under osmgr. xmin is about to be
 unreliable for the purpose.

Seems I have to learn more about ODBC cross-tx cursors -:(
Anyway, *MSQL*, Oracle, Informix - all have osmgr. Do they
have cross-tx cursors in their ODBC drivers?

Vadim

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [HACKERS] ERP Applications on Postgresql -- ERPTool

2001-08-24 Thread Amandeep Singh

Hi Justin, Andrew,
I am making doing some essential face lift on it right
now, Once I am done I will send you the URL.

Amandeep
--- Justin Clift [EMAIL PROTECTED] wrote:
 Hi Amandeep,
 
 Do you have an URL for your application?
 
 :-)
 
 Regards and best wishes,
 
 Justin Clift
 
 
 Amandeep Singh wrote:
  
  Hi Everyone,
  Just wanted to let you all know that I have been
  working on development of financial applications
  using,java, javascript, javabeans and of course
  PostgreSQL database for past one year. I was out
 of
  touch with the community for this time and it
 kinda
  feels like as if I am coming out trenches. I heard
 and
  read interviews by Geoff Davidson and Bruce
 Momijam.
  In Geoff Davidson's interview there is talk about
 need
  of Applications like Oracle or many other
 commercial
  vendors have.
  Well I cannot say that my Application , which I
 fondly
  call ERPTool , can fill the need but ,it definitly
 can
  provide a very good starting point.
  
  Right now the modules it has are,
  Order Entry,
  Purchasing,
  Receivables,
  Payables,
  GL (Basic)
  Inventory (Very Basic)
  There are three main points that set it apart from
 the
  commercial applications.
  1.It is built using mostly free/open source
 software.
  2.It is highly and very rapidly customizable.
  3.It needs nothing more than a browser on client
 side
  to function.
  While it serves all the basic needs for a small
  company
  it can very rapidly expanded by adding new forms
 and
  functionality to suit the needs of an enterprise
 of
  any size. I would like to colloborate with
 postgresql
  and other open source communities to make one of
 the
  most versetile and dependable product using open
  source code.
  Please let me know if this can be done.
  
  Regards
  Amandeep Singh
  
  __
  Do You Yahoo!?
  Make international calls for as low as $.04/minute
 with Yahoo! Messenger
  http://phonecard.yahoo.com/
  
  ---(end of
 broadcast)---
  TIP 5: Have you checked our extensive FAQ?
  
 
 http://www.postgresql.org/users-lounge/docs/faq.html
 
 -- 
 My grandfather once told me that there are two
 kinds of people: those
 who work and those who take the credit. He told me
 to try to be in the
 first group; there was less competition there.
- Indira Gandhi


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



RE: [HACKERS] User locks code

2001-08-24 Thread Mikheev, Vadim

  Besides, anyone who actually wanted to use the userlock
  code would need only to write their own wrapper functions
  to get around the GPL license.
 
 This is a part of copyright law that eludes me - can i write
 a replacement function for something so simple that it can
 essentially be done in one way only (like incrementing a
 value by one) ?

Yes, this is what bothers me in user-lock case.
On the other hand contrib/user-lock' licence
cannot cover usage of LOCKTAG and LockAcquire
(because of this code is from backend) and this is
all what used in user_lock funcs. So, that licence
is unenforceable to everything... except of func names -:)

Vadim

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [HACKERS] User locks code

2001-08-24 Thread Bruce Momjian

 Bruce Momjian [EMAIL PROTECTED] writes:
 
   Tom Lane wrote:

I definitely agree with Vadim here: it's fairly silly that the
contrib userlock code is GPL'd, when it consists only of a few dozen
lines of wrapper for the real functionality that's in the main backend.
   
  
  I was incorrect in something I said to Vadim.  I said stored procedures
  would have to be released if linked against a GPL'ed backend. 
 
 Only to those you actually distribute this product to. If you're using
 it internally, you have no obligations to release it to anyone, to
 give one example.

Yes, I was speaking only of selling the software.  Good point.
 
-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



RE: [OT] Re: [HACKERS] User locks code

2001-08-24 Thread Mikheev, Vadim

 Because the code we got from Berkeley was BSD licensed, we
 can't change it, and because many of us like the BSD license
 better because we don't want to require them to release the
 source code, we just want them to use PostgreSQL. And we
 think they will release the source code eventually anyway.

And we think that no one will try to fork and commercialize
server code - todays, when SAP  InterBase open their DB
code, it seems as no-brain.

Vadim

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] User locks code

2001-08-24 Thread Oliver Elphick

Bruce Momjian wrote:
...
  Yes, that is probably it.  The GPL doesn't give anything to users, it
  takes some control away from users and gives it to the author of the
  code.

Correction - it takes away from the *distributor* of binaries the right to
give users fewer rights than he has.  If he doesn't distribute, he can do what 
he likes.

I'm sorry to be pedantic!  We need to be clear about that because Microsoft
are trying to spread FUD about it. 


From the project's point of view, it is probably a bad idea to accept code
under any licence other than BSD.  That can only lead to confusion among
users and distributors alike and may led to inadvertent violation of the
GPL by those who don't notice that it is has been used.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 I saw in the night visions, and, behold, one like the 
  Son of man came with the clouds of heaven, and came to
  the Ancient of days, and they brought him near before 
  him. And there was given him dominion, and glory, and 
  a kingdom, that all people, nations, and languages, 
  should serve him; his dominion is an everlasting 
  dominion, which shall not pass away, and his kingdom 
  that which shall not be destroyed. 
Daniel 7:13,14



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] User locks code

2001-08-24 Thread Ross J. Reedstrom

Uh, guys? The last thing I can find that Massimo says about the license
is this, from Sunday:

On Sun, Aug 19, 2001 at 11:15:54PM +0200, Massimo Dal Zotto wrote:
 
 Regarding the licencing of the code, I always release my code under GPL,
 which is the licence I prefer, but my code in the backend is obviously
 released under the original postgres licence. Since the module is loaded
 dynamically and not linked into the backend I don't see a problem here.
 If the licence becomes a problem I can easily change it, but I prefer the
 GPL if possible.
 

So, rather than going over everone's IANAL opinons about mixing
licenses, let's just let Massimo know that it'd just be a lot easier to
PostgreSQL/BSD license the whole thing, if he doesn't mind too much.

Ross

On Fri, Aug 24, 2001 at 10:42:48AM -0400, Bruce Momjian wrote:
I'm not sure who wrote this, Bruce trimmed the attribution
  Maybe it makes Massimo feel good ? It seems a worhty reason to me, as 
  he has contributed a lot of useful stuff over the time.
 
 Yes, that is probably it.  The GPL doesn't give anything to users, it
 takes some control away from users and gives it to the author of the
 code.
 

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



RE: [HACKERS] User locks code

2001-08-24 Thread Mikheev, Vadim

 So, rather than going over everone's IANAL opinons about mixing
 licenses, let's just let Massimo know that it'd just be a lot
 easier to PostgreSQL/BSD license the whole thing, if he doesn't
 mind too much.

Yes, it would be better.

Vadim

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] PATCH proposed with new features for CREATE TABLE

2001-08-24 Thread Stephan Szabo

On Fri, 24 Aug 2001, Bruce Momjian wrote:

 Can someone comment on this?

I sent him some concerns I had (including the fact that we
can't rename ON UPDATE since it's in the spec).  I'm working
through some more behavioral concerns I have, but I haven't
decided whether or not they're actually problems.  The patch
is pretty long and I haven't had a chance to look through it,
but my guess is that it won't apply entirely cleanly since 
there's been work done on alot of the sections it touches
since 7.0.x, but it probably shouldn't be too hard to beat
it into submission.


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [OT] [HACKERS] Re: List response time...

2001-08-24 Thread David Ford

Vince Vielhaber wrote:

On Fri, 24 Aug 2001, David Ford wrote:

It's all in the configuration.  I slam mails around dozens of machines
in seconds using sendmail and I process a lot of mail.


So have you patched for the latest of the many sendmail root exploits?

Vince.


I keep my systems up to latest and greatest that passes the lab. 
 Currently 8.12.0b19.  Since I keep things up to date and read the 
documentation... I tend to avoid most security problems.  Do keep in 
mind that most of the latest issues are symbiotic problems due to issues 
found in LK capabilities.

-d



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Re: [JDBC] New backend functions?

2001-08-24 Thread Ned Wolpert

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sounds like there aren't objections to my requested function,
get_last_returned_oid().  I'm going to work on the function call for
postgres this weekend.  

Purpose: Retain the last oid returned (if any) in a variable
 associated with the connection on the backend, so the next request to
 the backend has access to it.  It will be set when an insert or update
 is completed, so preparedStatements and stored procedures can use it.

If I'm able to provide patches by Monday, and if it works fine (without causing
general meltdowns :-)  would this be able to be in the 7.2 beta, or will it
need to be part of 7.3?  (The answer to this question will help me decide on
how much time I should spend on it this weekend.)


 On 23-Aug-2001 Tom Lane wrote:
 I assume this OID would be associated with a client connection.
 Is this going to work with client side connection pooling?
 
 Good point.  Will this really get around the original poster's problem??
 
 It must.  If transactions are on, any pooling mechanism needs to continue to
 use that connection for the client unti the transaction is done. (Most
 require
 the client to either tell the pool manager the connection is no longer need,
 via a close() call, or a pool-manager specific call, precisely because the
 client needs it to complete the transaction.
 
 My feeling is that if this is a problem, then this method call may need to be
 limited to the transaction context, but I hope that this is not the case.
 Most pool managers (and I'm only speaking about Java here) require some
 activity on the client to give up the connection, either directly or
 indirectly. 


Virtually, 
Ned Wolpert [EMAIL PROTECTED]

D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7hpkHiysnOdCML0URAhPnAJ9z/aWCR88kk60WmZJRalusOYm78ACeLPl7
jRlgOPLcuPd7JCsJy5JomUA=
=ruJB
-END PGP SIGNATURE-

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [HACKERS] Toast, Text, blob bytea Huh?

2001-08-24 Thread Jan Wieck

Peter T Mount wrote:
 Quoting Joe Conway [EMAIL PROTECTED]:

  TEXT is a datatype which stores character data of unspecified length (up
  to
  the max value of a 4 byte integer in length, although I've seen
  comments
  indicating that the practical limit is closer to 1 GB -- not sure why).

 It may be something to do with the 1Gb splitting of the physical files
 representing a table... Unless it changed recently, a table was split over
 multiple files at the 1Gb mark.

No,  it's  because  the  upper  two bits of the variable size
field are used as flags.

But in practice there are other limits that force you to keep
the objects you throw into text or bytea fields alot smaller.
When your INSERT query is received,  parsed,  planned  and  a
heap  tuple  created,  there are at least four copies of that
object in the backends memory. How much virtual  memory  does
your OS support for one single process?

And  by  the  way,  TOAST is not only used for character data
types.  All variable size data types in the base  system  are
toastable. Well, arrays might be considered sort of pop-tarts
here, but anyway, they get toasted.


Jan

--

#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[HACKERS] Re: [PATCHES] encoding names

2001-08-24 Thread Peter Eisentraut

Tatsuo Ishii writes:

  Maybe we should not touch getdatabaseencoding() right now, given that the
  names we currently use are apparently almost correct anyway and
  considering the pain it creates to alter them, and instead implement the
  information schema views in the future?

 I thought schema stuffs would be introduced in 7.2 but apparently it
 would not happen...

True, but right now we'd have to do rather elaborate changes just to
switch a couple of names to more correct versions.  Accepting them as
input is good, but maybe we should hold back on the output part a bit
until we can do it correctly.

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[HACKERS] Does the oid column have an implicit index on it?

2001-08-24 Thread Rachit Siamwalla


This may sound like a stupid question, and i apologize if it is, but I
couldn't find the answer in any documentation.

Every table has a implicit column oid. Does this column have an index on it?
I assume not, and I am putting an index on it anyway.

The real problem is that I have a table like the following:

create table foo (
   time timestamp DEFAULT CURRENT_TIMESTAMP,
   ...
)

I insert an row, and I want to get the timestamp of that row. So i do a
select on oid. I want an index. Does one already exist?

-rchit

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Does the oid column have an implicit index on it?

2001-08-24 Thread Tom Lane

Rachit Siamwalla [EMAIL PROTECTED] writes:
 Every table has a implicit column oid. Does this column have an index on it?

No, you must create an index if you want one.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Re: [PATCHES] Patch to include PAM support...

2001-08-24 Thread Dominic J. Eidson

On Sat, 25 Aug 2001, Tom Lane wrote:

 Dominic J. Eidson [EMAIL PROTECTED] writes:
  Could we change the PAM code so that it tries to run the PAM auth cycle
  immediately on receipt of a connection request?  If it gets a callback
  for a password, it abandons the PAM conversation, sends off a password
  request packet, and then tries again when the password comes back.
 
  I am attempting to do this in a way that's relatively elegant, and the
  code should get sent to -patches tomorrow sometime , after I've had time
  to do some testing.
 
 I think that the main objection to the original form of the PAM patch
 was that it would lock up the postmaster until the client responded.
 However, that is *not* a concern any longer, since the current code
 forks first and authenticates after.  Accordingly, you shouldn't be
 complexifying the PAM code to avoid waits.

The complexity comes from getting PAM to only send a password request to
the frontend if the PAM authentication needs a password, and not
otherwise. As I'd mentioned to Bruce before, I think PAM authentication
should be treated like password authentication - if there's a potential
that a password might be required, request a password, whether it's needed
or not. But PeterE asked that it only request a password if a password is
needed, so I'm fighting to get it to do exactly that.

(I already knew auth is done in the backend, and therefor can be blocking :)


-- 
Dominic J. Eidson
Baruk Khazad! Khazad ai-menu! - Gimli
---
http://www.the-infinite.org/  http://www.the-infinite.org/~dominic/


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Re: [PATCHES] Patch to include PAM support...

2001-08-24 Thread Tom Lane

Dominic J. Eidson [EMAIL PROTECTED] writes:
 Could we change the PAM code so that it tries to run the PAM auth cycle
 immediately on receipt of a connection request?  If it gets a callback
 for a password, it abandons the PAM conversation, sends off a password
 request packet, and then tries again when the password comes back.

 I am attempting to do this in a way that's relatively elegant, and the
 code should get sent to -patches tomorrow sometime , after I've had time
 to do some testing.

I think that the main objection to the original form of the PAM patch
was that it would lock up the postmaster until the client responded.
However, that is *not* a concern any longer, since the current code
forks first and authenticates after.  Accordingly, you shouldn't be
complexifying the PAM code to avoid waits.

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[HACKERS] MD5 for ODBC

2001-08-24 Thread Bruce Momjian

I am going to add MD5 authentication to ODBC.  What is a good way to get
backend/libpq/md5.c into odbc for compilation.  I know people want the
ODBC to be stand-alone.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster