Fwd: [HACKERS] int type problem in 7.3

2002-10-02 Thread Mario Weilguni

Ok, I checked this again. Up until 7.2, it was possible to compare an empty string to 
a number, and it worked::
e.g.: select * from mytable where int4id='' 
worked fine, but delivered no result. This is exactly what Oracle did here,
a comparison like this does not work:

SQL select * from re_eintraege where id='foobar';
select * from re_eintraege where id='foobar'
*
ERROR at line 1:
ORA-01722: invalid number

But oracle accepts this one:
SQL select * from re_eintraege where id='';

no rows selected

because oracle treats the empty string as NULL and effectivly checks:
select * from re_eintraege where id is null;

I think 7.3 is doing right here and I've to fix all queries (*sigh*), but oracle 
compatibilty is lost here. 

The bad news for me is, rewriting the queries won't help here, because I'll use 
indexing when I rewrite my queries to:
select 1 from mytable where id::text=''

Regards,
Mario Weilguni

--  Weitergeleitete Nachricht  --

Subject: [HACKERS] int type problem in 7.3
Date: Wed, 2 Oct 2002 08:31:45 +0200
From: Mario Weilguni [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

It seems queries like:
select ... from table where id='' (an empty string) do not work anymore, it
 worked up to 7.2. This will make migration to 7.3 quite difficult for some
 application, especially for oracle applications. Would'nt it be better to
 evaluate such expressions to false.

Regards,
Mario Weilguni

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

---


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

http://archives.postgresql.org



Re: [HACKERS] Improving speed of copy

2002-10-02 Thread Mark Kirkwood

Have you tried this with Oracle or similar commercial database?


I have timed COPY/LOAD times for Postgresql/Mysql/Oracle/Db2 -

the rough comparison is :

Db2 and Mysql fastest (Db2 slightly faster)
Oracle approx twice as slow as Db2
Postgresql about 3.5-4 times slower than Db2

However Postgresql can sometimes create indexes faster than Mysql  
so that the total time of COPY + CREATE INDEX can be smaller for 
Postgresql than Mysql.

Oracle an Db2 seemed similarish to Postgresql with respect to CREATE INDEX


regards

Mark



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



[HACKERS] Please, applay patch to current CVS

2002-10-02 Thread Teodor Sigaev

This is small README fix for contrib/intarray. Thank you.
-- 
Teodor Sigaev
[EMAIL PROTECTED]




intarray_patch.gz
Description: application/gzip


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



Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Jan Wieck

Tom Lane wrote:
 
 What is the reason for maintaining separate rscale and dscale values in
 numeric variables?
 
 I am finding that this arrangement leads to some odd results, for
 example this:
 
 regression=# select (exp(ln(2.0)) - 2.0);
   ?column?
 -
  -0.
 (1 row)
 
 regression=# select (exp(ln(2.0)) - 2.0) * 10;
   ?column?
 -
  -0.0010
 (1 row)
 
 The difference between rscale and dscale allows some hidden digits to
 be carried along in an expression result, and then possibly exposed
 later.  This seems pretty nonintuitive for an allegedly exact
 calculational datatype.  ISTM the policy should be what you see is what
 you get - no hidden digits.  That would mean there's no need for
 separating rscale and dscale, so I'm wondering why they were put in
 to begin with.

You need to carry around a decent number of digits when you divide
already. Exposing them in a manner that numericcol(15,2) / 3.0 all of
the sudden displays 16 or more digits isn't much more intuitive. But
carrying around only 2 here leads to nonintuitively fuzzy results on the
other hand.

It only applies to division and higher functions, and these are not
exact if you calculate the result and represent it decimal. They never
have been.

So to answer your question, they are there to make the NUMERIC datatype
useful for non-exact stuff too. You can expect an exact result where an
exact representation in decimal can be expected. Where this is not the
case, you get a good approximation.


Jan

-- 

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

---(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] some more minor incompatibilties 7.2 - 7.3

2002-10-02 Thread Tom Lane

Mario Weilguni [EMAIL PROTECTED] writes:
 So timespan is no longer supported I guess, but reltime will work as
 well. Is there a compatibility or migration section in the
 documentation that might help users to handle this?

The release notes are still in a pretty crude state, but they do mention
this issue:

: The last vestiges of support for type names datetime and timespan are
: gone; use timestamp and interval instead

See
http://developer.postgresql.org/docs/postgres/release.html

regards, tom lane

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

http://archives.postgresql.org



Re: Fwd: [HACKERS] int type problem in 7.3

2002-10-02 Thread Tom Lane

Mario Weilguni [EMAIL PROTECTED] writes:
 Ok, I checked this again. Up until 7.2, it was possible to compare an empty string 
to a number, and it worked::
 e.g.: select * from mytable where int4id='' 
 worked fine, but delivered no result.

No, that was not what it did: in reality, the '' was silently taken as
zero, and would match rows containing 0.  That seems a very error-prone
behavior (not to say a flat-out bug) to me.

 But oracle accepts this one:
 SQL select * from re_eintraege where id='';
 no rows selected
 because oracle treats the empty string as NULL

Oracle does that for string data, but it doesn't do it for numerics
does it?  In any case, that behavior is surely non-compliant with
the SQL spec.

We were not compatible with Oracle on this behavior before, and I'm
not very inclined to become so now.

regards, tom lane

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



Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Tom Lane

Jan Wieck [EMAIL PROTECTED] writes:
 Tom Lane wrote:
 What is the reason for maintaining separate rscale and dscale values in
 numeric variables?

 You need to carry around a decent number of digits when you divide
 already. Exposing them in a manner that numericcol(15,2) / 3.0 all of
 the sudden displays 16 or more digits isn't much more intuitive. But
 carrying around only 2 here leads to nonintuitively fuzzy results on the
 other hand.

Certainly you need extra guard digits while you do the calculation.
What I'm wondering is why the delivered result would have hidden digits
in it.  If they're accurate, why not show them?  If they're not accurate
(which they're not, at least in the case I showed) why is it a good idea
to let them escape?

regards, tom lane

---(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: Fwd: [HACKERS] int type problem in 7.3

2002-10-02 Thread Mario Weilguni

 But oracle accepts this one:
 SQL select * from re_eintraege where id='';
 no rows selected
 because oracle treats the empty string as NULL

Oracle does that for string data, but it doesn't do it for numerics
does it?  In any case, that behavior is surely non-compliant with
the SQL spec.

No, oracle accepts this and works correctly with number() datatype. 
However I did not know that in postgres '' was treated as '0'.

Regards,
Mario Weilguni



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

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



Re: [HACKERS] pg_dump and large files - is this a problem?

2002-10-02 Thread Philip Warner

At 09:42 AM 2/10/2002 +1000, Philip Warner wrote:
Yes, and do the peripheral stuff to support old archives etc.

Does silence mean people agree? Does it also mean someone is doing this 
(eg. whoever did the off_t support)? Or does it mean somebody else needs to 
do it?





Philip Warner| __---_
Albatross Consulting Pty. Ltd.   |/   -  \
(A.B.N. 75 008 659 498)  |  /()   __---_
Tel: (+61) 0500 83 82 81 | _  \
Fax: (+61) 0500 83 82 82 | ___ |
Http://www.rhyme.com.au  |/   \|
  |----
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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



Re: Fwd: [HACKERS] int type problem in 7.3

2002-10-02 Thread Nigel J. Andrews

On Wed, 2 Oct 2002, Mario Weilguni wrote:

  But oracle accepts this one:
  SQL select * from re_eintraege where id='';
  no rows selected
  because oracle treats the empty string as NULL
 
 Oracle does that for string data, but it doesn't do it for numerics
 does it?  In any case, that behavior is surely non-compliant with
 the SQL spec.
 
 No, oracle accepts this and works correctly with number() datatype. 
 However I did not know that in postgres '' was treated as '0'.

So what would I be selecting in Oracle if I did:

SELECT * FROM mytable WHERE myfield = ''

where myfield is of VARCHAR type?

If you want to select on NULL, whether or not you think the database is more
intelligent than you in determining what you really want, then write your query
to select on NULL. The chances are your database is not actually a mind reader.


-- 
Nigel J. Andrews


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



Re: [HACKERS] pg_dump and large files - is this a problem?

2002-10-02 Thread Tom Lane

Philip Warner [EMAIL PROTECTED] writes:
 At 09:42 AM 2/10/2002 +1000, Philip Warner wrote:
 Yes, and do the peripheral stuff to support old archives etc.

 Does silence mean people agree? Does it also mean someone is doing this 
 (eg. whoever did the off_t support)? Or does it mean somebody else needs to 
 do it?

It needs to get done; AFAIK no one has stepped up to do it.  Do you want
to?

regards, tom lane

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



Re: [HACKERS] Purpose of rscale/dscale in NUMERIC?

2002-10-02 Thread Jan Wieck

Tom Lane wrote:
 
 Jan Wieck [EMAIL PROTECTED] writes:
  Tom Lane wrote:
  What is the reason for maintaining separate rscale and dscale values in
  numeric variables?
 
  You need to carry around a decent number of digits when you divide
  already. Exposing them in a manner that numericcol(15,2) / 3.0 all of
  the sudden displays 16 or more digits isn't much more intuitive. But
  carrying around only 2 here leads to nonintuitively fuzzy results on the
  other hand.
 
 Certainly you need extra guard digits while you do the calculation.
 What I'm wondering is why the delivered result would have hidden digits
 in it.  If they're accurate, why not show them?  If they're not accurate
 (which they're not, at least in the case I showed) why is it a good idea
 to let them escape?

So we need them in the calculation, and if it's a nested tree of
function calls, they have to travel around too. What do you think is a
good place to kill these critters then?


Jan

-- 

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

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

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



[HACKERS] Release of 7.2.3

2002-10-02 Thread Michael Paesold

This document:
http://developer.postgresql.org/docs/postgres/release-7-2-3.html

mentions a release date of 2002-10-01 for version 7.2.3.

It isn't on the main website, tough, is it?

Regards,
Michael


---(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] Release of 7.2.3

2002-10-02 Thread Vince Vielhaber

On Wed, 2 Oct 2002, Michael Paesold wrote:

 This document:
 http://developer.postgresql.org/docs/postgres/release-7-2-3.html

 mentions a release date of 2002-10-01 for version 7.2.3.

 It isn't on the main website, tough, is it?

The documentation on the developers website is not necessarily
accurate - especially when it comes to dates.  Documentation is
typically one of the last things finalized and is in a constant
state of change.  That's one of the reasons why the developer
site is separated from the main website - people read things on
the developer site and think they're 100% accurate.  Nothing is
final until it's announced on the announce mailing list and/or
the main website.

Vince.
-- 
==
Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
  http://www.camping-usa.com  http://www.cloudninegifts.com
   http://www.meanstreamradio.com   http://www.unknown-artists.com
==




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



[HACKERS] small patch for vacuumlo

2002-10-02 Thread Mario Weilguni

It's just a cosmetic change, fixes the help screen. Should be applied in 
/contrib/vacuumlo

Regards,
Mario Weilguni


--- ../vacuumlo.c   Thu Sep  5 23:19:13 2002
+++ vacuumlo.c  Wed Oct  2 18:03:29 2002
@@ -383,7 +383,6 @@
fprintf(stdout,   -U username\tUsername to connect as\n);
fprintf(stdout,   -W\t\tPrompt for password\n);
fprintf(stdout,   -h hostname\tDatabase server host\n);
-   fprintf(stdout,   -p port\tDatabase server port\n);
fprintf(stdout,   -p port\tDatabase server port\n\n);
 }





---(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: Fwd: [HACKERS] int type problem in 7.3

2002-10-02 Thread scott.marlowe

Have you looked at transform_null_equals in the postgresql.conf file to 
see if turning that on makes this work like oracle?

On Wed, 2 Oct 2002, Mario Weilguni wrote:

 Ok, I checked this again. Up until 7.2, it was possible to compare an empty string 
to a number, and it worked::
 e.g.: select * from mytable where int4id='' 
 worked fine, but delivered no result. This is exactly what Oracle did here,
 a comparison like this does not work:
 
 SQL select * from re_eintraege where id='foobar';
 select * from re_eintraege where id='foobar'
 *
 ERROR at line 1:
 ORA-01722: invalid number
 
 But oracle accepts this one:
 SQL select * from re_eintraege where id='';
 
 no rows selected
 
 because oracle treats the empty string as NULL and effectivly checks:
 select * from re_eintraege where id is null;
 
 I think 7.3 is doing right here and I've to fix all queries (*sigh*), but oracle 
compatibilty is lost here. 
 
 The bad news for me is, rewriting the queries won't help here, because I'll use 
indexing when I rewrite my queries to:
 select 1 from mytable where id::text=''
 
 Regards,
   Mario Weilguni
 
 --  Weitergeleitete Nachricht  --
 
 Subject: [HACKERS] int type problem in 7.3
 Date: Wed, 2 Oct 2002 08:31:45 +0200
 From: Mario Weilguni [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 
 It seems queries like:
 select ... from table where id='' (an empty string) do not work anymore, it
  worked up to 7.2. This will make migration to 7.3 quite difficult for some
  application, especially for oracle applications. Would'nt it be better to
  evaluate such expressions to false.
 
 Regards,
   Mario Weilguni
 
 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
 
 ---
 
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 


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



[HACKERS] Diff for reindexdb

2002-10-02 Thread Mario Weilguni

This small patch adds a Makefile for /contrib/reindexdb/ and renames the README to 
README.reindexdb. 

Regards,
Mario Weilguni


diff -Nur postgresql-7.3b2.orig/contrib/reindexdb/Makefile postgresql-7.3b2/contrib/reindexdb/Makefile
--- postgresql-7.3b2.orig/contrib/reindexdb/Makefile	1970-01-01 01:00:00.0 +0100
+++ postgresql-7.3b2/contrib/reindexdb/Makefile	2002-10-02 18:21:44.0 +0200
@@ -0,0 +1,12 @@
+subdir = contrib/reindexdb
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+
+SCRIPTS = reindexdb
+
+PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_LIBS = $(libpq)
+
+DOCS = README.reindexdb
+
+include $(top_srcdir)/contrib/contrib-global.mk
diff -Nur postgresql-7.3b2.orig/contrib/reindexdb/README postgresql-7.3b2/contrib/reindexdb/README
--- postgresql-7.3b2.orig/contrib/reindexdb/README	2002-06-23 05:51:55.0 +0200
+++ postgresql-7.3b2/contrib/reindexdb/README	1970-01-01 01:00:00.0 +0100
@@ -1,9 +0,0 @@
-
-  reindexdb
-
-Indexes are known to grow over time.  Being as vacuum doesn't slow or
-clean up after this growth, and there is no command to reindex all tables
-in a database, it made sense to construct this utility to do it.
-
-Shaun Thomas [EMAIL PROTECTED]
-
diff -Nur postgresql-7.3b2.orig/contrib/reindexdb/README.reindexdb postgresql-7.3b2/contrib/reindexdb/README.reindexdb
--- postgresql-7.3b2.orig/contrib/reindexdb/README.reindexdb	1970-01-01 01:00:00.0 +0100
+++ postgresql-7.3b2/contrib/reindexdb/README.reindexdb	2002-06-23 05:51:55.0 +0200
@@ -0,0 +1,9 @@
+
+  reindexdb
+
+Indexes are known to grow over time.  Being as vacuum doesn't slow or
+clean up after this growth, and there is no command to reindex all tables
+in a database, it made sense to construct this utility to do it.
+
+Shaun Thomas [EMAIL PROTECTED]
+



---(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] Correlation in cost_index()

2002-10-02 Thread Manfred Koizar

You all know this FAQ: Why does Postgres not use my index?  Half of
the time this problem can easily be solved by casting a literal to the
type of the respective column;  this is not my topic here.

In many other cases it turns out that the planner over-estimates the
cost of an index scan.  Sometimes this can be worked around by
lowering random_page_cost.  Of course, that's a hack that is quite
unrelated to the real problem.  I strongly agree ;-)

AFAICS (part of) the real problem is in costsize.c:cost_index() where
IO_cost is calculated from min_IO_cost, pages_fetched,
random_page_cost, and indexCorrelation.  The current implementation
uses indexCorrelation^2 to interpolate between min_IO_cost and
max_IO_cost, which IMHO gives results that are too close to
max_IO_cost.  This conjecture is supported by the fact, that often
actual run times are much lower than estimated, when seqscans are
disabled.

So we have to find a cost function, so that

  . min_IO_cost = cost = max_IO_cost
 for  -1 = indexCorrelation = 1
  . cost -- min_IO_cost  for  indexCorrelation -- +/- 1
  . cost -- max_IO_cost  for  indexCorrelation -- 0
  . cost tends more towards min_IO_cost than current implementation

After playing around a bit I propose three functions satisfying above
conditions.  All proposals use absC = abs(indexCorrelation).

Proposal 1:  Use absC for interpolation.

IO_cost = absC * min_IO_cost + (1 - absC) * max_IO_cost;


Proposal 2:  First calculate estimates for numbers of pages and cost
per page, then multiply the results.

estPages = absC * minPages + (1 - absC) * maxPages;
estPCost = absC * 1 + (1 - absC) * random_page_cost;
  /*  ^
  sequential_page_cost */
IO_cost = estPages * estPCost;


Proposal 3:  Interpolate geometrically, using absC.

IO-cost = exp(   absC* ln(min_IO_Cost) +
  (1 - absC) * ln(max_IO_cost));


Here are some numbers for
seq_page_cost = 1   (constant)
random_page_cost = 4  (GUC)
minPages = 61
maxPages = 1440

corr  current  p1p2p3
0 5760.00   5760.00   5760.00   5760.00
0.1   5703.01   5190.10   4817.77   3655.22
0.2   5532.04   4620.20   3958.28   2319.55
0.3   5247.09   4050.30   3181.53   1471.96
0.4   4848.16   3480.40   2487.52934.08
0.5   4335.25   2910.50   1876.25592.76
0.6   3708.36   2340.60   1347.72376.16
0.7   2967.49   1770.70901.93238.70
0.8   2112.64   1200.80538.88151.48
0.9   1143.81630.90258.57 96.13
0.95   616.65345.95149.44 76.57
0.99   174.41117.99 77.03 63.84
0.995  117.85 89.50 68.91 62.40
0.999   72.39 66.70 62.57 61.28
1   61.00 61.00 61.00 61.00

Another example for
seq_page_cost = 1   (constant)
random_page_cost = 10  (GUC)
minPages = 20
maxPages = 938.58

corr  current  p1p2p3
0 9385.79   9385.79   9385.79   9385.79
0.1   9292.14   8449.21   7705.17   5073.72
0.2   9011.16   7512.64   6189.88   2742.73
0.3   8542.87   6576.06   4839.94   1482.65
0.4   7887.27   5639.48   3655.34801.48
0.5   7044.35   4702.90   2636.09433.26
0.6   6014.11   3766.32   1782.19234.21
0.7   4796.56   2829.74   1093.62126.61
0.8   3391.69   1893.16570.40 68.44
0.9   1799.50956.58212.53 37.00
0.95   933.16488.29 95.60 27.20
0.99   206.38113.66 31.81 21.27
0.995  113.42 66.83 25.70 20.62
0.999   38.72 29.37 21.11 20.12
1   20.00 20.00 20.00 20.00

(If you want to play around with your own numbers, I can send my OOo
spreadsheet privately or to the list.)

The second example shows that especially with proposal 3 we could
afford to set random_page_cost to a *higher* value, which in contrast
to previous recommendations seems to be appropriate, IIRC that
benchmark results posted here showed values of up to 60.

As nobody knows how each of these proposals performs in real life
under different conditions, I suggest to leave the current
implementation in, add all three algorithms, and supply a GUC variable
to select a cost function.

Comments?  Ideas?  Objections?

Servus
 Manfred

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



Re: [HACKERS] Correlation in cost_index()

2002-10-02 Thread scott.marlowe

On Wed, 2 Oct 2002, Manfred Koizar wrote:

 As nobody knows how each of these proposals performs in real life
 under different conditions, I suggest to leave the current
 implementation in, add all three algorithms, and supply a GUC variable
 to select a cost function.

I'd certainly be willing to do some testing on my own data with them.  
Gotta patch?  I've found that when the planner misses, sometimes it misses 
by HUGE amounts on large tables, and I have been running random page cost 
at 1 lately, as well as running cpu_index_cost at 1/10th the default 
setting to get good results.


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

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



[HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Curtis Faith

All,

I'd like to help work on some 7.4 features, however, since you've not seen
my name before, I'm obviously new to the list and the org.

I really like working on speed optimizations and rewrites. I have 15 years
experience with C++-based systems and databases,  and have worked on
commercial database engines (i.e. indexing and query execution systems), sql
execution and optimization, various lex and yacc based compilers and
parsers. I've generally been able to get code to perform as well or better
than competitive systems with similar functionality, and usually have been
able to beat other code by 3 to 10 X. My unix experience is reasonable but
I'm not an expert.

Any suggestions for where to start? I don't mind digging into very hairy
code or large problems. I'm willing to run the risk of a patch not being
accepted (for large changes) since I'll make sure whatever I do is well
known to those who will do the accept/deny and the approach approved of
ahead of time.

Since I'm new here, I'm thinking a problem that would not otherwise get
handled by the experienced group would be the best place to start. Where is
the system especially slow?

I've read the TODO's, and the last five months of the archives for this
list, so I have some general ideas.

I've also had a lot experience marketing to I.T. organizations so I'd be
happy to help out on the Product Marketing for PostgreSQL advocacy, i.e.
developing a marketing strategy, press releases, etc.

- Curtis

Curtis Faith
Principal
Galt Capital, LLP

--
Galt Capitalhttp://www.galtcapital.com
12 Wimmelskafts Gade
Post Office Box 7549   voice: 340.776.0144
Charlotte Amalie,  St. Thomasfax: 340.776.0244
United States Virgin Islands  00801 cell: 340.643.5368


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

http://archives.postgresql.org



Re: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Mike Benoit

I'm not a developer, but I know this item on the todo list has been a
magor pain in my side for quite a while:

# Make IN/NOT IN have similar performance to EXISTS/NOT EXISTS
[http://momjian.postgresql.org/cgi-bin/pgtodo?exists]

Any time I've attempted to use this feature, the query cost is in the
millions according to explain, which of course makes it useless to
even execute. :(

I have managed to work around this performance problem, but it sure
would be nice if PGSQL handled such cases better.

There are probably thousands of other todo items you could spend your
time on that would be more useful to more people, but this is just one
suggestion. :)


On Wed, 2002-10-02 at 13:13, Curtis Faith wrote:
 All,
 
 I'd like to help work on some 7.4 features, however, since you've not seen
 my name before, I'm obviously new to the list and the org.
 
 I really like working on speed optimizations and rewrites. I have 15 years
 experience with C++-based systems and databases,  and have worked on
 commercial database engines (i.e. indexing and query execution systems), sql
 execution and optimization, various lex and yacc based compilers and
 parsers. I've generally been able to get code to perform as well or better
 than competitive systems with similar functionality, and usually have been
 able to beat other code by 3 to 10 X. My unix experience is reasonable but
 I'm not an expert.
 
 Any suggestions for where to start? I don't mind digging into very hairy
 code or large problems. I'm willing to run the risk of a patch not being
 accepted (for large changes) since I'll make sure whatever I do is well
 known to those who will do the accept/deny and the approach approved of
 ahead of time.
 
 Since I'm new here, I'm thinking a problem that would not otherwise get
 handled by the experienced group would be the best place to start. Where is
 the system especially slow?
 
 I've read the TODO's, and the last five months of the archives for this
 list, so I have some general ideas.
 
 I've also had a lot experience marketing to I.T. organizations so I'd be
 happy to help out on the Product Marketing for PostgreSQL advocacy, i.e.
 developing a marketing strategy, press releases, etc.
 
 - Curtis
 
 Curtis Faith
 Principal
 Galt Capital, LLP
 
 --
 Galt Capitalhttp://www.galtcapital.com
 12 Wimmelskafts Gade
 Post Office Box 7549   voice: 340.776.0144
 Charlotte Amalie,  St. Thomasfax: 340.776.0244
 United States Virgin Islands  00801 cell: 340.643.5368
 
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 


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



Re: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Neil Conway

Curtis Faith [EMAIL PROTECTED] writes:
 I'd like to help work on some 7.4 features, however, since you've
 not seen my name before, I'm obviously new to the list and the org.

[...]

 Any suggestions for where to start?

Well, I'd suggest working on what you find interesting -- there is
room for improvement in just about every area of the system, so don't
let us dictate how you spend your free time.

That said, the code for hash indexes requires some *major* changes,
and AFAIK none of the core developers are planning on working on it
any time soon (and since the hash index could is somewhat isolated, it
might be a good place to start). There's also plenty of work remaining
to be done for replication -- the pgreplication project could use some
help. You could also improve PL/pgSQL -- there are a bunch of
relatively minor improvements that could be made. You could also try
implementing bitmap indexes, or improving GEQO (the genetic-algorithm
based query optimizer).

HTH,

Neil

-- 
Neil Conway [EMAIL PROTECTED] || PGP Key ID: DB3C29FC


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

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



Re: [HACKERS] Correlation in cost_index()

2002-10-02 Thread Tom Lane

Manfred Koizar [EMAIL PROTECTED] writes:
 AFAICS (part of) the real problem is in costsize.c:cost_index() where
 IO_cost is calculated from min_IO_cost, pages_fetched,
 random_page_cost, and indexCorrelation.  The current implementation
 uses indexCorrelation^2 to interpolate between min_IO_cost and
 max_IO_cost, which IMHO gives results that are too close to
 max_IO_cost.

The indexCorrelation^2 algorithm was only a quick hack with no theory
behind it :-(.  I've wanted to find some better method to put in there,
but have not had any time to research the problem.

 As nobody knows how each of these proposals performs in real life
 under different conditions, I suggest to leave the current
 implementation in, add all three algorithms, and supply a GUC variable
 to select a cost function.

I don't think it's really a good idea to expect users to pick among
multiple cost functions that *all* have no guiding theory behind them.
I'd prefer to see us find a better cost function and use it.  Has anyone
trawled the database literature on the subject?

regards, tom lane

---(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] Anyone want to assist with the translation of the Advocacy site?

2002-10-02 Thread Michael Paesold

Justin Clift [EMAIL PROTECTED] wrote:


 Hi Michael,

 Michael Paesold wrote:
 snip
  Hi Justin,
 
  I am from Austria, and I would like to help. I could provide a German
  translation. The Babelfish's translation is really funny. Machine
  translation is readable, but it is no advocacy. ;-) I do not really nead
an
  interface, but just tell me in what way you want the texts.

 Cool.  Could you deal with an OpenOffice Calc or M$ Excel file having
 the lines of English text in one column, and doing the German
 translation into a second column?

 That might be easiest, and will allow a cut-n-paste of the German
 version straight into the database backend.

 Sound workable to you?

Spreadsheet sounds great. I use M$.
Perhaps you can group the items in categories, at least navigation and text.
So I know where the text will be put on the website. The translation could
be different depending on how a word is used. E.g. it is quite common on
German websites to use the same English word Home for the main page; but
you would not use Home in a different context. The exceptable length of a
translation depends on the context, too.

Best Regards,
Michael Paesold



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

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



[HACKERS] v7.2.3 - tag'd, packaged ... need it checked ...

2002-10-02 Thread Marc G. Fournier


Looks good from my end, Peter, I pulled the same docs that I pulled for
v7.2.2, which I hope is okay?




---(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] Anyone want to assist with the translation of the

2002-10-02 Thread cbbrowne

Justin wrote:
 Hi Michael,
 Michael Paesold wrote:
 snip 
  Hi Justin,
  I am from Austria, and I would like to help. I could provide a German
  translation. The Babelfish's translation is really funny. Machine
  translation is readable, but it is no advocacy. ;-) I do not really nead an
  interface, but just tell me in what way you want the texts.
 
 Cool.  Could you deal with an OpenOffice Calc or M$ Excel file having
 the lines of English text in one column, and doing the German
 translation into a second column?

Isn't this, um, the sort of thing you might want to put into, um, a, um, 
database?
--
(concatenate 'string aa454 @freenet.carleton.ca)
http://cbbrowne.com/info/internet.html
you  can   obvioulsy understand what  i'm  saying.  you're just being
pendantic. -- [EMAIL PROTECTED]



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



Re: [HACKERS] Anyone want to assist with the translation of the Advocacy

2002-10-02 Thread Justin Clift

[EMAIL PROTECTED] wrote:
snip
  Cool.  Could you deal with an OpenOffice Calc or M$ Excel file having
  the lines of English text in one column, and doing the German
  translation into a second column?
 
 Isn't this, um, the sort of thing you might want to put into, um, a, um,
 database?

Sure is.  Are there any good options apart from?

a) Build an interface for people to translate through
b) Allow selected people to connect directly to the database

For the present b) is not an option as I don't have the needed access to
the postgresql.org database server to be able to adjust the pg_hba.conf
file, and a) Would take some decent time and effort to get up and
running.  A lot longer than cut and pasting into an Excel document then
back out again.  :-/

Regards and best wishes,

Justin Clift


 --
 (concatenate 'string aa454 @freenet.carleton.ca)
 http://cbbrowne.com/info/internet.html
 you  can   obvioulsy understand what  i'm  saying.  you're just being
 pendantic. -- [EMAIL PROTECTED]

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

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



FW: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Curtis Faith

Forgot to cc' the list.

-Original Message-
From: Curtis Faith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 10:59 PM
To: Tom Lane
Subject: RE: [HACKERS] Advice: Where could I be of help?


Tom,

Here are the things that I think look interesting:

1) Eliminate unchanged column indices:
Prevent index uniqueness checks when UPDATE does not modifying column

Small little task that will make a noticeable improvement. I've done this
before in a b* tree system, it had a huge impact. Should be pretty isolated.

2) Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
BY col DESC LIMIT 1 if appropriate index exists and WHERE clause
acceptable - This will probably be a little more involved but I've done this
exact optimization in a SQL system 6 or 7 years ago.

3) General cache and i/o optimization:

