Re: [GENERAL] partitioned table query question

2007-12-11 Thread Mike Rylander
On Dec 10, 2007 8:01 PM, Erik Jones <[EMAIL PROTECTED]> wrote: > [snip] > Again, though, is there some better way to go about implementing some > kind of hash based partitioning in postgres besides this that would > be more natural wrt queries? > Adding a column to hold the result of the %, perha

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-19 Thread Mike Rylander
On 8/9/07, cluster <[EMAIL PROTECTED]> wrote: > Thanks for your response! Let me try to elaborate what I meant with my > original post. > > If R is the set of words in the tsvector for a given table row and S is > the set of keywords to search for (entered by e.g. a website user) I > would like to

Re: [GENERAL] tsearch2: word position

2007-02-22 Thread Mike Rylander
the first 1000 bytes are more important, no? No, the first X aren't more important, but being able to determine word proximity is very important for partial phrase matching and ranking. The closer the words, the "better" the match, all else being equal. -- Mike Rylander [EMAIL

Re: [GENERAL] case insensitive match in unicode

2006-04-07 Thread Mike Rylander
s/\p{Mn}+//ogsm; return NFC($string); $func$ LANGUAGE 'plperl' STRICT; It's untested and won't be as fast as ICU, but it should get the job done. Hope it helps! > > Thanks > Balázs > > ---(end of broadcast)--- > TIP 6:

Re: [GENERAL] Dynamic datalogging function/scheme

2006-02-15 Thread Mike Rylander
ed to remember to go in and change > the function. > > Running Postgresql 8.1 > > Thanks for any advice/help! > > > -------(end of broadcast)--- > TIP 2: Don't 'kill -9' the postmaster > -- Mike Rylander [EMAIL

Re: [GENERAL] TSearch2 / German compound words / UTF-8

2006-01-30 Thread Mike Rylander
g@sai.msu.su, http://www.sai.msu.su/~megera/ > phone: +007(495)939-16-83, +007(495)939-23-83 > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Need Licensing Information for bundling POSTGRESQL With Softwares

2006-01-02 Thread Mike Rylander
e availability of > POSTGRESQL for Windows/Linux and other platforms is the main reason we are > planning to choose POSTGRESQL > > - Rajendra Talekar > Chief Developer and Managing Director > Codexpert Systems -- Mike Rylander [EMAIL PROTECTED] GPLS

Re: [GENERAL] Inheritance Algebra

2005-12-23 Thread Mike Rylander
esn't cover UPDATEs of course, but that should be easy enough to do. It does, however, give you a simple "type" lookup table if you happen to have a pid in hand and want to know what it is. Thoughts? > > Karsten > -- > GPG key ID E4071346 @ wwwkeys.pgp.net > E167 67FD A291 2BEA 7

Re: [GENERAL] Memory Leakage Problem

2005-12-12 Thread Mike Rylander
On 12/12/05, Will Glynn <[EMAIL PROTECTED]> wrote: > Mike Rylander wrote: > > >Right, I can definitely see that happening. Some backends are upwards > >of 200M, some are just a few since they haven't been touched yet. > > > > > >>Now, multiply

Re: [GENERAL] fts, compond words?

2005-12-12 Thread Mike Rylander
and chicago, or new followed by york at a distance of 1." where the modifier to the '+' operator could be specified by the user initially if desired. While I understand and agree that "phrase searching" would be the most common use for proximity+direction operator modifie

Re: [GENERAL] fts, compond words?

2005-12-08 Thread Mike Rylander
(foo1 + forbruk + vare + merke + lov) | (foo2 + forbruk + vare + merke + lov) ) & ! bar # explode the compound words to their "decomposed" form, because that's what ought to be in the indexed data That meets the same criteria as the simpler example above, and I've not sa

Re: [GENERAL] Memory Leakage Problem

2005-12-08 Thread Mike Rylander
On 12/8/05, Tom Lane <[EMAIL PROTECTED]> wrote: > Mike Rylander <[EMAIL PROTECTED]> writes: > > To cut to the chase, here are > > some numbers for everyone to digest: > >total gnu ps resident size > > # ps ax -o rss|perl -e '

Re: [GENERAL] Memory Leakage Problem

