[GENERAL] ACM Sigmod interview with Bruce Lindsay

2005-08-06 Thread Mike Mascari
ong has a partial index implementation been in PostgreSQL? I seem to recall it being brought up to speed around six years ago. The underlying code may have been in there for much, much longer... Mike Mascari ---(end of broadcast)--- TIP

Re: [GENERAL] UltraSPARC versus AMD

2005-04-25 Thread Mike Mascari
Something everyone should have in their office... Mike Mascari ---(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 thro

[GENERAL] Parallel Query should be a top priority

2005-03-27 Thread Mike Mascari
quot; should be moved out from under Miscellaneous on the TODO list and re-categorized as the formerly existent URGENT feature... Mike Mascari ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] function in postgres

2005-01-03 Thread Mike Mascari
vinita bansal wrote: Hi, The function "CHAR in db2" returns a fixed length character string representation of an integer number.What is the corresponding function in Postgres? Regards, Vinita Bansal http://www.postgresql.org/docs/7.4/interactive/functions-string.html Mi

Re: [GENERAL] nice work on the new site

2004-12-22 Thread Mike Mascari
Ned Lilly wrote: To everyone who put in what's clearly a lot of time in building the new website, well done! I think the combination of the 8.0 release and a dramatically more professional website will do wonders for PostgreSQL. Kudos! Amen. Mike Mascari ---(e

Re: RES: [GENERAL] NewsForge Poll: Favorite open source database?

2004-12-20 Thread Mike Mascari
Marcelo Cid wrote: http://www.newsforge.com/pollBooth.pl?qid=54 I see strange line below results: "(You've already voted.)" I don't believe such results because I do know I didn't been here :) Marcel's link did the favor of voting for you. Not good Mike Mascari N

Re: [GENERAL] NewsForge Poll: Favorite open source database?

2004-12-18 Thread Mike Mascari
or of voting for you. Not good Mike Mascari ---(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: [GENERAL] SERIAL error

2004-11-27 Thread Mike Mascari
ue up once. This is FAQ item number 4.15.4: http://www.postgresql.org/docs/faqs/FAQ.html#4.15.4 HTH, Mike Mascari ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Mike Mascari
that when I deviate from "purist DB lore" I get punished in long run. Could be wrong, though. :-) Mike Mascari ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EM

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Mike Mascari
he system from such problems." The surrogate key isn't solving the underlying logical inconsistency problem. It is being used as a work-around to cover one up. I suspect the author of being a MySQL user. Mike Mascari ---(end of broadcast)--

Re: [GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
Stephan Szabo wrote: On Tue, 26 Oct 2004, Mike Mascari wrote: I'd like to ensure that the creation of a department also implies the creation of two to eight projects; no more, no less: Is there no way to achieve the above stated goal in the server? Must I rely on the application to en

Re: [GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
to enforce consistency without deferrable triggers and without relying on the application to maintain consistency, which is not its job. Mike Mascari ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
ted goal in the server? Must I rely on the application to enforce consistency? Mike Mascari ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that yo

Re: [GENERAL] Bug or stupidity

2004-10-25 Thread Mike Mascari
) I want the same thing to happen the first time the code is deployed. This particular error may be less than obvious even during crude testing because the number of tuples in the relation in question may be zero or one, so the cross-product wouldn't produce anything unusual.

Re: [GENERAL] Avoiding sequential scans with OR join condition

2004-10-17 Thread Mike Mascari
Mike Mascari wrote: Sim Zacks wrote: I would use 2 left joins and use the where condition to make sure one of them is true, such as: select big_table.* from big_table left join little_table as l1 on big_table.y1=l1.y and l1.x=10 left join little_table as l2 on big_table.y2=l2.y and l1.x=10 where

Re: [GENERAL] Avoiding sequential scans with OR join condition

2004-10-17 Thread Mike Mascari
and l2.p_key is not null I have never tried this in postgresql, but in my experience with various other DB engines it is a lot faster then using an or in the join and faster then a union. Wow! Thanks! That certainly did the trick. Mike Mascari ---(end of broadcast

[GENERAL] Avoiding sequential scans with OR join condition

2004-10-15 Thread Mike Mascari
ow an index scan, but suffers from two separate queries along with a unique sort, which, from the data, represents 90% of the tuples returned by both queries. Is there any way to write the first query such that indexes will be used? Mike Mascari ---(end of broa

[GENERAL] 7.4 in-lining of SQL functions

2004-10-14 Thread Mike Mascari
n the SQL-language function, which eliminates some redundant code elsewhere and incorporate the functions myself into View 1, or can I count on PostgreSQL doing it for me? Mike Mascari ---(end of broadcast)--- TIP 9: the planner will ignore yo

Re: [GENERAL] Change primary key in Postgres 7.3?

2004-10-12 Thread Mike Mascari
--- 100 | 2 (1 row) Is that what the original poster is trying to achieve? Mike Mascari ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] books/sites for someone really learning PG's advanced

2004-09-23 Thread Mike Mascari
onsistency at that point, triggers can be used to enforce such things as what Date calls database constraints. I.e.: if a department has a budget of under 1000, there should not exist more than 5 employees. Hope that helps, Mike Mascari ---(end of broadcast)-

Re: [GENERAL] postgres "on in the internet"

2004-09-02 Thread Mike Mascari
ant to throw around data over the Internet without using SSL for all the various reasons: DNS hijacking, TCP replay, etc. Mike Mascari ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Cross-datatype Comparisons and Indexes

2004-08-20 Thread Mike Mascari
cast in that scenario either. Mike Mascari ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Could not create a table named "USER" under postgreSQL

2004-08-18 Thread Mike Mascari
integer); CREATE TABLE [EMAIL PROTECTED] insert into user values (1); ERROR: syntax error at or near "user" at character 13 [EMAIL PROTECTED] insert into "user" values (1); HTH, Mike Mascari ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] where can i download pgs 7.3.x ?

