Re: [GENERAL] Update on tables when the row doesn't change

2005-05-25 Thread Dawid Kuroczko
On 5/24/05, Sebastian Böck <[EMAIL PROTECTED]> wrote: > /* 3rd way of separating updates >con: unnecessary updates on tables >pro: view gets evaluated only 1 time > >Not adressing the problem of unnecessary updates, but the view >gets only evaluated one time. > > */ > > CREATE OR

Re: [GENERAL] Count and Results together

2005-05-19 Thread Dawid Kuroczko
On 5/19/05, Dawid Kuroczko <[EMAIL PROTECTED]> wrote: > On 5/19/05, Jan Sunavec <[EMAIL PROTECTED]> wrote: > > I am using libpg.so. I tryed find solution for this problem in internet > > but, I don't find nothing yet. I have idea get rowcount throught some > >

Re: [GENERAL] Count and Results together

2005-05-19 Thread Dawid Kuroczko
On 5/19/05, Jan Sunavec <[EMAIL PROTECTED]> wrote: > I am using libpg.so. I tryed find solution for this problem in internet > but, I don't find nothing yet. I have idea get rowcount throught some > function write in C. Or is there any plan add this feature into PostgreSQL? Theoretically you could

Re: [GENERAL] Intervals

2005-04-26 Thread Dawid Kuroczko
On 4/26/05, Jake Stride <[EMAIL PROTECTED]> wrote: > Is there a way to convert in interval into hours? I have a table that > records the amount of time worked by a person and want to sum up all the > hours, however with the column being an interval once you reach more > than 24 hours it turns that

Re: [GENERAL] Optimising Union Query.

2005-04-22 Thread Dawid Kuroczko
On 4/22/05, Rob Kirkbride <[EMAIL PROTECTED]> wrote: > I've got a query that takes quite some time to complete. I'm not an SQL > expert so I'm not sure how to improve things. > I've done a explain analyze and as I expected the database has to check > every row in each of the three tables below but

Re: [GENERAL] Filesystem options for storing pg_data

2005-04-21 Thread Dawid Kuroczko
On 4/21/05, Marco Colombo <[EMAIL PROTECTED]> wrote: > > > > Generally XFS and JFS are considered superior to ext2/3. > > > Do you mind posting a reference? I'm really interested in the comparison > > > but everytime I asked for a pointer, I got no valid resource, so far. > Well, my point being the

Re: [GENERAL] psql vs perl prepared inserts

2005-04-14 Thread Dawid Kuroczko
On 4/13/05, Matt Van Mater <[EMAIL PROTECTED]> wrote: > > The intent of prepared statements is to reduce the overhead of running > > the parser, rewriter and planner multiple times for a statement that is > > executed multiple times. For an INSERT query without any sub-selects > > that is not rewri

Re: [GENERAL] psql vs perl prepared inserts

2005-04-13 Thread Dawid Kuroczko
On 4/12/05, Matt Van Mater <[EMAIL PROTECTED]> wrote: > I've been experimenting with loading a large amount of data into a > fairly simple database using both psql and perl prepared statements. > Unfortunately I'm seeing no appreciable differences between the two > methods, where I was under the im

Re: [GENERAL] Help with converting hexadecimal to decimal

2005-04-01 Thread Dawid Kuroczko
On 31 Mar 2005 21:22:12 -0600, Doug Quale <[EMAIL PROTECTED]> wrote: > > > I basically want to convert a a hexadecimal to a decimal. > > Sure: > > > > test=> SELECT x'10'::integer; > >int4 > > -- > > 16 > > (1 row) Oh, some time ago I was looking for such a f

Re: [GENERAL] Delay INSERT

2005-03-25 Thread Dawid Kuroczko
On Wed, 23 Mar 2005 12:33:00 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: > Dawid Kuroczko <[EMAIL PROTECTED]> writes: > > PostgreSQL doesn't have such issues with blocking, so only difference > > between INSERT and INSERT DELAYED from PostgreSQL's standpoint

Re: [GENERAL] Delay INSERT

2005-03-23 Thread Dawid Kuroczko
On Wed, 23 Mar 2005 14:50:47 +, Richard Huxton wrote: > ON.KG wrote: > > Hi > > > > Does PostgreSQL have something like "INSERT DELAYD" - like it is used in > > MySQL? > > > > or any other way to delay inserting? > > What precisely does this do? It adds an insert into a 'do this' queue and r

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Dawid Kuroczko
On Sun, 30 Jan 2005 20:23:15 +1100, Neil Conway <[EMAIL PROTECTED]> wrote: > Josh Berkus wrote: > > If you know of a PostgreSQL package, from any source, that installs with > > trust > > on network ports, please notify Core (and Core only, please). > > Why only -core? I think it is in good taste

Re: [GENERAL] Export a column in a view without "announcing" it?

2005-01-29 Thread Dawid Kuroczko
On Wed, 26 Jan 2005 11:10:07 -0500, Frank D. Engel, Jr. <[EMAIL PROTECTED]> wrote: > I'm fairly certain there is currently no way to do this, but it would So am I. :) > Is there any way to expose a column in a view without "announcing" the > fact that it is there? Specifically, in order to suppor

Re: [GENERAL] inet-type sequence