2005-12-07 Thread Mike Rylander
source as free, because: # dstat -m 1 --memory-usage- _used _buff _cach _free 13G 322M 8095M 9.8G Now, I'm not blaming Pg for the apparent discrepancy in calculated vs. reported-by-free memory usage, but I only noticed this after upgrading to 8.1. I'll collect any more

Re: [GENERAL] fts, compond words?

2005-12-07 Thread Mike Rylander
I think that's a case of how the compiled expression is built from user input. Unless I'm mistaken a + ( foo1 | foo2 ) is exactly equal to (a + foo1) | (a + foo2) Ahhh... but then there is the more complex example of a + foonish + bar becoming a + (foo1 | foo2) + bar ...

Re: [GENERAL] fts, compond words?

2005-12-07 Thread Mike Rylander
nt '&' op, as in '&[dist<=1]' meaning "next token follows with a max distance of 1". I imagine that it would only be useful on unstripped tsvectors, but if the lexem position is already stored ... -- Mike Rylander [EMAIL PROTECTED] GPLS --

Re: [GENERAL] fts, compond words?

2005-12-05 Thread Mike Rylander
ere must be a occurence of 'new' before > 'york'" (stemmed not really exact phrase)? > What you'll want to do is check the original text for the exact phrase after the tsearch2 index has given you some targets. Given table foo: CREATE TABLE foo ( id

Re: [GENERAL] Implementing a change log

2005-09-20 Thread Mike Rylander
isk layout of the rest of the audit data by creating holes in the audit table (or having to CLUSTER the table). * http://www.postgresql.org/docs/8.0/interactive/sql-createtable.html -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org -

Re: [GENERAL] Implementing a change log

2005-09-20 Thread Mike Rylander
On 9/20/05, Berend Tober <[EMAIL PROTECTED]> wrote: > /* > The following is based on suggestion by Mike Rylander posted on > Postgresql-General > Sun, 18 Sep 2005 23:29:51 + > > Rylander's original suggestion employed a trigger and tracked > only row updates

Re: [GENERAL] Implementing a change log

2005-09-18 Thread Mike Rylander
logged about my most recent incarnation of "audit tables" here: http://open-ils.org/blog/?p=28 . We don't use Postgres users (we have 2 million), but it would be trivial to modify what I've done there to work with real PG users or any other particulars of your environment.

Re: [GENERAL] to_ascii, or some other form of magic transliteration

2005-09-11 Thread Mike Rylander
r text. The conversion > > can be done automatically using a trigger, and I have one in PL/PERLU > > that I use. It basically boils down to: > > > > 1) transform unicode text to normal form D > > 2) strip combining non-spacing marks > > > > In modern Perls

Re: [GENERAL] to_ascii, or some other form of magic transliteration

2005-09-10 Thread Mike Rylander
desire to >choose an index scan if your joining column's datatypes do not >match > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Select gives the wrong results

2005-08-29 Thread Mike Rylander
181 |441 | 2 | 1042520400 > 1152 |434 | 2 | 1032321600 > 1129 |410 | 2 | 1024027200 > (11 rows) > > Anyone see what's going on here? > > Thanks! > Crystle > > > -- > Crystle Numan, B.Sc., Web Developer > Guided Vision: the possibilities are endle

Re: [GENERAL] speeding up a query on a large table

2005-08-17 Thread Mike Rylander
big problems with a large GiST index I just used cat to dump it at /dev/null and the OS grabbed it. Of course, that was on linux so YMMV. -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)

Re: [GENERAL] Trigger on Update

2005-07-15 Thread Mike Rylander
*/ NEW.updated_date = NOW(); RETURN NEW; > end; > $body$ > LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; See http://www.postgresql.org/docs/8.0/interactive/plpgsql-trigger.html -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development

Re: [GENERAL] tsearch2 and case

2005-07-04 Thread Mike Rylander
that's not supported at this time). To do phrase searching just add an additional WHERE clause to your query: SELECT id FROM tab WHERE ts_idx_col @@ to_tsquery('history&lesson') AND text_col ~* '.*history\\s+lesson.*'; The full-text index will still be used, and th

Re: [GENERAL] Fyracle?