2004-08-16 Thread Mike Mascari
Geoffrey KRETZ wrote: I've looked on the PGS website but don't look well enough. (I just thought that the mirror were only there to download the last version of postgre). What the hell is postgre? Mike Mascari ---(end of broadcast)---

Re: [GENERAL] PostgreSQL 8.0 Feature List?

2004-08-10 Thread Mike Mascari
a propaganda perspective to include a reference to Slony-I in the press release and possibly the release notes? Or would such an imprimatur be inappropriate? Also, what is the etymology of the term Slony? Mike Mascari ---(end of broadcast)--- TIP 7

Re: [GENERAL] Data version idea (please discuss)

2004-08-06 Thread Mike Mascari
They see the active tuples, while the reporting component queries the base relations for the entire history. However, this is all maintained by a series of spaghetti C-language SPI routines, and my own home-brewed version of pg_constraint, as opposed to nice declared referential integrity, for

Re: [GENERAL] Data version idea (please discuss)

2004-08-06 Thread Mike Mascari
exes get me close to where I want with temporal features. I just wish the RI constraints had the ability to supply a WHERE clause. Between the two, it might get me were I want, rather than having to write triggers to ensure temporal integrity. Mike Mascari

Re: [GENERAL] trash talk

2004-08-03 Thread Mike Mascari
ostgreSQL], they've thrown it over the wall to see where it sticks," Rivot said. "In this case, there is a groundswell [of support], and that caused us to look and pay attention to it. The usage will continue to grow." --- What's the point of the square-brackets? Hmm... Mi

[GENERAL] Why do subselects in target lists behave differently wrt implicit casts?

2004-07-07 Thread Mike Mascari
select (select '') as key; ERROR: failed to find conversion function from "unknown" to character varying [lexus] insert into bar select (select ''::text) as key; INSERT 1319586 1 Just curious, Mike Mascari ---(end of broadcast)---

Re: [GENERAL] coalesce and nvl question

2004-06-23 Thread Mike Mascari
reat empty strings as NULL SELECT NULLIF(x, ''); But I'd guess most on this list are wondering why you want to equate an empty string with NULL, as they have two distinct meanings. Oracle's treatment of empty strings as NULL is world-renowned for bei

Re: [GENERAL] Creating a session variable in Postgres

2004-06-04 Thread Mike Mascari
(isStrict); CREATE OR REPLACE FUNCTION getvalue() RETURNS text AS '/usr/local/mypglibs/pgexample.so' LANGUAGE 'C' WITH (isStrict); Now all you need to to is invoke setvalue() at the start of the session, and build views around getvalue(): CREATE VIEW v_foo AS SELECT * FROM