Use bitmaps to fetch heap pages in sequential order

Based on my reading of the emails in [performance] it appears to me that
there might be huge potential in the caching system. I've worked on these
caches and there are some very non-intuitive interactions between database
type access and file systems that I believe offer good potential for
improvement. I'm basing this assessment on the assumption that the sorts of
improvements discussed in the [performance] emails have not been added in
subsequent releases.

Where does the current code stand? How are we currently doing cache flushing
in general and for indices in particular?

4) General index improvements including:
Order duplicate index entries by tid for faster heap lookups
Add FILLFACTOR to btree index creation

I've done the first one before and fill factor is pretty easy, as well.

5) Bitmaps:
Implement a bitmap index:
Use bitmaps to combine existing indexes
I've done something similar, it looks pretty interesting.

6) Improve concurrency of hash indexes (Neil Conway)- Probably more
exploration than implementation and fairly isolated problem.

Based on past experience, from a bang-for-buck perspective, I'd probably do
this in the numerical order. What do you think? I know what I like and can
do but I don't really know enough about PostgreSQL's performance weaknesses
yet.

What are we getting killed on?

- Curtis

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tom Lane
Sent: Wednesday, October 02, 2002 6:55 PM
To: Curtis Faith
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] Advice: Where could I be of help?


Bruce Momjian [EMAIL PROTECTED] writes:
 I would read the developers corner stuff, the developers FAQ, pick a
 TODO item, and try a patch.  It's that simple.