2005-01-29 Thread Dawid Kuroczko
On Sat, 29 Jan 2005 22:24:46 +0300, Andrey V. Semyonov <[EMAIL PROTECTED]> wrote: > Hi there. > How do I create a sequence of type inet for automatic assignment an > IP/32 to a new row? > Neither nextval() nor CREATE SEQUENCE seem for me to work with type inet > (PostgreSQL 8.0.0, pgAdmin III v 1.

Re: [GENERAL] Foreign Key relationship between two databases

2005-01-27 Thread Dawid Kuroczko
On Thu, 27 Jan 2005 18:47:44 +0530, Sandeep Gaikwad <[EMAIL PROTECTED]> wrote: > Hi, > I am using postgres 7.3.4. I am new to postgres. > I can give foreign key relationship between two tables of same > database. Can I give foreign key relationship between tables of two databases

Re: [GENERAL] Lower case

2005-01-27 Thread Dawid Kuroczko
On Thu, 27 Jan 2005 00:16:14 +, Vladimir S. Petukhov <[EMAIL PROTECTED]> wrote: > > > LC_COLLATE: ru_RU > > > LC_CTYPE: ru_RU > > >Name| Owner | Encoding > > > ---+--+-- > > > testdb | postgres | UNICODE

Re: [GENERAL] Lower case

2005-01-26 Thread Dawid Kuroczko
On Wed, 26 Jan 2005 12:01:49 +, Vladimir S. Petukhov <[EMAIL PROTECTED]> wrote: > I want to do case-insensitivity search, like this > ... WHERE lower (column_name) LIKE lower (%value%); > This work fine for English.. > But i need search for Russian words, lower() operator does not work with > R

Re: [GENERAL] Unique Index

2005-01-20 Thread Dawid Kuroczko
On Thu, 20 Jan 2005 15:20:26 +1100, Alex <[EMAIL PROTECTED]> wrote: > I actually just wanted to know if there is a way around this problem. > Obviously it is implemented that way for whatever reason. Well, if you really need it, partial indexes are your friends! :) For clarity, let's say you have

Re: [GENERAL] COMMIT within function?

2004-11-22 Thread Dawid Kuroczko
On Sun, 21 Nov 2004 20:10:03 -0700, Michael Fuhr <[EMAIL PROTECTED]> wrote: http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING > > BEGIN > DELETE FROM values WHERE value_id = r.value_id; > EXCEPTION > WHEN foreign_key_violation THEN >

Re: [GENERAL] COMMIT within function?

2004-11-21 Thread Dawid Kuroczko
On Mon, 22 Nov 2004 00:16:07 +0100, Pierre-Frédéric Caillaud <[EMAIL PROTECTED]> wrote: > > > Suppose I have vacuum_values() function, which removes all > > "no longer referenced" by parent column. Kind of function > I suppose you have a good reason to not use a foreign key with "ON > DE

[GENERAL] COMMIT within function?

2004-11-21 Thread Dawid Kuroczko
Suppose I have vacuum_values() function, which removes all "no longer referenced" by parent column. Kind of function to be run from time to time to clean table from crud. It looks like this: CREATE FUNCTION vacuum_values() RETURNS void AS $$ DECLARE r RECORD; BEGIN

Re: [GENERAL] Tsearch2 and Unicode?

2004-11-18 Thread Dawid Kuroczko
On Thu, 18 Nov 2004 11:08:38 +0100, Markus Wollny <[EMAIL PROTECTED]> wrote: > Oleg, what exactly do you mean by "tsearch2 doesn't support unicode yet"? > It does seem to work fine in my database, it seems: > ./pg_controldata [mycluster] gives me > pg_control version number:72 > [...] >

[GENERAL] Tsearch2 and Unicode?

2004-11-17 Thread Dawid Kuroczko
very text everywhere...). And while we are at it, how do you feel -- an extra column with tsvector and its index -- would it be OK to keep it away from my data (so I can safely get rid of them if need be)? [ I intend to keep index of around 2 000 000 records, few KBs of text eac

Re: [GENERAL] Question about indexes

2004-11-15 Thread Dawid Kuroczko
On Mon, 15 Nov 2004 11:38:29 +0100, Stefano Bonnin <[EMAIL PROTECTED]> wrote: > > Only a simple question > > I have a table with > > primarykey(field1,field2,field3) > > and I want to execure a query like > > select * from my_table where field1 = some_value > > if I define an index on f

Re: [GENERAL] How many secondary databases can I create?

2004-11-13 Thread Dawid Kuroczko
On Fri, 12 Nov 2004 17:20:59 +0100, Michelle Konzack <[EMAIL PROTECTED]> wrote: > Please note, that I do not run seperatly databases. > I like only to split it per $USER physicaly from the main database. > > I like to have this setup for my new Virtual-Webserver where I have > for each VHost a loc

Re: [GENERAL] comp.database.postgresql.*

2004-11-11 Thread Dawid Kuroczko
On Thu, 11 Nov 2004 15:26:21 -0500, Andrew Rawnsley <[EMAIL PROTECTED]> wrote: > Sorry, but I think that's about as silly a statement as I've read on > this list. I have never seen > any Oracle, DB2, or Sybase materials that claim 'We're big time - we > have a legit comp. newsgroup' (that woul

Re: [GENERAL] Postresql RFD version 2.0 Help Wanted.

2004-11-08 Thread Dawid Kuroczko
On Sat, 06 Nov 2004 22:27:08 -0600, Dave Balderstone > You're way too impatient. Things don't happen here in time scales that > are measured in hours or days. Hang in there. You've got a good start > and some good people supporting what you want to do. > > Relax, take your time (and the advise of

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Dawid Kuroczko
On Tue, 26 Oct 2004 16:24:44 +, Sally Sally <[EMAIL PROTECTED]> wrote: > Hi all, > I am wandering about the pros and cons of creating a separate serial field > for a primary key when I already have a single unique field. This existing > unique field will have to be a character of fixed length (

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Dawid Kuroczko
On Tue, 12 Oct 2004 11:01:08 -0400, Jerry LeVan <[EMAIL PROTECTED]> wrote: > Hi, > I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplace

<    1   2