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
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
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
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:
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
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
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
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
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
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
(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
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 '
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
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
...
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 --
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
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
-
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
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.
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
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
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
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)
*/
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
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
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
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 --
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
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
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
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:
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
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
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 (
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
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?
>
>
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
)
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
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]
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
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
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
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
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
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
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 --
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
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
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
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
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
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
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)
--
> 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:
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
#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
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])
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
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
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
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
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_
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
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
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
65 matches
Mail list logo