[GENERAL] Disappointing news

2004-06-01 Thread Mike Mascari
quot; http://story.news.yahoo.com/news?tmpl=story&cid=569&ncid=738&e=1&u=/nm/20040601/tc_nm/tech_hewlettpackard_dc Perhaps an advocacy member should persuade them otherwise... Mike Mascari ---(end of broadcast)--- TIP 1: subscribe and

Re: [GENERAL] About table schema

2004-05-25 Thread Mike Mascari
You may also query the tables and views in the information_schema for what you want. Mike Mascari ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Combining several rows

2004-05-24 Thread Mike Mascari
e source tree is probably what you want. If you've installed by RPM, the postgresql-contrib package will have installed the SQL script to initialize the function in /usr/share/pgsql/contrib/tablefunc.sql. HTH, Mike Mascari ---(end of broadcast)---

Re: [GENERAL] any experience with multithreaded pg apps?

2004-05-07 Thread Mike Mascari
d when the process dies, but as of RedHat 8, d. was the behavior. HTH, Mike Mascari Many TIA! Mark ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Postgre and Web Request

2004-04-29 Thread Mike Mascari
ready exists. Gavin Sherry added the ON COMMIT DROP clause to CREATE TEMPORARY TABLE in 7.4 which, depending upon the expected life-cycle of the temporary table, may prove useful in the above scenario. FWIW, Mike Mascari ---(end of broadcast)---

Re: [GENERAL] Performance problem with correlated sub-query

2004-04-29 Thread Mike Mascari
LIMIT 1 ); HTH, Mike Mascari ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] FUNCTION problem

2004-04-01 Thread Mike Mascari
ELECT user_id FROM person WHERE uid=$1 AND pwd=$2; test'# ' test-# LANGUAGE 'sql'; CREATE FUNCTION [EMAIL PROTECTED] select * from getuserid('Mike', 'Mascari'); getuserid --- (0 rows) [EMAIL PROTECTED] insert into person (uid, pwd) values ('Mik

Re: [GENERAL] row-level security model

2004-03-31 Thread Mike Mascari
e of views as security: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3D02B372.B6A4EFB6%40mascari.com&rnum=2&prev=/groups%3Fq%3DMike%2BMascari%2Bsecurity%2Bhole%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den HTH, Mike Mascari ---(end of broa

Re: [GENERAL] 7.4.1 upgrade issues

2004-03-06 Thread Mike Mascari
ses, I was wondering if anyone had a different suggestion. Hi Gavin. Assuming a VACUUM ANALYZE after reload, one possibility is that the query in question contains >= 11 joins. I forgot to adjust the GEQO settings during an upgrade and experienced the associated sluggishness in planning time.

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-05 Thread Mike Mascari
in the client AFAICS. Mike Mascari ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] List of reserved keywords and function names in PostgreSQL

2004-03-01 Thread Mike Mascari
Karam Chand wrote: Hello Is there any documentation that lists all the PostgreSQL reserved words and function names? Just dont want to create object names with those words? http://www.postgresql.org/docs/7.4/static/sql-keywords-appendix.html Mike Mascari ---(end of

Re: [GENERAL] correlated delete with 'in' and 'left outer join'

2004-02-27 Thread Mike Mascari
= 'i' AND NOT EXISTS ( SELECT 1 FROM Item WHERE Item.ItemID = LogEvent.ItemID ); If you are using >= 7.4, then your query above is optimal: http://www.postgresql.org/docs/7.4/static/release.html#RELEASE-7-4 Just something to consider, Mike Mascari Michael

Re: [GENERAL] field must appear in the GROUP BY clause or be used

2004-02-27 Thread Mike Mascari
| Annual Audit This isn't my query, I'm translating a system prototyped in MSSQL to Postgres. This query _does_ work in MSSQL. Does that constitute a bug in MSSQL, or a shortcomming of Postgres, or just a difference of interpretation? If MSSQL picks an arbitrary valu

Re: [GENERAL] correlated delete with 'in' and 'left outer join'

2004-02-27 Thread Mike Mascari
Stephan Szabo wrote: On Fri, 27 Feb 2004, Mike Mascari wrote: To do what I think you believe to be happening w.r.t. outer joins, you'd have to have a subquery like: [EMAIL PROTECTED] select a.fookey test-# FROM test-# (SELECT foo.key AS fookey, bar.key as barkey FROM foo LEFT OUTER JOIN b

