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

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

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

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

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

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,

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?

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

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

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)

[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

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

[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

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

[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

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

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

[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

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

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

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

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

[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

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

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

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

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

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

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

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

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

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

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

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,

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

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

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

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

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

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

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

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

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

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

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

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

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?

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

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

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?

[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

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

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

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

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

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

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:

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

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:

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

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

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

[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