2005-06-06 Thread Mike Rylander
at have to be repaired by hand are really fun. ;) > Anybody else care to comment? > Their PL bullet point looks like postgres should have at least a partial circle (..."in which languages? PL/SQL or similar, Java, C/C++?...similar enough to your current database to allow for a

Re: [GENERAL] Audit trail ?

2005-05-29 Thread Mike Rylander
e precious... We use the "audit table per real table" approach. The SQL script to create the audit trail functions and triggers is attached. There are three example audit trail table creation calls right before the COMMIT. Hope that helps! -- Mike Rylander [EMAIL PROTECTED] GPLS --

Re: [GENERAL] psql vs perl prepared inserts

2005-04-14 Thread Mike Rylander
a. This is in the docs, but it's not easy to find. It's actually just one line in the "Notes" section of http://www.postgresql.org/docs/8.0/static/sql-copy.html . Perhaps we should add some more verbiage (he says, non-voluntarily...)? -- Mike Rylander [EMAIL PROTE

Re: [GENERAL] COPY command use UTF-8 encoding and NOT UNICODE(16bits)... please confirm. Should postgresql add :set CLIENT_ENCODING to 'UTF-8'; to avoid confusion

2005-04-06 Thread Mike Rylander
CODE UCS-2 encoding > > Postgres only supports UTF-8, not any other encoding of Unicode. Sorry. > You can use iconv to convert the file on a *nix-like system, and there may even be a cygwin build if you're on Windows. http://www.gnu.org/software/libiconv/ -- Mike Rylander [EMAI

Re: [GENERAL] Drivers for Other Languages

2005-03-30 Thread Mike Rylander
broadcast)--- > TIP 6: Have you searched our list archives? > >http://archives.postgresql.org > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] general purpose full text indexing

2005-03-28 Thread Mike Rylander
nguage. > You may want to look at the pg_tgrm contrib module. It is a simpler "similarity" matcher. -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 3:

Re: [GENERAL] Exporting to XML

2005-03-22 Thread Mike Rylander
Bibliographic(esqe) data, eh? See my sig. :) > > Any suggestions on what might be a good way to tackle this problem, > gratefully recieved > It depends on how the data is structured in the DB (I'm storing MARCXML, myself) but I would suggest using a perl script with a Templat

Re: [GENERAL] partitionning

2005-03-12 Thread Mike Rylander
On Sun, 13 Mar 2005 00:18:39 +0100, Martijn van Oosterhout wrote: > On Sat, Mar 12, 2005 at 08:24:20PM +0000, Mike Rylander wrote: > > There is now way to have PG completely skip the unused partitions. > > However, with an index on the "partitioner" column of each pa

Re: [GENERAL] partitionning

2005-03-12 Thread Mike Rylander
On Sat, 12 Mar 2005 17:39:38 +0100 (CET), Christian Kratzer <[EMAIL PROTECTED]> wrote: > Hi, > > On Sat, 12 Mar 2005, Mike Rylander wrote: > > > Back to the original question on this thread, and using PG 8.0.1. > > Perhaps someone would like to poke holes in this (

Re: [GENERAL] partitionning

2005-03-12 Thread Mike Rylander
pefully not. They are useful for other things, too. > > Karsten > -- > GPG key ID E4071346 @ wwwkeys.pgp.net > E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscrib

Re: [GENERAL] postgres 8 settings

2005-03-10 Thread Mike Rylander
gt; _ > Click, Upload, Print. http://www.kodakexpress.co.in?soe=4956 Deliver in > India. > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > >

Re: [GENERAL] Backupping the table values

2005-02-27 Thread Mike Rylander
ETE on B, and the insertion order in the backup schema should be correct. That is, if you really need the foreign keys on the backup schema at all. If the backup is only written to by triggers the foreign keys may be a waste. -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Dev

Re: [GENERAL] comparing dates with timestamps ?

2005-02-13 Thread Mike Rylander
) timestamp::DATE in ((select date from table where...)) -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] databases/p5-postgresql-plperl links to wrong

2005-02-11 Thread Mike Rylander
l > works at all on 64bit arches? > It's been working fine for me on Gentoo Linux / AMD64. -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] What talk would get you to go to OSCon?

2005-02-08 Thread Mike Rylander
h big big big data Check! > View/Functions > Indexing > Building a datawarehouse Check! BTW, thanks in advance! -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast

Re: [GENERAL] Help with strange join