Yup.  I'd also suggest starting with something relatively small and
localized (the nearby suggestion to fix IN/EXISTS, for example, is
probably not a good first project --- and anyway I was going to work
on that myself this month ;-)).

Neil Conway's thought of working on plpgsql seems a good one to me;
and as he says, there's lots of other possibilities.  What do you
find interesting in the TODO list?

regards, tom lane

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

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


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

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



Re: FW: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Jeff Davis

 Based on past experience, from a bang-for-buck perspective, I'd probably do
 this in the numerical order. What do you think? I know what I like and can
 do but I don't really know enough about PostgreSQL's performance weaknesses
 yet.

 What are we getting killed on?


I'm not a developer, but one thing I see come up occasionally around here are 
planner issues. Sometimes people get really hammered by the planner choices, 
and aren't provided a very good way to tune it. If you were able to eliminate 
some worst-case-scenario type situations, that would make the few people who 
are having problems very happy (I remember one thread in particular seemed 
nasty). If I remember correctly, some developers don't much like the idea of 
query hints, and I don't blame them, so you might want to run your ideas by 
them first.

Also, this kind of modification might require significant additions to the 
statistics system. The planner might be smart, but if it doesn't have any 
more information you might not be able to get any more out of it. Autovacuum 
might help with that as well (i.e. the info will be more up to date).