Re: [GENERAL] correlated delete with 'in' and 'left outer join'

2004-02-26 Thread Mike Mascari
Stephan's solution matches your description of the problem and excutes the logical equivalent of the above much more rapidly... Mike Mascari ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] correlated delete with "in" and "left outer join"

2004-02-26 Thread Mike Mascari
Mike Mascari wrote: Stephan Szabo wrote: On Thu, 26 Feb 2004 [EMAIL PROTECTED] wrote: I'm using postgresl 7.3.2 and have a query that executes very slowly. There are 2 tables: Item and LogEvent. ItemID (an int4) is the primary key of Item, and is also a field in LogEvent. Some ItemI

Re: [GENERAL] pl/pythonu

2004-02-11 Thread Mike Mascari
27;'text'']) plpy.execute(plan,[''blah'']) return ''MODIFY'' 'LANGUAGE plpythonu; Do you have a trigger on 't1' which invokes testing()? Mike Mascari I do have a trigger on t1. The function loads into the database OK, but when

Re: [GENERAL] pl/pythonu

2004-02-11 Thread Mike Mascari
27;'text'']) plpy.execute(plan,[''blah'']) return ''MODIFY'' 'LANGUAGE plpythonu; Do you have a trigger on 't1' which invokes testing()? Mike Mascari ---(end of broadcast)--- T

Re: [GENERAL] Predictive or scoring solution for PostgreSQL ?

2004-02-05 Thread Mike Mascari
Marc A. Leith wrote: Quoting Mike Mascari <[EMAIL PROTECTED]>: Would Joe Conway's PL/R procedural language be any help here? I'd guess there's an R package to fit the bill, but then again I'm only on page 30 of Modern Applied Statistics in S-Plus. ;-) For a turn

Re: [GENERAL] Touch row ?

2004-01-23 Thread Mike Mascari
Mike Mascari wrote: CREATE FUNCTION touch() RETURNS trigger AS ' begin NEW.mod_date = LOCALTIMESTAMP; return NEW; end; ' language 'plpgsql'; CREATE TRIGGER t_foo BEFORE INSERT OR UPDATE ON foo FOR EACH ROW EXECUTE PROCEDURE touch(); If you want timezone information, use TIME

Re: [GENERAL] Touch row ?

2004-01-23 Thread Mike Mascari
begin NEW.mod_date = LOCALTIMESTAMP; return NEW; end; ' language 'plpgsql'; CREATE TRIGGER t_foo BEFORE INSERT OR UPDATE ON foo FOR EACH ROW EXECUTE PROCEDURE touch(); If you want timezone information, use TIMESTAMP WITH TIME ZONE and CURRENTTIMESTAMP. These are transaction start times.

Re: [GENERAL] CTTAS w/ DISTINCT ON crashes backend

2004-01-21 Thread Mike Mascari
n the same cluster, it executes fine??? I'll try and dump the entire database and restore it on a third machine and see if the query crashes that backend as well. But it will take a bit of time. If it does crash what does that mean? If not, what does that mean? Mike Mascari ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] I got bit by that darn GEQO setting again...

2004-01-17 Thread Mike Mascari
Tom Lane wrote: Mike Mascari <[EMAIL PROTECTED]> writes: Tom Lane wrote: Uh ... dare I ask whether you think it's too high? Or too low? Too low. In fact, after testing some of my queries which are a bit large (# of tables) in size, I usually just wind up tur

Re: [GENERAL] I got bit by that darn GEQO setting again...

2004-01-17 Thread Mike Mascari
Tom Lane wrote: Mike Mascari <[EMAIL PROTECTED]> writes: But just as a quick notice to those upgrading from 7.3 to 7.4 with fully normalized databases requiring > 11 joins, the GEQO setting can be a killer... Uh ... dare I ask whether you think it's too high? Or too low?

[GENERAL] I got bit by that darn GEQO setting again...

2004-01-16 Thread Mike Mascari
e a killer... How about a TIP: "For large number of joins, test whether the GEQO settings are right for you" Mike Mascari ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] 7.3.3 drop table takes very long time

2004-01-08 Thread Mike Mascari
ny possibility that he's got an open transacation sitting out there for days holding a lock on that table? Mike Mascari ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Mike Mascari
s killed and never decrements its reference count? Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] last update time of a table