2005-02-07 Thread Mike Rylander
On Mon, 7 Feb 2005 12:34:39 +0100, Victor SpÃng Arthursson <[EMAIL PROTECTED]> wrote: > > 2005-02-04 kl. 20.36 skrev Mike Rylander: > > > How about: > > > > SELECT r.* FROM opskrifter r JOIN opskrifter_content c ON (r.nummer = > > c.opskrift) JOIN ops

Re: [GENERAL] Help with strange join

2005-02-04 Thread Mike Rylander
On Fri, 4 Feb 2005 17:52:45 +0100, Victor SpÃng Arthursson <[EMAIL PROTECTED]> wrote: > > 2005-02-04 kl. 13.00 skrev Mike Rylander: > > > Can you send the table structure and the query that does this? It may > > just be a matter of adding a subselect with a HAVING cl

Re: [GENERAL] error-tolerant COPY FROM

2005-02-04 Thread Mike Rylander
On Fri, 4 Feb 2005 13:56:23 +0100 (CET), Joolz <[EMAIL PROTECTED]> wrote: > If is has to be perl, so be it, although I'm not a big fan. Do you > think this is possible in python? > Sure. I just suggested Perl since that's my QnD tool of choice. -- Mike Rylander [EMAIL

Re: [GENERAL] error-tolerant COPY FROM

2005-02-04 Thread Mike Rylander
ks a lot! How about a Perl script that uses DBI with autocommit turned on and loops over the file using (something like) 'while (my @line = split(',',scalar(<>)) {}'? Perl tracks the line number of the current input file (including STDIN) in $. (dollar-period). If you

Re: [GENERAL] Help with strange join

2005-02-04 Thread Mike Rylander
umber of entrys in the table > "related_ingredients". Can you send the table structure and the query that does this? It may just be a matter of adding a subselect with a HAVING clause, but we won't know until we have more information. -- Mike Rylander [EMAIL PROTECTE

Re: [GENERAL] modifying views

2005-02-03 Thread Mike Rylander
ll OK. If you want to test safely you could do a full load of 'pg_dump -s' (again, just the schema) into a temp database and test the script there. > I could use any help that you can give me. > Thanks > Sim Hope that counts as help! -- Mike Rylander [EMAIL PROTECTED] GPLS --

Re: [GENERAL] Splitting queries across servers

2005-01-29 Thread Mike Rylander
t: postgresql-8.0.0beta4 $ time make -j 5 ... lots of output ... real0m41.274s user1m36.315s sys 0m15.451s -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TI

Re: [GENERAL] Splitting queries across servers

2005-01-29 Thread Mike Rylander
On Sat, 29 Jan 2005 09:55:15 -0800, Max <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of Mike Rylander > > Sent: Friday, January 28, 2005 4:02 AM > > To: Max; PgSql Ge

Re: [GENERAL] Splitting queries across servers

2005-01-28 Thread Mike Rylander
uch less. I can attest to the fact that 4 x Opterons work VERY nicely. ;) > > Max > > ---(end of broadcast)--- > TIP 8: explain analyze is your friend > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database De

Fwd: [GENERAL] sorting library of congress numbers

2005-01-19 Thread Mike Rylander
Opps... resending to list as well. Perhaps someone can add more insight below. And check the documentation at http://borg.postgresql.org/docs/8.0/interactive/extend.html . -- Forwarded message -- From: Mike Rylander <[EMAIL PROTECTED]> Date: Thu, 20 Jan 2005 00:05:40

Re: [GENERAL] sorting library of congress numbers

2005-01-19 Thread Mike Rylander
arison functions, create a new operator class, and assign them names like "~>" and "~<". See the documentation here: http://www.postgresql.org/docs/8.0/interactive/xoper.html . -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Array to rowset function

2005-01-17 Thread Mike Rylander
to another person, use > it for any purpose or store or copy the information in any medium. > > ---(end of broadcast)--- > TIP 5: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faqs/F

Re: [GENERAL] pgsql question

2004-12-28 Thread Mike Rylander
gt; > TIA > > Groeten, > > Joost Kraaijeveld > Askesis B.V. > Molukkenstraat 14 > 6524NB Nijmegen > tel: 024-3888063 / 06-51855277 > fax: 024-3608416 > e-mail: [EMAIL PROTECTED] > web: www.askesis.nl > > ---(end of broadcast)