Regards,
Jeff Davis







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

http://archives.postgresql.org



Re: [HACKERS] v7.2.3 - tag'd, packaged ... need it checked ...

2002-10-02 Thread Tom Lane

Marc G. Fournier [EMAIL PROTECTED] writes:
 Looks good from my end, Peter, I pulled the same docs that I pulled for
 v7.2.2, which I hope is okay?

Sources look okay from here.  Didn't look at the built-docs files.

regards, tom lane

---(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] v7.2.3 - tag'd, packaged ... need it checked ...

2002-10-02 Thread Lamar Owen

On Wednesday 02 October 2002 11:52 pm, Tom Lane wrote:
 Marc G. Fournier [EMAIL PROTECTED] writes:
  Looks good from my end, Peter, I pulled the same docs that I pulled for
  v7.2.2, which I hope is okay?

 Sources look okay from here.  Didn't look at the built-docs files.

Builds fine here for RPM usage.  Got an odd diff in the triggers regression 
test: did we drop a NOTICE?   If so, the regression output should probably 
have been changed too. The diff:
*** ./expected/triggers.out Sat Jan 15 14:18:23 2000
--- ./results/triggers.out  Thu Oct  3 00:16:09 2002
***
*** 75,91 
  insert into fkeys values (60, '6', 4);
  ERROR:  check_fkeys_pkey2_exist: tuple references non-existing key in fkeys2
  delete from pkeys where pkey1 = 30 and pkey2 = '3';
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
  ERROR:  check_fkeys2_fkey_restrict: tuple referenced in fkeys
  delete from pkeys where pkey1 = 40 and pkey2 = '4';
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
  update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5';
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
  ERROR:  check_fkeys2_fkey_restrict: tuple referenced in fkeys
  update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1';
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
- NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
  DROP TABLE pkeys;
  DROP TABLE fkeys;
  DROP TABLE fkeys2;
