Re: [GENERAL] tsearch2 for alphabetic character strings & codes

2005-09-23 Thread Oleg Bartunov
Ron, probably you need to write custom parser. tsearch2 supports different parsers. Oleg On Fri, 23 Sep 2005, Ron Mayer wrote: I'm looking for a way search for substrings strings within documents in a way very similar to tsearch2, but my strings are not alphabetical codes so I'm havin

Re: [GENERAL] Backend crash with user defined aggregate

2005-09-23 Thread Ron Mayer
Tom Lane wrote: Ron Mayer <[EMAIL PROTECTED]> writes: ...aggregate function that concatenates any non-null strings it encounters...crashes... I tried this example in CVS tip and didn't see any particular misbehavior. One thing is that my table is quite large (20 GB or so of data in that tabl

Re: [GENERAL] question about to return two diferent tables from a function

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 07:55:32PM -0500, [EMAIL PROTECTED] wrote: > I have two tables [...] > then I need to join the two tables in a function like this > > doc|date |id > 1 |2005-09-22| 50 > 2 |2005-09-21| 50 > 12 |2005-09-01| 20 > 13 |2005-09-21| 24 > 14 |2005-09-22| 31 This doesn't lo

Re: [GENERAL] array_dims array_lower/upper distance

2005-09-23 Thread Matthew Peter
--- Guy Fraser <[EMAIL PROTECTED]> wrote: > On Fri, 2005-23-09 at 09:48 -0700, Matthew Peter > wrote: > > > > --- Guy Fraser <[EMAIL PROTECTED]> wrote: > > > ...snip... > > > OK what I jotted down was totally wrong. > > > > > > This is slightly more correct : > > > > > > SELECT > > > array_up

Re: [GENERAL] Backend crash with user defined aggregate

2005-09-23 Thread Tom Lane
Ron Mayer <[EMAIL PROTECTED]> writes: > I tried making an aggregate function that concatenates > any non-null strings it encounters, as shown below. > The function works fine on small tables; but when I run > it on one of my larger tables it seems to me that it > crashes the backend - though I don

[GENERAL] question about to return two diferent tables from a function

2005-09-23 Thread hildebardo
Hi, I have a question. I have two tables first_one doc|date |id_custumer 1 |2005-09-22| 50 2 |2005-09-21| 50 and the second_one doc|date |id_code 12 |2005-09-01| 20 13 |2005-09-21| 24 14 |2005-09-22| 31 then I need to join the two tables in a function like this doc|date |i

[GENERAL] tsearch2 for alphabetic character strings & codes

2005-09-23 Thread Ron Mayer
I'm looking for a way search for substrings strings within documents in a way very similar to tsearch2, but my strings are not alphabetical codes so I'm having a tough time trying to use the current tsearch2 configurations with them. For example, using tsearch to search for codes like '31.03

Re: [GENERAL] Getting the amount of overlap when using OVERLAPS

2005-09-23 Thread Tony Wasson
On 23 Sep 2005 11:30:24 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I don't think your algorithm for calculating the number of days in the > overlap will work. Picture a scenario where we have one date range that > covers 100 days, and another that covers 10 days, and they overlap by 2 >

Re: [GENERAL] Getting the amount of overlap when using OVERLAPS

2005-09-23 Thread gregstumph
I don't think your algorithm for calculating the number of days in the overlap will work. Picture a scenario where we have one date range that covers 100 days, and another that covers 10 days, and they overlap by 2 days. Doing "age() - age()" will return 90 days, not 2 days. -

[GENERAL] Backend crash with user defined aggregate

2005-09-23 Thread Ron Mayer
I tried making an aggregate function that concatenates any non-null strings it encounters, as shown below. The function works fine on small tables; but when I run it on one of my larger tables it seems to me that it crashes the backend - though I don't see anything obvious in the log. Acc

Re: [GENERAL] How many insert + update should one transaction

