Re: [HACKERS] PQstatus() detect change in connection...

2001-10-18 Thread Matthew Hagerty
At 02:10 PM 10/18/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > Anyone know a good *fast* way to test > > if a socket is still valid? > >What exactly are you trying to defend against? > >In general, I don't believe that there

Re: [HACKERS] PQstatus() detect change in connection...

2001-10-17 Thread Matthew Hagerty
heers, > >Mark Pritchard > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew Hagerty > > Sent: Thursday, 18 October 2001 10:47 AM > > To: [EMAIL PROTECTED] > > Subject: [HACKERS] PQstatus() detect chan

[HACKERS] PQstatus() detect change in connection...

2001-10-17 Thread Matthew Hagerty
Greetings, PostgreSQL 7.1.3, FreeBSD-4.3-RELEASE, gcc 2.95.3 I'm trying to attempt to detect a failed backend connection, but a call to PQstatus() always returns the state of the backend when the call was made. For example, take this test code: PGconn *pgConn; PGresult *pgRes

Re: [HACKERS] Log rotation?

2001-09-06 Thread Matthew Hagerty
At 08:54 PM 9/5/2001 -0700, Ian Lance Taylor wrote: >Tom Lane <[EMAIL PROTECTED]> writes: > > > > And no, "use syslog" doesn't count. > > > > Why not? > >The standard implementations of syslog lose log entries under heavy >load, because they rely on a daemon which reads from a named pipe with >a l

Re: [HACKERS] Async PQgetResult() question.

2001-07-10 Thread Matthew Hagerty
Uh oops! I misread IIRC as (IRC, i.e. Internet Relay Chat or something similar.) It is too early! ;) I'll dig in the archives. Thanks, Matthew At 12:03 PM 7/8/2001 -0400, Matthew Hagerty wrote: >At 11:44 PM 7/7/2001 -0400, Tom Lane wrote: >>Matthew Hagerty <[EMAIL P

Re: [HACKERS] Async PQgetResult() question.

2001-07-08 Thread Matthew Hagerty
At 11:44 PM 7/7/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > So then how would I code for the exception, i.e. the backend goes down > just > > before or during my call to PQsendQuery()? If I am non-blocking then I > can > > d

Re: [HACKERS] Async PQgetResult() question.

2001-07-07 Thread Matthew Hagerty
At 03:46 PM 7/7/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > If I don't call PQsetnonblocking() will that affect any of the async > > functions I'm dealing with? > >PQsetnonblocking has nothing to do with the >PQconsumeInput/

Re: [HACKERS] Async PQgetResult() question.

2001-07-07 Thread Matthew Hagerty
At 02:13 PM 7/7/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > Only applications that have used PQsetnonblocking have a need for this." > > > Since I use PQsetnonblocking(), I included PQflush(). > >Hmm. My opinions about the P

Re: [HACKERS] Async PQgetResult() question.

2001-07-07 Thread Matthew Hagerty
truly and greatly thankful! Now, on with asynchronous query processing! WooHoo! :) At 12:35 PM 7/7/2001 -0400, Tom Lane wrote: >Matthew Hagerty <[EMAIL PROTECTED]> writes: > > I'm working with pqlib in asynchronous mode and I have a question about > > PQgetResu

[HACKERS] Async PQgetResult() question.

2001-07-06 Thread Matthew Hagerty
Greetings, I'm working with pqlib in asynchronous mode and I have a question about PQgetResult. I have this situation: submit a query via PQsendQuery() flush to the backend with PQflush() set my read descriptor on the socket and enter a select() select returns read_ready on the socket, so ca

[HACKERS] Is INSERT FROM considered a transaction?

2001-03-12 Thread Matthew Hagerty
Greetings, Sorry about all the posts lately, but things seems to be running *really* slow on my database. I have two tables, both are identical and one is used to hold entries older than a certain date, i.e. the history table. I use this query to move the old records from one to the other.

[HACKERS] Is INSERT FROM considered a transaction?

2001-03-08 Thread Matthew Hagerty
Greetings, Sorry about all the posts lately, but things seems to be running *really* slow on my database. I have two tables, both are identical and one is used to hold entries older than a certain date, i.e. the history table. I use this query to move the old records from one to the other.

Re: [HACKERS] Query not using index, please explain.

2001-03-08 Thread Matthew Hagerty
(); version - PostgreSQL 7.0.3 on i386-unknown-freebsdelf3.4, compiled by gcc 2.7.2.3 (1 row) Thanks, Matthew At 07:18 PM 3/8/2001 +, you wrote: >On Thu, Mar 08, 2001 at 01:49:42PM -0500, Matthew Hagerty wrote: > > Greetings, > > > >

[HACKERS] Query not using index, please explain.

2001-03-08 Thread Matthew Hagerty
Greetings, I have a real simple table with a timestamp field. The timestamp field has an index on it. But, the index does not seem to be taken into account for selects that return rows: pglog=# explain select time_stamp from history_entries where time_stamp < '03-01-2000'; NOTICE: QUERY PL

[HACKERS] Contributions?

2001-03-06 Thread Matthew Hagerty
Greetings, I wrote a few simple programs to log Apache access_log entries to pg. If this is something anyone would be interested in or if there is someplace I can submit these to, please let me know. Thanks, Matthew ---(end of broadcast)--- TI

[HACKERS] Numeric field quirk [Again]

2000-10-04 Thread Matthew Hagerty
Greetings, Well, it seems that the numeric issue I was having has nothing to do with the precision and scale being set the same, it has to do with the input data. The precision has to be at least 2 greater than the biggest number you need to enter, i.e. equinox=# create table test ( d numeri

[HACKERS] Numeric field quirk

2000-10-04 Thread Matthew Hagerty
Greetings, I'm not sure if this is a bug, but I thought someone might like to know about it. If you create a numeric field with the precision and scale set the same, you can't insert anything into the field... pg-7.0.2 on FreeBSD-4.0-Rel. Matthew equinox=# create table test2 ( d numeric(8