2003-12-05 Thread Mike Mascari
update a seperate table containing the last update time of all tables (not > records) for pulldowns. You can use LISTEN/NOTIFY to do what you want: http://www.postgresql.org/docs/current/static/sql-listen.html > -Jason Mike Mascari [EMAIL PROTECTED] ---(

Re: [GENERAL] linking postgre to AD

2003-11-21 Thread Mike Mascari
SQL" In fact, could you use the above in replacement of this one: ---| V > TIP 4: Don't 'kill -9' the postmaster Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet

Re: [GENERAL] embedded postgresql + C++ IDE

2003-11-13 Thread Mike Mascari
ourceforge: http://sourceforge.net/projects/dev-cpp/ Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] access linux command from SQL Query

2003-11-04 Thread Mike Mascari
r the transaction associated with the email message has been committed. Hope that helps, Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] SET within a function?

2003-10-14 Thread Mike Mascari
rmalization is a good idea: http://www.hughdarwen.freeola.com/TheThirdManifesto.web/Missing-info-without-nulls.pdf Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] SET within a function?

2003-10-13 Thread Mike Mascari
possible solution is to define your own type with an internal status for 'Not a valid value'... HTH, 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: [GENERAL] Pgsql on Windows

2003-10-13 Thread Mike Mascari
Peter Eisentraut wrote: > Dennis Gearon writes: > > >>How soon will 7.5 come out? (yes, I know, 7.4 is beta right now). > > > All signs point to September 24, 2004. Have you verified that with the Master of Ceremonies? Mike Mascari [EMAIL PROTECTED] --

Re: [GENERAL] databse design tutorial

2003-10-06 Thread Mike Mascari
Nagib Abi Fadel wrote: > Hi everybody, > > i need a free tutorial on database design can any help ?? How about "A Simple Guide to Five Normal Forms in Relational Database Theory, Communications of the ACM 26(2), Feb. 1983": http://209.197.234.36/db/simple.html Mike Masca

Re: [GENERAL] Functional index performance question

2003-09-30 Thread Mike Mascari
Arguile wrote: > On Tue, 2003-09-30 at 07:06, Mike Mascari wrote: > >>CREATE INDEX i_employees ON employees(lower(name)); >> >>Let's also assume that the lower() function is computationally >>expensive. Now if I have a query like: >> >>SELECT

[GENERAL] Functional index performance question

2003-09-30 Thread Mike Mascari
name) FROM employees WHERE lower(name) = 'mike' will PostgreSQL re-evaluate lower(name)? Is it necessary? Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

Re: [GENERAL] Problem with ORDER BY and random() ?

2003-09-23 Thread Mike Mascari
FROM tablename ORDER BY random() LIMIT 10) AS data ORDER BY id; HTH, 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: PG + PHP, was Re: [GENERAL] Zend survey result about dbms...