--- 75,85 

Tom, the timestamp and horology passes on RH 7.3 here.  Which is nice.  Will 
try 8.0 tomorrow at work.

RPMs will be uploaded either tonight or tomorrow morning after I get to work; 
it will depend on how much upload bandwidth I can get out of this dialup.  It 
appears to be running OK, so I may let it run.
-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

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

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



Re: [HACKERS] pg_dump and large files - is this a problem?

2002-10-02 Thread Philip Warner

At 11:06 AM 2/10/2002 -0400, Tom Lane wrote:
It needs to get done; AFAIK no one has stepped up to do it.  Do you want
to?

I'll have a look; my main concern at the moment is that off_t and size_t 
are totally non-committal as to structure; in particular I can probably 
safely assume that they are unsigned, but can I assume that they have the 
same endian--ness as int etc?

If so, then will it be valid to just read/write each byte in endian order? 
How likely is it that the 64 bit value will actually be implemented as a 
structure like:

off_t { int lo; int hi; }

which effectively ignores endian-ness at the 32 bit scale?




Philip Warner| __---_
Albatross Consulting Pty. Ltd.   |/   -  \
(A.B.N. 75 008 659 498)  |  /()   __---_
Tel: (+61) 0500 83 82 81 | _  \
Fax: (+61) 0500 83 82 82 | ___ |
Http://www.rhyme.com.au  |/   \|
  |----
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

http://archives.postgresql.org



Re: [HACKERS] v7.2.3 - tag'd, packaged ... need it checked ...

2002-10-02 Thread Lamar Owen

On Thursday 03 October 2002 12:29 am, Lamar Owen wrote:
 RPMs will be uploaded either tonight or tomorrow morning after I get to
 work; it will depend on how much upload bandwidth I can get out of this
 dialup.  It appears to be running OK, so I may let it run.

After I get to work.  Too many disconnects; too low a throughput.
-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

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



Re: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Bruce Momjian

Tom Lane wrote:
 Bruce Momjian [EMAIL PROTECTED] writes:
  I would read the developers corner stuff, the developers FAQ, pick a
  TODO item, and try a patch.  It's that simple.
 
 Yup.  I'd also suggest starting with something relatively small and
 localized (the nearby suggestion to fix IN/EXISTS, for example, is
 probably not a good first project --- and anyway I was going to work
 on that myself this month ;-)).

That's good news.  I am getting a little embarassed because I had to
explain the work arounds to someone this week, twice.

As it stands now, when is EXISTS quicker than IN.  It isn't always,
right?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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



Re: [HACKERS] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Oleg Bartunov

Justin,

what does world map with fuzzy points supposed to show ?

Oleg
On Wed, 2 Oct 2002, Justin Clift wrote:

 Hi all,

 Over the last few weeks we've put together a new Advocacy and
 Marketing website for PostgreSQL:

 http://advocacy.postgresql.org

 It's now ready for public release.  It has the first few case studies,
 lists the major advantages to PostgreSQL, and provides a place you can
 point your CIO, CTO, and CEO's at, etc.

 :-)

 Regards and best wishes,

 Justin Clift



Regards,
Oleg
_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Yury Bokhoncovich

Hello!

On Mon, 30 Sep 2002, Bruce Momjian wrote:

 It is not clear to me;  is this its own transaction or a function call?

BTW.
As reported by my friend:
Oracle 8.1.7 (ver.9 behaves the same way):

--- cut ---
SQL SET TRANSACTION READ WRITE;

Transaction set.

SQL SELECT TO_CHAR(SYSDATE, 'DD-MM- HH24:MI:SS') FROM DUAL;

TO_CHAR(SYSDATE,'MM
---
02-10-2002 10:04:19

SQL -- wait a lot

SQL SELECT TO_CHAR(SYSDATE, 'DD-MM- HH24:MI:SS') FROM DUAL;

TO_CHAR(SYSDATE,'MM
---
02-10-2002 10:04:27

SQL COMMIT;

Commit complete.
--- cut ---


 Any Oracle 9 users out there?

 I need this run:

 BEGIN;
 SELECT CURRENT_TIMESTAMP;
 -- wait 5 seconds
 SELECT CURRENT_TIMESTAMP;

 Are those two timestamps the same?

-- 
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: [EMAIL PROTECTED]
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.



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



Re: [HACKERS] psqlODBC *nix Makefile (new 7.3 open item?)

2002-10-02 Thread Dave Page



 -Original Message-
 From: Peter Eisentraut [mailto:[EMAIL PROTECTED]] 
 Sent: 01 October 2002 21:05
 To: Dave Page
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [HACKERS] psqlODBC *nix Makefile (new 7.3 open item?)
 
 
 Dave Page writes:
 
majority of you!) knock up a makefile so the driver will build 
standalone on *nix systems please? There should be no
   dependencies on
any of the rest of the code - certainly there isn't for 
 the Win32 
build.
  
   I'm working something out.  I'll send it to you tomorrow.
 
 Hah.  I tried to put something together based on Automake and 
 Libtool, but I must conclude that Libtool is just completely 
 utterly broken.  I also considered copying over 
 Makefile.shlib, but that would draw in too many auxiliary 
 files and create a different kind of mess.  So what I would 
 suggest right now as the course of action is to copy your 
 local psqlodbc subtree to its old location under interfaces/ 
 and try to hook things together that way.
 
 Perhaps one of these days we should convert Makefile.shlib 
 into a shell script that we can deploy more easily to 
 different projects.

Thanks for trying Peter.

Are we going to get the same problems for the other bits (libpq++?) that
we've ripped out? Is anyone looking at them, or have they just been
dumped on Gborg  forgotten?

Regards, Dave.

---(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] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Justin Clift

Hi Oleg,

It's supposed to show roughly where everyone is.

Based mostly on Vince's map from the developer site, but this one is
really easy to update.

If you're not located on the map correctly (probably hard to tell, but
if you're wrong on Vince's map then you're wrong on this one) it can be
updated pronto.

:)

Regards and best wishes,

Justin Clift


Oleg Bartunov wrote:
 
 Justin,
 
 what does world map with fuzzy points supposed to show ?
 
 Oleg
 On Wed, 2 Oct 2002, Justin Clift wrote:
 
  Hi all,
 
  Over the last few weeks we've put together a new Advocacy and
  Marketing website for PostgreSQL:
 
  http://advocacy.postgresql.org
 
  It's now ready for public release.  It has the first few case studies,
  lists the major advantages to PostgreSQL, and provides a place you can
  point your CIO, CTO, and CEO's at, etc.
 
  :-)
 
  Regards and best wishes,
 
  Justin Clift
 
 
 
 Regards,
 Oleg
 _
 Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
 Sternberg Astronomical Institute, Moscow University (Russia)
 Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
 phone: +007(095)939-16-83, +007(095)939-23-83

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

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



Re: [HACKERS] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Vince Vielhaber

On Wed, 2 Oct 2002, Justin Clift wrote:

 Hi Oleg,

 It's supposed to show roughly where everyone is.

 Based mostly on Vince's map from the developer site, but this one is
 really easy to update.

 If you're not located on the map correctly (probably hard to tell, but
 if you're wrong on Vince's map then you're wrong on this one) it can be
 updated pronto.

Look for an updated map shortly.  I have everyone's coordinates in and
it looks like the tools build ok.  I should have at least a day or two
break from the activities in Congress (re. internet broadcasting), so
I want to get the new one up asap and before things bust loose again.

Vince.
-- 
==
Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
  http://www.camping-usa.com  http://www.cloudninegifts.com
   http://www.meanstreamradio.com   http://www.unknown-artists.com
==




---(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] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Vince Vielhaber

On Wed, 2 Oct 2002, Oleg Bartunov wrote:

 On Wed, 2 Oct 2002, Vince Vielhaber wrote:

  On Wed, 2 Oct 2002, Justin Clift wrote:
 
   Hi Oleg,
  
   It's supposed to show roughly where everyone is.
  
   Based mostly on Vince's map from the developer site, but this one is
   really easy to update.
  
   If you're not located on the map correctly (probably hard to tell, but
   if you're wrong on Vince's map then you're wrong on this one) it can be
   updated pronto.
 
  Look for an updated map shortly.  I have everyone's coordinates in and
  it looks like the tools build ok.  I should have at least a day or two
  break from the activities in Congress (re. internet broadcasting), so
  I want to get the new one up asap and before things bust loose again.

 Coordinates seems ok (Moscow), I asked if map should present something
 more like old Bruce's map with photos. I'm using Mozilla and see just
 a picture of the world :-)