2005-09-23 Thread Robert Treat
On Fri, 2005-09-23 at 14:53, Dawid Kuroczko wrote: > On 9/23/05, Yonatan Ben-Nes < [EMAIL PROTECTED] > > wrote: > > Hi all, > > Every few days I need to DELETE all of the content of few tables and > INSERT new data in them. > The amount of new data is about 5 million ro

Re: [GENERAL] Lines of code in PG 8.0 & 8.1?

2005-09-23 Thread Bruce Momjian
Robert Treat wrote: > Out of curiosity, when you run that against 7.4 or less, do you get > similar numbers to what was originally reported here? I have not tried it but it is the same script I have always used. --- > > Ro

Re: [GENERAL] Need for java based web admin tool

2005-09-23 Thread Hannes Dorbath
I would like to install to client machine only Tomcat (You can't use php in Tomcat). I might be wrong, but isn't it a common setup to have an apache running in front of tomcat and having apache passing all JSP requests to tomcat ? And I would like to leave postgres ports closed, so HTTP tun

Re: [GENERAL] Prepared query logging omits bind values

2005-09-23 Thread Bruce Momjian
Jon Jensen wrote: > On Fri, 23 Sep 2005, Bruce Momjian wrote: > > >> Is it true that there is no option to log prepared query bind values? > > > > We are working on improve this for 8.1. I assume you are talking about > > protocol prepare rather than the PREPARE statement, which should be > > log

Re: [GENERAL] Prepared query logging omits bind values

2005-09-23 Thread Jon Jensen
On Fri, 23 Sep 2005, Bruce Momjian wrote: Is it true that there is no option to log prepared query bind values? We are working on improve this for 8.1. I assume you are talking about protocol prepare rather than the PREPARE statement, which should be logged. Yes, I mean protocol prepare. I

Re: [GENERAL] Prepared query logging omits bind values

2005-09-23 Thread Bruce Momjian
We are working on improve this for 8.1. I assume you are talking about protocol prepare rather than the PREPARE statement, which should be logged. Even in 8.1 we don't log the bind values, but we should. --- Jon Jensen wro

[GENERAL] Trouble upgrading from 8.0.1 to 8.0.3

2005-09-23 Thread Cristian Prieto
Hello, this would like to be as a newbie question but I don’t know where to find help… I’ve a Fedora 3 server with postgresql 8.0.1 running (rpm from the postgresql ftp site) and PHP5 (php-5.0.3), when I try to upgrade to 8.0.3 I have conflicts with libpq.so.3 (I guess postgresql 8.0.3 comes wi

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Dawid Kuroczko
On 9/23/05, Yonatan Ben-Nes <[EMAIL PROTECTED]> wrote: Hi all,Every few days I need to DELETE all of the content of few tables andINSERT new data in them.The amount of new data is about 5 million rows and each row get about 3queries (INSERT + UPDATE). If I understand you well, in transaction you d

[GENERAL] Can not get ODBC to log. Trace is not working.

2005-09-23 Thread Roy Souther
I am trying to get the ODBC client to log but I just can't. I have included my odbc.ini and odbcinst.ini. Can anyone tell me why there is never a log file created? I connect to the database with isql and OpenOffice, run queries and get data but never do I ever get a log file. Shouldn't it just

[GENERAL] Prepared query logging omits bind values

2005-09-23 Thread Jon Jensen
PostgreSQL folks, It appears that even with the most verbose logging options enabled, PostgreSQL logs prepared queries like this: select * from transactions where code = $1 And never logs the bind values that correspond to $1, etc. This instance I noticed is under PostgreSQL 7.4, both wi

Re: [GENERAL] PQtrace doesn't work

2005-09-23 Thread Tom Lane
Bruce Momjian writes: > Daniel Verite wrote: >> So it looks like the problem would be DLL-related? > Is there a problem with a DLL writing to a file descriptor opened by > application code? I would think not, but perhaps. Hmm malloc/free are broken in exactly that way in Windows DLLs, mayb

Re: [GENERAL] PQtrace doesn't work

2005-09-23 Thread Bruce Momjian
Daniel Verite wrote: > Bruce Momjian wrote: > > > Looking at the code, the only thing I see done by PQtrace are some calls > > to fprintf to that file descriptor, like this: > > > > fe-misc.c: fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg > > %c\n"), > > > > Hard to imagine w

Re: [GENERAL] array_dims array_lower/upper distance

2005-09-23 Thread Guy Fraser
On Fri, 2005-23-09 at 09:48 -0700, Matthew Peter wrote: > > --- Guy Fraser <[EMAIL PROTECTED]> wrote: > ...snip... > > OK what I jotted down was totally wrong. > > > > This is slightly more correct : > > > > SELECT > > array_upper(item,1) - array_lower(item,1) + 1 as > > elements > > FROM > >

Re: [GENERAL] array_dims array_lower/upper distance

2005-09-23 Thread Matthew Peter
--- Guy Fraser <[EMAIL PROTECTED]> wrote: > On Thu, 2005-22-09 at 21:52 -0500, Bruno Wolff III > wrote: > > On Thu, Sep 22, 2005 at 14:16:48 -0600, > > Guy Fraser <[EMAIL PROTECTED]> wrote: > > > On Thu, 2005-22-09 at 12:43 -0400, Greg Stark > wrote: > > > > Guy Fraser <[EMAIL PROTECTED]> writ

Re: [GENERAL] SQL command to dump the contents of table failed: PQendcopy() failed. Error message from server: socket not open

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 05:11:19PM +0200, ruben wrote: > The operating system is Red Hat Linux release 8.0 (Psyche) and > PostgreSQL version is 7.4.6., without non-standard extensions. > > I cannot find any core dump in the PGDATA directory /usr/local/pgsql (I > don't know how to debug it to get

Re: [GENERAL] Lines of code in PG 8.0 & 8.1?

2005-09-23 Thread Bruce Momjian
Jim C. Nasby wrote: > Is there some reasonable way to get that to not include comments? Not that I know of, but considering the complexity of our code, I _want_ to count comments. --- > > On Thu, Sep 22, 2005 at 06:04:55PM

Re: [GENERAL] SQL command to dump the contents of table failed: PQendcopy()

2005-09-23 Thread Tom Lane
ruben <[EMAIL PROTECTED]> writes: > I cannot find any core dump in the PGDATA directory /usr/local/pgsql (I > don't know how to debug it to get a stack trace, I'll find out). It would normally be in the per-database subdirectory ($PGDATA/base/NNN/) for the database where the problem occurs. Howe

Re: [GENERAL] SQL command to dump the contents of table failed: PQendcopy()

2005-09-23 Thread ruben
Hi Michael: The operating system is Red Hat Linux release 8.0 (Psyche) and PostgreSQL version is 7.4.6., without non-standard extensions. I cannot find any core dump in the PGDATA directory /usr/local/pgsql (I don't know how to debug it to get a stack trace, I'll find out). Thanks, Ruben.

Re: [GENERAL] How many insert + update should one transaction

2005-09-23 Thread Scott Marlowe
On Fri, 2005-09-23 at 05:51, Yonatan Ben-Nes wrote: > Hi all, > > Every few days I need to DELETE all of the content of few tables and > INSERT new data in them. > The amount of new data is about 5 million rows and each row get about 3 > queries (INSERT + UPDATE). > Now because I need the old da

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread Dawid Kuroczko
On 9/23/05, John Seberg <[EMAIL PROTECTED]> wrote: --- Tom Lane <[EMAIL PROTECTED]> wrote:> John Seberg <[EMAIL PROTECTED]> writes:> > I have used the COPY command dozens of times! I > think> > I *get* it. But, I'm getting "permission denied"> > errors.>> > This is a fresh install of Fedora Core 4

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread John Seberg
--- Tom Lane <[EMAIL PROTECTED]> wrote: > John Seberg <[EMAIL PROTECTED]> writes: > > I have used the COPY command dozens of times! I > think > > I *get* it. But, I'm getting "permission denied" > > errors. > > > This is a fresh install of Fedora Core 4 (x86). I > have > > Postgresql running unde

Re: [GENERAL] array_dims array_lower/upper distance

2005-09-23 Thread Guy Fraser
On Thu, 2005-22-09 at 21:52 -0500, Bruno Wolff III wrote: > On Thu, Sep 22, 2005 at 14:16:48 -0600, > Guy Fraser <[EMAIL PROTECTED]> wrote: > > On Thu, 2005-22-09 at 12:43 -0400, Greg Stark wrote: > > > Guy Fraser <[EMAIL PROTECTED]> writes: > > > > > > > So to answer his question he would likel

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Yonatan Ben-Nes
Bruno Wolff III wrote: On Fri, Sep 23, 2005 at 12:51:09 +0200, Yonatan Ben-Nes <[EMAIL PROTECTED]> wrote: Hi all, Every few days I need to DELETE all of the content of few tables and INSERT new data in them. The amount of new data is about 5 million rows and each row get about 3 queries (I

Re: [GENERAL] Data Entry Tool for PostgreSQL

2005-09-23 Thread Mike Nolan
> We have a web application using PHP, Linux and PostgreSQL. We need a > simple data entry tool to allow non-IT people to edit data in our database > through a web-browser. Are there any free or commercial data management > tools out there, not database management tools like pgAdmin. I have been

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Bruno Wolff III
On Fri, Sep 23, 2005 at 12:51:09 +0200, Yonatan Ben-Nes <[EMAIL PROTECTED]> wrote: > Hi all, > > Every few days I need to DELETE all of the content of few tables and > INSERT new data in them. > The amount of new data is about 5 million rows and each row get about 3 > queries (INSERT + UPDATE)

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread Tom Lane
John Seberg <[EMAIL PROTECTED]> writes: > I have used the COPY command dozens of times! I think > I *get* it. But, I'm getting "permission denied" > errors. > This is a fresh install of Fedora Core 4 (x86). I have > Postgresql running under the user postgres. I am > logged into to psql as postgres

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-23 Thread Bruno Wolff III
On Fri, Sep 23, 2005 at 13:19:34 +0200, Yonatan Ben-Nes <[EMAIL PROTECTED]> wrote: > > You can add to that list the command TRUNCATE though it can be rollback > its not useful in cases where the truncated data should continue to be > accessed till the transaction be commited. I think that is

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread Douglas McNaught
John Seberg <[EMAIL PROTECTED]> writes: > I have bounced the db, made sure the processes and > files are owned by postgres. What else is there? > > COPY consult FROM > '/var/lib/pgsql/migrate/consult.txt'; This is probably a dumb question, but is 'migrate' owned and readable by 'postgres' as well

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 07:03:44AM -0700, John Seberg wrote: > I have used the COPY command dozens of times! I think > I *get* it. But, I'm getting "permission denied" > errors. > > This is a fresh install of Fedora Core 4 (x86). I have > Postgresql running under the user postgres. I am > logged i

Re: [GENERAL] COPY - permission denied

2005-09-23 Thread Dawid Kuroczko
On 9/23/05, John Seberg <[EMAIL PROTECTED]> wrote: I have used the COPY command dozens of times! I thinkI *get* it. But, I'm getting "permission denied"errors.This is a fresh install of Fedora Core 4 (x86). I havePostgresql running under the user postgres. I am logged into to psql as postgres. The

[GENERAL] COPY - permission denied

2005-09-23 Thread John Seberg
I have used the COPY command dozens of times! I think I *get* it. But, I'm getting "permission denied" errors. This is a fresh install of Fedora Core 4 (x86). I have Postgresql running under the user postgres. I am logged into to psql as postgres. The files are owned by postgres and are -rw---

Re: [GENERAL] Questions about Rollback - after insert, update, delete ... operations?

2005-09-23 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: >> I wasn't able to find where this is spelled out in the documentation, >> but I believe all DDL commands except DROP DATABASE can be rolled back now. > I don't think there's any all-in-one-place statement about it, but > anything that doesn't explicitl

Re: [GENERAL] SQL command to dump the contents of table failed: PQendcopy() failed. Error message from server: socket not open

2005-09-23 Thread Michael Fuhr
On Fri, Sep 23, 2005 at 01:34:18PM +0200, ruben wrote: > > LOG: server process (PID 27688) was terminated by signal 11 This suggests a bug in the backend. There should be a core dump somewhere under $PGDATA (unless resource limits prevent it or your system is configured to put core dumps elsewhe

[GENERAL] SQL command to dump the contents of table failed: PQendcopy() failed. Error message from server: socket not open

2005-09-23 Thread ruben
Hi: I run a cron job every day to dump all the tables in my 7.4 Postgres database. For one of the tables (sample) the command returns this error: -bash-2.05b$ /usr/local/pgsql/bin/pg_dump -Fc -t sample heos -f /home/bu/5/sample.dump pg_dump: socket not open pg_dump: SQL command to dump the c

Re: [GENERAL] Slow search.. quite clueless

2005-09-23 Thread Yonatan Ben-Nes
Gábor Farkas wrote: Yonatan Ben-Nes wrote: Dawid Kuroczko wrote: Hmm, JOIN on a Huge table with LIMIT. You may be suffering from the same problem I had: http://archives.postgresql.org/pgsql-performance/2005-07/msg00345.php Tom came up with a patch which worked marvellous in my case: http:

Re: [GENERAL] PQtrace doesn't work

2005-09-23 Thread Daniel Verite
Bruce Momjian wrote: > Looking at the code, the only thing I see done by PQtrace are some calls > to fprintf to that file descriptor, like this: > > fe-misc.c: fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg > %c\n"), > > Hard to imagine what would fail there, unless libpq_

Re: [GENERAL] Data Entry Tool for PostgreSQL

2005-09-23 Thread Hannes Dorbath
On 23.09.2005 07:21, Ian Overton wrote: or commercial data management tools out there, not database management tools like pgAdmin. If you are after something commercial, we develop such things. Our solution /can/ be made to work in any mozilla based browser, but most customers prefer the sta

Re: [GENERAL] Lines of code in PG 8.0 & 8.1?

2005-09-23 Thread Nicolas Barbier
On 9/23/05, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > Is there some reasonable way to get that to not include comments? SLOCCount on CVS tip (2005-09-23) gives me: ansic: 368542 (92.27%) yacc: 14029 (3.51%) sh:7495 (1.88%) lex: 5392 (1.35%) perl: 3863

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-23 Thread Yonatan Ben-Nes
Bruno Wolff III wrote: On Thu, Sep 22, 2005 at 15:20:17 -0400, Emi Lu <[EMAIL PROTECTED]> wrote: greetings, I remembered I read something in the mailing list about "*rollback*" a while ago. People mentioned that some operations cannot rollback. I cannot remember what kinds of perations are

Re: [GENERAL] Finding (and deleting) dupes in relation table

2005-09-23 Thread Markus Wollny
Hello! CSN [EMAIL PROTECTED] wrote: > I have a table that relates id's of two other tables: > > table1id, table2id > > Dupes have found their way into it (create unique index > across both fields fails). Is there a quick and easy way to > find and delete the dupes (there are tens of thousands of

[GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Yonatan Ben-Nes
Hi all, Every few days I need to DELETE all of the content of few tables and INSERT new data in them. The amount of new data is about 5 million rows and each row get about 3 queries (INSERT + UPDATE). Now because I need the old data to be displayed till all of the new data will be available I'

Re: [GENERAL] Data Entry Tool for PostgreSQL

2005-09-23 Thread Hannes Dorbath
On 23.09.2005 07:21, Ian Overton wrote: We have a web application using PHP, Linux and PostgreSQL. We need a simple data entry tool to allow non-IT people to edit data in our database through a web-browser. Are there any free or commercial data management tools out there, not database managemen

[GENERAL] Data Entry Tool for PostgreSQL

2005-09-23 Thread Ian Overton
Hello, We have a web application using PHP, Linux and PostgreSQL. We need a simple data entry tool to allow non-IT people to edit data in our database through a web-browser. Are there any free or commercial data management tools out there, not database management tools like pgAdmin. Regards, Ia