2003-09-20 Thread Mike Mascari
Mike Mascari wrote: > Tom Lane wrote: >>Uh, what exactly does it buy you to involve an environment variable >>in this process? I think it just adds fragility. (For example, >>exposing setenv to the user creates the risk that he'll overwrite >>something of impor

Re: PG + PHP, was Re: [GENERAL] Zend survey result about dbms...

2003-09-20 Thread Mike Mascari
Tom Lane wrote: > Mike Mascari <[EMAIL PROTECTED]> writes: > >>In the past, one hack would be to use setenv() and getenv() of the >>backend to implement these functions. What about a contrib module that: > > > Uh, what exactly does it buy you to involve

Re: PG + PHP, was Re: [GENERAL] Zend survey result about dbms...

2003-09-20 Thread Mike Mascari
the key (PG_APP_SESSION_VAR) is made to see if a map exists. If so, it is emptied. This way, no change to any internal postgres code is required, the memory allocated to the session-specific variables gets released at backend closing, etc. Would something like that be acceptable? Mike Mascari [E

Re: [GENERAL] OT: HEADS-UP: viral storm out there

2003-09-19 Thread Mike Mascari
Bruno Wolff III wrote: > On Fri, Sep 19, 2003 at 18:44:24 -0400, > Mike Mascari <[EMAIL PROTECTED]> wrote: > >>In keeping with being off topic, how do people feel about Verisign >>wild-carding the .com and .net domain names so any miskeys >>(www.someu

Re: [GENERAL] anyone use Ora2Pg?

2003-09-19 Thread Mike Mascari
table? Any triggers? Can we see the schema definition of this table? What version of PostgreSQL? What type of machine is this? TRS-80 perhaps? ;-) Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desi

Re: [GENERAL] anyone use Ora2Pg?

2003-09-19 Thread Mike Mascari
ad > 1 million rows of data that took less than an hour. In fact, IIRC, the restore of the entire dump took around 30 minutes. pg_dump generates output that: 1. Creates the tables (and dependent objects) 2. Uses COPY to import the data 3. Creates indexes over the newly imported data Somethin

Re: [GENERAL] Image data type equivalent in postgresql

2003-09-18 Thread Mike Mascari
e your own 'image' type using CREATE TYPE. You could also alias the 'bytea' type via CREATE DOMAIN. HTH, Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] PostgreSQL versus MySQL

2003-09-18 Thread Mike Mascari
Joshua D. Drake wrote: > Hello, > > I think the below just about says it all: > > http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg > > Sincerely, > > Joshua Drake Too bad the symbol of Oracle Corp. isn't a peanut..

Re: [GENERAL] State of Beta 2

2003-09-16 Thread Mike Mascari
t good is an in-place upgrade without new features? (I'm kinda joking here) ;-) Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Constructing column from different individual fields

2003-09-10 Thread Mike Mascari
---+ >1 | Stevo > 2 | John Fisk SELECT uid, (CASE WHEN prefname = 1 THEN nickname ELSE realname END) AS "Preferred Name" FROM users WHERE ... HTH, Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] About GPL and proprietary software

2003-09-02 Thread Mike Mascari
o bet that dynamic linking to a > GPL'ed library doesn't invoke the GPL then I think you're taking a > gamble. Clearly you think you know more about the law than the FSF > General Counsel Eben Moglen (professor of law at Columbia). A bit hypersensitive, aren't we?

Re: [GENERAL] left outer join terrible slow compared to inner join

2003-08-28 Thread Mike Mascari
#x27;ve found that PostgreSQL, when left to its own devices, can often choose to evaluate a UDF before a join, where the join would have been far less costly to evaluate first. I haven't tried 7.4beta though. It may solve all your problems and answer all your questions. For me, each release ha

Re: [GENERAL] Functions have 32 args limt ???

2003-08-28 Thread Mike Mascari
Ivar wrote: >>I'd suggest looking at the mailing list archives > > What I must look for ??? http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3D4C4A1D.10100%40joeconway.com&rnum=1&prev=/groups%3Fq%3DFUNC_MAX_ARGS%26ie%3DUTF-8%26oe%3DU

Re: [GENERAL] is linux ready for databases ? (Ziff Davis article

2003-08-26 Thread Mike Mascari
omes in, keeping all other queries waiting in queue, since the system would be incapable of parallel processing." Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

[GENERAL] pl/R questions

2003-08-01 Thread Mike Mascari
47.3 7 140066.5 8 141078.3 9 142099.1 10 143119.1 11 144131.7 12 145151.7 Not the predicted y's for the new x1's and x2's. I tried: f <- predict.mlm(lm(ys ~ xm), samples) and got: Error in object$coefficients[piv, ] : incorrect number of dimensions And I have no mlm() to use.

Re: [GENERAL] Unused Indexes

2003-07-30 Thread Mike Mascari
Mike Mascari wrote: > Tim McAuley wrote: > >>Hi, >> >>I have a table which I have populated with over 5000 entries. There is a >>combined index placed on two of the columns (both bigint). I am trying >>a simple select (i.e. select id where col1 = 1 and col

Re: [GENERAL] Unused Indexes

2003-07-30 Thread Mike Mascari
keeps using a seq scan. Is this correct? I > would have thought that with this number of entries that an index scan > should be used. You must cast the 1 to a bigint: SELECT id WHERE col1 = 1::bigint AND col1 = 2::bigint This should probably be listed under FAQ 4.8, but it isn't. H

Re: [GENERAL] Wacky query plan, why?

2003-07-25 Thread Mike Mascari
I prefer the PostgreSQL extended form: UPDATE prod.t_results SET expdate = work.termdate.termdate WHERE prod.t_results.docid = work.termdate.docid; Hope that helps, Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Postgres unique index checking and atomic transactions

2003-07-24 Thread Mike Mascari
round for "eary SQL implementations" is: BEGIN; UPDATE tab SET pk = - (pk + 1); UPDATE tab SET pk = - (pk); END; Hope that helps, Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] using EXISTS instead of IN: how?

2003-07-22 Thread Mike Mascari
Felipe Schnack wrote: > Why using IN is not advisable??? http://www.postgresql.org/docs/faqs/FAQ.html#4.22 But I believe Tom has fixed this for the upcoming 7.4. Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe

Re: [GENERAL] using EXISTS instead of IN: how?

2003-07-22 Thread Mike Mascari
CT 1 FROM states WHERE people.state = states.id AND states.name ~* 'r' ); But I don't see why you just don't use a join: SELECT people.name FROM people, states WHERE people.state = states.id AND states.name ~* 'r'; Hope that helps, Mike Mascari [EMAIL PROTECTED]

Re: [GENERAL] different transaction handling between postgresql and

2003-07-14 Thread Mike Mascari
Peter Childs wrote: > On Mon, 14 Jul 2003, Mike Mascari wrote: > >>Jörg Schulz wrote: >> >>Presumably Oracle is not rolling back a duplicate key violation, >>allowing the transaction to continue. This is an often requested >>feature not present in

Re: [GENERAL] different transaction handling between postgresql and

2003-07-14 Thread Mike Mascari
... > SQL> select * from a; > > A > -- > 1 > 3 > 4 > 2 Presumably Oracle is not rolling back a duplicate key violation, allowing the transaction to continue. This is an often requested feature not present in PostgreSQL

Re: [GENERAL] select null + 0 question

2003-07-13 Thread Mike Mascari
FROM foo; SQL has its problems. Of course, you could avoid this entirely by not using NULLs :-) 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: [GENERAL] making multiple updates use indexes: howto?