old Bruce's map ???  No idea what you're referring to.

Vince.
-- 
==
Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
  http://www.camping-usa.com  http://www.cloudninegifts.com
   http://www.meanstreamradio.com   http://www.unknown-artists.com
==




---(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] Please, applay patch to current CVS

2002-10-02 Thread Bruce Momjian


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Teodor Sigaev wrote:
 This is small README fix for contrib/intarray. Thank you.
 -- 
 Teodor Sigaev
 [EMAIL PROTECTED]
 

[ application/gzip is not supported, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Tom Lane

Yury Bokhoncovich [EMAIL PROTECTED] writes:
 As reported by my friend:
 Oracle 8.1.7 (ver.9 behaves the same way):
 [ to_char(sysdate) advances in a transaction ]

Now I'm really confused; this directly contradicts the report of Oracle
8's behavior that we had earlier from Roland Roberts.  Can someone
explain why the different results?

regards, tom lane

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

http://archives.postgresql.org



Re: [HACKERS] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Oleg Bartunov

On Wed, 2 Oct 2002, Vince Vielhaber wrote:

 On Wed, 2 Oct 2002, Oleg Bartunov wrote:

  On Wed, 2 Oct 2002, Vince Vielhaber wrote:
 
   On Wed, 2 Oct 2002, Justin Clift wrote:
  
Hi Oleg,
   
It's supposed to show roughly where everyone is.
   
Based mostly on Vince's map from the developer site, but this one is
really easy to update.
   
If you're not located on the map correctly (probably hard to tell, but
if you're wrong on Vince's map then you're wrong on this one) it can be
updated pronto.
  
   Look for an updated map shortly.  I have everyone's coordinates in and
   it looks like the tools build ok.  I should have at least a day or two
   break from the activities in Congress (re. internet broadcasting), so
   I want to get the new one up asap and before things bust loose again.
 
  Coordinates seems ok (Moscow), I asked if map should present something
  more like old Bruce's map with photos. I'm using Mozilla and see just
  a picture of the world :-)

 old Bruce's map ???  No idea what you're referring to.


I may be wrong with author of the map, but it's there

http://developer.postgresql.org/index.php


 Vince.


Regards,
Oleg
_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


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

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



Re: [HACKERS] [GENERAL] New PostgreSQL Website : advocacy.postgresql.org

2002-10-02 Thread Vince Vielhaber

On Wed, 2 Oct 2002, Oleg Bartunov wrote:

 On Wed, 2 Oct 2002, Vince Vielhaber wrote:

  On Wed, 2 Oct 2002, Oleg Bartunov wrote:
 
   On Wed, 2 Oct 2002, Vince Vielhaber wrote:
  
On Wed, 2 Oct 2002, Justin Clift wrote:
   
 Hi Oleg,

 It's supposed to show roughly where everyone is.

 Based mostly on Vince's map from the developer site, but this one is
 really easy to update.

 If you're not located on the map correctly (probably hard to tell, but
 if you're wrong on Vince's map then you're wrong on this one) it can be
 updated pronto.
   
Look for an updated map shortly.  I have everyone's coordinates in and
it looks like the tools build ok.  I should have at least a day or two
break from the activities in Congress (re. internet broadcasting), so
I want to get the new one up asap and before things bust loose again.
  
   Coordinates seems ok (Moscow), I asked if map should present something
   more like old Bruce's map with photos. I'm using Mozilla and see just
   a picture of the world :-)
 
  old Bruce's map ???  No idea what you're referring to.
 

 I may be wrong with author of the map, but it's there

 http://developer.postgresql.org/index.php

Jan's map.

Vince.
-- 
==
Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net
 56K Nationwide Dialup from $16.00/mo at Pop4 Networking
  http://www.camping-usa.com  http://www.cloudninegifts.com
   http://www.meanstreamradio.com   http://www.unknown-artists.com
==




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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Mike Mascari

Tom Lane wrote:
 Yury Bokhoncovich [EMAIL PROTECTED] writes:
 
As reported by my friend:
Oracle 8.1.7 (ver.9 behaves the same way):
[ to_char(sysdate) advances in a transaction ]
 
 
 Now I'm really confused; this directly contradicts the report of Oracle
 8's behavior that we had earlier from Roland Roberts.  Can someone
 explain why the different results?

Roland used an anonymous PL/SQL procedure:

SQL begin
   2  insert into rbr_foo select sysdate from dual;
[...wait about 10 seconds...]
   3  insert into rbr_foo select sysdate from dual;
   4  end;
   5  /

PL/SQL procedure successfully completed.

SQL select * from rbr_foo;

Oracle isn't processing those statements interactively. SQL*Plus 
is waiting on the / to send the PL/SQL block to the database. 
I suspect its not going to take Oracle more than a second to 
insert a row...

Mike Mascari
[EMAIL PROTECTED]


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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Bruce Momjian

Mike Mascari wrote:
 Tom Lane wrote:
  Yury Bokhoncovich [EMAIL PROTECTED] writes:
  
 As reported by my friend:
 Oracle 8.1.7 (ver.9 behaves the same way):
 [ to_char(sysdate) advances in a transaction ]
  
  
  Now I'm really confused; this directly contradicts the report of Oracle
  8's behavior that we had earlier from Roland Roberts.  Can someone
  explain why the different results?
 
 Roland used an anonymous PL/SQL procedure:
 
 SQL begin
2  insert into rbr_foo select sysdate from dual;
 [...wait about 10 seconds...]
3  insert into rbr_foo select sysdate from dual;
4  end;
5  /
 
 PL/SQL procedure successfully completed.
 
 SQL select * from rbr_foo;
 
 Oracle isn't processing those statements interactively. SQL*Plus 
 is waiting on the / to send the PL/SQL block to the database. 
 I suspect its not going to take Oracle more than a second to 
 insert a row...

Oh, I understand now.  He delayed when entering the function body, but
that has no effect when he sends it.  Can someone add an explicit sleep
in the function body and try that?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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

http://archives.postgresql.org



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Mike Mascari

Bruce Momjian wrote:
 Mike Mascari wrote:
 
Oracle isn't processing those statements interactively. SQL*Plus 
is waiting on the / to send the PL/SQL block to the database. 
I suspect its not going to take Oracle more than a second to 
insert a row...
 
 
 Oh, I understand now.  He delayed when entering the function body, but
 that has no effect when he sends it.  Can someone add an explicit sleep
 in the function body and try that?
 

SQL create table foo (a date);

Table created.

SQL begin
   2  insert into foo select sysdate from dual;
   3  dbms_lock.sleep(5);
   4  insert into foo select sysdate from dual;
   5  end;
   6  /

PL/SQL procedure successfully completed.

SQL select to_char(a, 'HH24:MI:SS') from foo;