Re: [GENERAL] WAL/pg_xlog on Another Disk: Redundancy?

2004-12-15 Thread Mike Rylander
-- > Thomas F. O'Connell > Co-Founder, Information Architect > Sitening, LLC > http://www.sitening.com/ > 110 30th Avenue North, Suite 6 > Nashville, TN 37203-6320 > 615-260-0005 > > ---(end of broadcast)--- > TIP 8:

Re: [GENERAL] postgresql and javascript

2004-12-10 Thread Mike Rylander
There is this from Mozilla: http://www.mozilla.org/projects/sql/ On Tue, 7 Dec 2004 10:27:05 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Does anyone know how to connect javascript to a postgresql database > > Please send example if anyone has done it > -- Mi

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-06 Thread Mike Rylander
#x27;re merrie than you know. :) > -alex > > ---(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 l

[GENERAL] MIKE COX is a CUM SUCKING FAGGOT

2004-11-16 Thread Mike Rylander
Mike Cox is responsible for all this Usenet crap! Mike Rylander [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] How the function written on pl/pgsql can be called by the function written on plperl.

2004-11-16 Thread Mike Rylander
function from plperl.. > > Anatoly Okishev > > ---(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 > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] need simple strategy for universal extension table

2004-11-13 Thread Mike Rylander
EATE TRIGGER sometable_remove_entity_trig BEFORE DELETE ON someschema.sometable FOR EACH ROW EXECUTE PROCEDURE func.remove_entity_entry(someschema); I am supplying the schema name to the trigger because the relation name passed in as TG_RELNAME is the schema unqualified table na

Re: [GENERAL] Query problem...

2004-10-03 Thread Mike Rylander
You may want to take a look at the ltree and tablefunc contrib modules. They both allow you to do something like this, and the abstract away the difficulty of query building. ltree will allow you to precompute the tree, and the tablefunc module has a connectby() function for runtime parent-child

[GENERAL] NNTP server

2004-07-27 Thread Mike Rylander
I hope I'm not reporting a known problem, but it seems that the NNTP server is not getting new postings any more. Thanks in advance! -- Mike Rylander [EMAIL PROTECTED] Indentation is a wonderful form of commentary from programmer to programmer, but its symbology is largely wasted o

Re: [GENERAL] Row-level security--is it possible?

2004-07-08 Thread Mike Rylander
Michal Taborsky wrote: > Doug McNaught wrote: >> But why not create a "products_restricted" view that uses the >> CURRENT_USER function to see who's running it? >> >> CREATE VIEW products_restricted AS >> SELECT * FROM products WHERE Producer_ID = get_producer_id(CURRENT_USER); >> >> [CURRENT_

Re: [GENERAL] multiple count functions in a select statement

2004-06-01 Thread Mike Rylander
On Monday 31 May 2004 04:32 pm, Oliver Elphick wrote: > On Thu, 2004-05-27 at 17:38, Jeannie Stevenson wrote: > ... > > > In MSSQL I would use > > > > select > > count_1=(select count(ad_code) AS "CP" from leads where ad_code = > > '555'), > > count_2=(select count(ad_code) AS HED" from leads where

Re: [GENERAL] Am I locking more than I need to?

2004-05-22 Thread Mike Rylander
On Friday 21 May 2004 06:24 pm, Jeff Davis wrote: > On Fri, 2004-05-21 at 14:33, Carl E. McMillin wrote: > > Scenario: > > > > SELECT ... WHERE cart_id=X FOR UPDATE > > > > IF (NOT FOUND) THEN > > BEGIN > > --Here is where nothing is locked. > > --No way to guarantee no one else will create a rec

Re: [GENERAL] [HACKERS] MERGE-esque Functionallity (was: Adding MERGE to the TODO list (resend with subject))

2004-05-14 Thread Mike Rylander
On Tuesday 11 May 2004 09:44 am, Bruce Momjian wrote: [snip] > > > > Bruce Momjian kirjutas E, 10.05.2004 kell 06:58: > > > > > Added to TODO: > > > > > > > > > > * Add MERGE command that does UPDATE, or on failure, INSERT > > > > [snip] Hello all. I have been lurking here for a bit and the