2003-07-07 Thread Mike Mascari
e of its portability: UPDATE stockline SET status = 3 WHERE stockline.id = lap_mpdetail_view.id AND lap_mpdetail_view.lap = 3976; 3. I assume you've executed VACUUM ANALYZE. 4. I assume that stockline is not a small table where the query optimizer determined a sequential scan would be faster. Hope tha

Re: [GENERAL] Duplicate key insert question

2003-07-02 Thread Mike Mascari
Lincoln Yeoh wrote: > At 01:51 AM 7/2/2003 -0400, Mike Mascari wrote: > >> > Maksim Likharev wrote: >> >>I do not know how that will work for PG, but in Microsoft SQL Server >> >>you can do following >> >>BEGIN TRANSACTION >>

Re: [GENERAL] Duplicate key insert question

2003-07-01 Thread Mike Mascari
t be achieved, and you absolutely cannot handle a race condition causing a unique key violation, you might as well just use LOCK TABLE. You might also want to investigate the userlocks in /contrib, although I haven't used them so I cannot speak to their usefulness. Mike Masca

Re: [GENERAL] INSERT WHERE NOT EXISTS

2003-06-25 Thread Mike Mascari
uld be "FROM dual"). I proposed that same solution 3 years ago. Tom shoots it down: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3A4D6116.1A613402%40mascari.com&rnum=1&prev=/groups%3Fq%3DMike%2BMascari%2BINSERT%2BNOT%2BEXISTS%26ie%3DUTF-8

Re: [GENERAL] capturing and storing query statement with rules

2003-06-24 Thread Mike Mascari
olds the query statement as a string? > > I think this shows how to do what you want: > http://archives.postgresql.org/pgsql-sql/2003-05/msg00301.php Maybe debug_query_string should be mapped into a variable like CURRENT_USER? Perhaps something like CURRENT_QUERY? Mi

Re: [GENERAL] Failure to install 7.3.3

2003-06-24 Thread Mike Mascari
dependencies don't explicitly state a requirement for them, I have found that I must also install termcap-devel to get readline support to build. Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: plpython? (Was: Re: [GENERAL] Damn triggers and NEW)

2003-06-19 Thread Mike Mascari
Now a cascade of dependencies will be broken because of this. I've embedded Python in applications myself and used the rexec module for "alleged" protection. Imagine if the Java applet folks, having encountered security problems in the past, just said, "this is too hard"

  1   2   >