TO_CHAR(

11:31:02
11:31:07

Mike Mascari
[EMAIL PROTECTED]





---(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] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Bruce Momjian

Mike Mascari wrote:
 Bruce Momjian wrote:
  Mike Mascari wrote:
  
 Oracle isn't processing those statements interactively. SQL*Plus 
 is waiting on the / to send the PL/SQL block to the database. 
 I suspect its not going to take Oracle more than a second to 
 insert a row...
  
  
  Oh, I understand now.  He delayed when entering the function body, but
  that has no effect when he sends it.  Can someone add an explicit sleep
  in the function body and try that?
  
 
 SQL create table foo (a date);
 
 Table created.
 
 SQL begin
2  insert into foo select sysdate from dual;
3  dbms_lock.sleep(5);
4  insert into foo select sysdate from dual;
5  end;
6  /
 
 PL/SQL procedure successfully completed.
 
 SQL select to_char(a, 'HH24:MI:SS') from foo;
 
 TO_CHAR(
 
 11:31:02
 11:31:07

OK, two requests.  First, would you create a _named_ PL/SQL function
with those contents and try it again.  Also, would you test
CURRENT_TIMESTAMP too?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(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] pg_dump and large files - is this a problem?

2002-10-02 Thread Bruce Momjian

Philip Warner wrote:
 At 09:42 AM 2/10/2002 +1000, Philip Warner wrote:
 Yes, and do the peripheral stuff to support old archives etc.
 
 Does silence mean people agree? Does it also mean someone is doing this 
 (eg. whoever did the off_t support)? Or does it mean somebody else needs to 
 do it?

Added to open items:

Fix pg_dump to handle 64-bit off_t offsets for custom format


-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073


   P O S T G R E S Q L

  7 . 3  O P E NI T E M S


Current at ftp://momjian.postgresql.org/pub/postgresql/open_items.

Source Code Changes
---
Schema handling - ready? interfaces? client apps?
Drop column handling - ready for all clients, apps?
Fix BeOS, QNX4 ports
Fix AIX large file compile failure of 2002-09-11 (Andreas)
Get bison upgrade on postgresql.org for ecpg only (Marc)
Fix vacuum btree bug (Tom)
Fix client apps for autocommit = off
Change log_min_error_statement to be off by default (Gavin)
Fix return tuple counts/oid/tag for rules, SPI
Add schema dump option to pg_dump
Make SET not start a transaction with autocommit off, document it
Remove GRANT EXECUTE to all /contrib functions?
Change NUMERIC to have 16 digit precision
Handle CREATE CONSTRAINT TRIGGER without FROM in loads from old db's
Fix pg_dump to handle 64-bit off_t offsets for custom format

On Going

Security audit


Documentation Changes
-
Document need to add permissions to loaded functions and languages
Move documation to gborg for moved projects


7.2.X
-
CLOG
WAL checkpoint
Linux mktime()



---(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] small patch for vacuumlo

2002-10-02 Thread Bruce Momjian


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Mario Weilguni wrote:
 It's just a cosmetic change, fixes the help screen. Should be applied in 
/contrib/vacuumlo
 
 Regards,
   Mario Weilguni

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(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] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Mike Mascari

Bruce Momjian wrote:
 
 OK, two requests.  First, would you create a _named_ PL/SQL function
 with those contents and try it again.  Also, would you test
 CURRENT_TIMESTAMP too?
 

SQL CREATE TABLE foo(a date);

Table created.

As a PROCEDURE:

SQL CREATE PROCEDURE test
   2  AS
   3  BEGIN
   4   INSERT INTO foo SELECT SYSDATE FROM dual;
   5   dbms_lock.sleep(5);
   6   INSERT INTO foo SELECT SYSDATE FROM dual;
   7  END;
   8  /

Procedure created.

SQL execute test;

PL/SQL procedure successfully completed.

SQL select to_char(a, 'HH24:MI:SS') from foo;

TO_CHAR(

12:01:07
12:01:12

As a FUNCTION:

SQL CREATE FUNCTION mydiff
   2  RETURN NUMBER
   3  IS
   4  time1 DATE;
   5  time2 DATE;
   6  c NUMBER;
   7  BEGIN
   8   SELECT SYSDATE
   9   INTO time1
  10   FROM DUAL;
  11   SELECT COUNT(*)
  12   INTO c
  13   FROM bar, bar, bar, bar, bar, bar, bar, bar;
  14   SELECT SYSDATE
  15   INTO time2
  16   FROM DUAL;
  17   RETURN (time2 - time1);
  18  END;
  19  /

Function created.

SQL select mydiff FROM dual;

 MYDIFF
--
.34722

I can't test the use of CURRENT_TIMESTAMP because I have Oracle 
8, not 9.

Mike Mascari
[EMAIL PROTECTED]













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

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



Re: AIX compilation problems (was Re: [HACKERS] Proposal ...)

2002-10-02 Thread Zeugswetter Andreas SB SD


   Attached is a patch to fix the mb linking problems on AIX. As a nice side effect
   it reduces the duplicate symbol warnings to linking libpq.so and libecpg.so
   (all shlibs that are not postmaster loadable modules).
  
  Can you explain the method behind your patch?  Have you tried -bnogc?
 
 -bnogc would (probably) have been the correct switch reading 
 the man page,
 but the method was previously not good since it involved the 
 following:
 
 1. create a static postgres executable from the SUBSYS.o's
 2. create an exports file from above
 3. recreate a shared postgres executable
 
 This naturally had a cyclic dependency, that could not properly be 
 reflected in the Makefile (thus a second make sometimes left you with 
 a static postgres unless you manually removed postgres.imp).
 
 Now it does:
 postgres.imp: $(OBJS)
 create a temporary SUBSYS.o from all $(OBJS)
 create a postgres.imp from SUBSYS.o
 rm temporary SUBSYS.o
 
 postgres: postgres.imp
 link a shared postgres
 
 A second change was to move the import and export files to 
 the end of the link line,
 then the linker knows not to throw a duplicate symbol 
 warning, and keeps all symbols
 that are mentioned in the exports file (== -bnogc restricted 
 to $(OBJS) symbols).
 
 Thus now only libpq.so and libecpg.so still show the 
 duplicate symbol warnings since their
 link line should actually not include postgres.imp . I did 
 not see how to make a difference 
 between loadable modules (need postgres.imp) and interface 
 libraries (do not need postgres.imp),
 but since the resulting libs are ok, I left it at that.

Note that this behavior did thus not change. 

 
 I tested both gcc and xlc including regression tests.

What happens with this now ?

Thanx
Andreas



mb_link_patch4.gz
Description: mb_link_patch4.gz


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



[HACKERS] DBD::PG - any works to be compatile with 7.3 ?

2002-10-02 Thread Oleg Bartunov

Any news about new DBD::Pg ?
It's a stopper for many projects based on perl interface
to use 7.3.

Regards,
Oleg
_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


---(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] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Tom Lane

Mike Mascari [EMAIL PROTECTED] writes:
 SQL CREATE PROCEDURE test
2  AS
3  BEGIN
4   INSERT INTO foo SELECT SYSDATE FROM dual;
5   dbms_lock.sleep(5);
6   INSERT INTO foo SELECT SYSDATE FROM dual;
7  END;
8  /

 Procedure created.

 SQL execute test;

 PL/SQL procedure successfully completed.

 SQL select to_char(a, 'HH24:MI:SS') from foo;

 TO_CHAR(
 
 12:01:07
 12:01:12


What fun.  So in reality, SYSDATE on Oracle behaves like timeofday():
true current time.  That's certainly not a spec-compliant interpretation
for CURRENT_TIMESTAMP :-(

Has anyone done the corresponding experiments on the other DBMSes to
identify exactly when they allow CURRENT_TIMESTAMP to advance?

regards, tom lane

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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Bruce Momjian


I received this via personal email.  I assume the author wants it
shared.  It shows CURRENT_TIMESTAMP changing within a function!

---

Steve Hulcher wrote:
 Oracle 9i.
 
 Hope this is helpful
 
 
 --SQL RUN
 /*
 CREATE TABLE foo (a DATE);
 CREATE OR REPLACE PROCEDURE test
 AS
 BEGIN
   INSERT INTO foo SELECT CURRENT_TIMESTAMP FROM dual;
   dbms_lock.sleep(5);
   INSERT INTO foo SELECT CURRENT_TIMESTAMP FROM dual;
 END;
 /
 show errors;
 */
 
 DELETE FROM foo;
 EXECUTE test;
 
 SELECT TO_CHAR(a, '-MM-DD HH24:MI:SS') FROM foo;
 
 --RESULTS
 0 rows deleted.
 
 
 PL/SQL procedure successfully completed.
 
 
 TO_CHAR(A,'-MM-
 ---
 2002-10-02 11:33:12
 2002-10-02 11:33:17
 
 
 
 -Original Message-
 From: Mike Mascari [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 02, 2002 11:20 AM
 To: Bruce Momjian
 Cc: Yury Bokhoncovich; Dan Langille; Roland Roberts;
 PostgreSQL-development
 Subject: Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...
 
 
 Bruce Momjian wrote:
  
  OK, two requests.  First, would you create a _named_ PL/SQL function
  with those contents and try it again.  Also, would you test
  CURRENT_TIMESTAMP too?
  
 
 SQL CREATE TABLE foo(a date);
 
 Table created.
 
 As a PROCEDURE:
 
 SQL CREATE PROCEDURE test
2  AS
3  BEGIN
4   INSERT INTO foo SELECT SYSDATE FROM dual;
5   dbms_lock.sleep(5);
6   INSERT INTO foo SELECT SYSDATE FROM dual;
7  END;
8  /
 
 Procedure created.
 
 SQL execute test;
 
 PL/SQL procedure successfully completed.
 
 SQL select to_char(a, 'HH24:MI:SS') from foo;
 
 TO_CHAR(
 
 12:01:07
 12:01:12
 
 As a FUNCTION:
 
 SQL CREATE FUNCTION mydiff
2  RETURN NUMBER
3  IS
4  time1 DATE;
5  time2 DATE;
6  c NUMBER;
7  BEGIN
8   SELECT SYSDATE
9   INTO time1
   10   FROM DUAL;
   11   SELECT COUNT(*)
   12   INTO c
   13   FROM bar, bar, bar, bar, bar, bar, bar, bar;
   14   SELECT SYSDATE
   15   INTO time2
   16   FROM DUAL;
   17   RETURN (time2 - time1);
   18  END;
   19  /
 
 Function created.
 
 SQL select mydiff FROM dual;
 
  MYDIFF
 --
 .34722
 
 I can't test the use of CURRENT_TIMESTAMP because I have Oracle 
 8, not 9.
 
 Mike Mascari
 [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
 
 
 
 
 
 ---(end of broadcast)---
 TIP 5: Have you checked our extensive FAQ?
 
 http://www.postgresql.org/users-lounge/docs/faq.html
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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

http://archives.postgresql.org



Re: [HACKERS] Diff for reindexdb

2002-10-02 Thread Bruce Momjian


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Mario Weilguni wrote:
 This small patch adds a Makefile for /contrib/reindexdb/ and renames the README to 
README.reindexdb. 
 
 Regards,
   Mario Weilguni

[ Attachment, skipping... ]

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

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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

http://archives.postgresql.org



Re: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Bruce Momjian


I would read the developers corner stuff, the developers FAQ, pick a
TODO item, and try a patch.  It's that simple.  Feel free to contact me
for specific advice.  I am on chat at:

AIM bmomjian
ICQ 151255111
Yahoo   bmomjian
MSN [EMAIL PROTECTED]
IRC #postgresql vis efnet

---

Curtis Faith wrote:
 All,
 
 I'd like to help work on some 7.4 features, however, since you've not seen
 my name before, I'm obviously new to the list and the org.
 
 I really like working on speed optimizations and rewrites. I have 15 years
 experience with C++-based systems and databases,  and have worked on
 commercial database engines (i.e. indexing and query execution systems), sql
 execution and optimization, various lex and yacc based compilers and
 parsers. I've generally been able to get code to perform as well or better
 than competitive systems with similar functionality, and usually have been
 able to beat other code by 3 to 10 X. My unix experience is reasonable but
 I'm not an expert.
 
 Any suggestions for where to start? I don't mind digging into very hairy
 code or large problems. I'm willing to run the risk of a patch not being
 accepted (for large changes) since I'll make sure whatever I do is well
 known to those who will do the accept/deny and the approach approved of
 ahead of time.
 
 Since I'm new here, I'm thinking a problem that would not otherwise get
 handled by the experienced group would be the best place to start. Where is
 the system especially slow?
 
 I've read the TODO's, and the last five months of the archives for this
 list, so I have some general ideas.
 
 I've also had a lot experience marketing to I.T. organizations so I'd be
 happy to help out on the Product Marketing for PostgreSQL advocacy, i.e.
 developing a marketing strategy, press releases, etc.
 
 - Curtis
 
 Curtis Faith
 Principal
 Galt Capital, LLP
 
 --
 Galt Capitalhttp://www.galtcapital.com
 12 Wimmelskafts Gade
 Post Office Box 7549   voice: 340.776.0144
 Charlotte Amalie,  St. Thomasfax: 340.776.0244
 United States Virgin Islands  00801 cell: 340.643.5368
 
 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Michael Paesold

Mike Mascari [EMAIL PROTECTED] wrote:


 I can't test the use of CURRENT_TIMESTAMP because I have Oracle
 8, not 9.

What about NOW()? It should be available in Oracle 8? Is it the same as
SYSDATE?

Regards,
Michael Paesold


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

http://archives.postgresql.org



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Mike Mascari

Michael Paesold wrote:

 What about NOW()? It should be available in Oracle 8? Is it the same as
 SYSDATE?
 

Unless I'm missing something, NOW() neither works in Oracle 8 
nor appears in the Oracle 9i online documentation:

http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/functions2.htm#80856

Mike Mascari
[EMAIL PROTECTED]


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



Re: [HACKERS] Advice: Where could I be of help?

2002-10-02 Thread Tom Lane

Bruce Momjian [EMAIL PROTECTED] writes:
 I would read the developers corner stuff, the developers FAQ, pick a
 TODO item, and try a patch.  It's that simple.

Yup.  I'd also suggest starting with something relatively small and
localized (the nearby suggestion to fix IN/EXISTS, for example, is
probably not a good first project --- and anyway I was going to work
on that myself this month ;-)).

Neil Conway's thought of working on plpgsql seems a good one to me;
and as he says, there's lots of other possibilities.  What do you
find interesting in the TODO list?

regards, tom lane

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

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



Re: [HACKERS] (Fwd) Re: Any Oracle 9 users? A test please...

2002-10-02 Thread Michael Paesold

Mike Mascari [EMAIL PROTECTED] wrote:

 Michael Paesold wrote:

  What about NOW()? It should be available in Oracle 8? Is it the same as
  SYSDATE?
 

 Unless I'm missing something, NOW() neither works in Oracle 8
 nor appears in the Oracle 9i online documentation:


http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/fu
nctions2.htm#80856

 Mike Mascari

I am sorry, if that is so. I thought it was available, but obviously, I was
wrong.

Regards,
Michael


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



Re: [HACKERS] pg7.3b1

2002-10-02 Thread Laurette Cisneros

Ok, finally had time to narrow this down.

Here's the simplified script that will reproduce this (this sequence
reroduces on my system using 7.3b2):

\echo BEGIN tst.sql

create table pp
( x integer
, i text
);

create view p as
select * from pp where i is null;
 
comment on view p is
'This is a comment.';
 
create rule p_ins as on insert to p do instead
  insert into pp
values ( new.x
   , null
   );
 
comment on rule p_ins is 'insert to p goes to pp';

\echo END tst.sql


On 26 Sep 2002, Rod Taylor wrote:

 On Thu, 2002-09-26 at 16:46, Laurette Cisneros wrote:
  
  I am so glad that postgres now keeps track of relationships between rule,
  views, functions, tables, etc.  I've had to re-do all my creation and drop
  scripts but this is definitely for the better.
  
  During my testing of my scripts, I have come across this message:
  psql:/u1/cvs73/DataBase/Config/Schema/logconfig.sql:142: WARNING:  Relcache 
reference leak: relation positions has refcnt 1 instead of 0
  
  What does this indicate?
 
 Someone (probably me) made a mistake and forgot to release a cache
 handle.
 
 Do you happen to have a sequence of commands that can reproduce this?
 
 

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
--
Do you know where your bus is?


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



Re: [HACKERS] Anyone want to assist with the translation of the Advocacy site?

2002-10-02 Thread Michael Paesold

Justin Clift [EMAIL PROTECTED] wrote:

 Hi everyone,

 Have just put together a prototype page to show off the multi-lingual
 capabilities that the Advocacy sites' infrastructure has:

 http://advocacy.postgresql.org/?lang=de

 The text was translated to german via Altavista's Babelfish, so it's
 probably only about 80% accurate, but it conveys the concept.

 Is anyone interested in translating the English version to other
 languages?  All Latin based languages should be fine (German, French,
 Italian, Spanish, Portuguese, Turkish, Greek, etc).

 If there's strong interest, then an interface to let volunteers
 translators do it easily can be constructed over the next fortnight or
 so.

Hi Justin,

I am from Austria, and I would like to help. I could provide a German
translation. The Babelfish's translation is really funny. Machine
translation is readable, but it is no advocacy. ;-) I do not really nead an
interface, but just tell me in what way you want the texts.

Best Regards,
Michael Paesold


---(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] Anyone want to assist with the translation of the Advocacy

2002-10-02 Thread Justin Clift

Hi Michael,

Michael Paesold wrote:
snip 
 Hi Justin,
 
 I am from Austria, and I would like to help. I could provide a German
 translation. The Babelfish's translation is really funny. Machine
 translation is readable, but it is no advocacy. ;-) I do not really nead an
 interface, but just tell me in what way you want the texts.

Cool.  Could you deal with an OpenOffice Calc or M$ Excel file having
the lines of English text in one column, and doing the German
translation into a second column?

That might be easiest, and will allow a cut-n-paste of the German
version straight into the database backend.

Sound workable to you?

:-)

Regards and best wishes,

Justin Clift

 Best Regards,
 Michael Paesold

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

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

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



[HACKERS] Anyone want to assist with the translation of the Advocacy site?

2002-10-02 Thread Justin Clift

Hi everyone,

Have just put together a prototype page to show off the multi-lingual
capabilities that the Advocacy sites' infrastructure has:

http://advocacy.postgresql.org/?lang=de

The text was translated to german via Altavista's Babelfish, so it's
probably only about 80% accurate, but it conveys the concept.

Is anyone interested in translating the English version to other
languages?  All Latin based languages should be fine (German, French,
Italian, Spanish, Portuguese, Turkish, Greek, etc).

If there's strong interest, then an interface to let volunteers
translators do it easily can be constructed over the next fortnight or
so.

:-)

Regards and best wishes,

Justin Clift

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

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

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