Re: [GENERAL] table partitioning

2006-08-23 Thread Chris
Hi Gene, I'm using a cron job which creates a new partition table every night at midnight. After I create the table, I update the rule on the parent table so that new records go into the new partition table. Then I update the constraints on the tables so that constraint exclusion works. I'm

Re: [GENERAL] [JDBC] org.postgresql.util.PSQLException: An I/O error occured

2006-08-23 Thread Oliver Jowett
surabhi.ahuja wrote: org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. Caused by: java.net.SocketException: Broken pipe This is a network error that the driver can't do anything about. If you have a stateful firewall between the client and the server,

Re: [GENERAL] trigger help

2006-08-23 Thread marcelo Cortez
Michael ,list You are you are right, thanks a lot for your help and tinme. best regards MDC --- Michael Fuhr [EMAIL PROTECTED] escribió: On Tue, Aug 22, 2006 at 02:37:19PM -0300, marcelo Cortez wrote: This isn't a trigger function. Are you sure trigger is the word you meant?

Re: [GENERAL] UUID as primary key

2006-08-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-21 21:16:14 -0700: I'm considering using a UUID as a primary / foreign key for my schema, to help ensure portability of data in a multi-master context. Does anyone have experience with this? There's a project on Gborg (pguuid) to create a native UUID type,

Re: [GENERAL] Queries joining views

2006-08-23 Thread Alban Hertroys
Tom Lane wrote: Alban Hertroys [EMAIL PROTECTED] writes: I'm confused too. Would it be possible for you to send me a dump of your database? Attached is a cleaned out database, the full schema is included, but only the relevant tables contain any data. Thanks. After digging through it a

Re: [GENERAL] What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation

2006-08-23 Thread Alistair Bayley
On 18/08/06, Tom Lane [EMAIL PROTECTED] wrote: Magnus Hagander [EMAIL PROTECTED] writes: No, it's a work of a simplistic perlscript IIRC. It simply looked for the first match it could find, based on the list found in the registry (the whole concept is a bit of an ugly hack, but it's the best

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Arturo Perez
On Aug 22, 2006, at 5:35 PM, Tom Lane wrote: Arturo Perez [EMAIL PROTECTED] writes: I have a table with an column: entry_date | timestamp with time zone| not null And when I try to create an index on it like so: create index entry_date_idx on =

Re: [GENERAL] error msg when pg_restore

2006-08-23 Thread nuno
hi, there, tom. thank you for your help. i turned -c off and now i find a less no. of errors, however, i still get them! (i used to have approx 70 'errors ignored on restore', now i have approx 30 or even less than that). one of errors is like below; pg_restore: [archiver (db)] Error from TOC

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Arturo Perez
Hi Chris, user_tracking is not a function, it's the name of the table containing the column entry_date. Is my syntax that far off?! -arturo -Original Message-From: Chris Hoover [mailto:[EMAIL PROTECTED]Sent: Tuesday, August 22, 2006 3:02 PMTo: Arturo PerezCc:

[GENERAL] How do i store arbitrary questions and answers in SQL?

2006-08-23 Thread lifeisgood
Dear group, I have been bugged by this problem on and off for years, and would like to put it out to general discussion. I suspect it is a common SQL problem but I have never found a satisfactory answer - maybe there is not one. The problem : to store, in SQL/RDBMS, an arbitrary set of

[GENERAL] Installation Help needed

2006-08-23 Thread shrini
Folks. I installed postgresql in my RHEL Server. I do a ssh login to server and start it. but the nmap localhost does not show the postgresql port 5432 But the server is running and as the postgres user i can user the server. I have created a normal user for postgres and working fine. I can not

Re: [GENERAL] error msg when pg_restore

2006-08-23 Thread nuno
by the way, i had 3 different types of errors messages; 1. pg_restore: [archiver (db)] Error from TOC entry 17; 1255 17233 FUNCTION database_size(name)* postgres 2. pg_restore: [archiver (db)] could not execute query: ERROR: could not access file $libdir/dbsize**: No such file or directory... 3.

Re: [GENERAL] What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation

2006-08-23 Thread Tom Lane
Alistair Bayley [EMAIL PROTECTED] writes: On 18/08/06, Tom Lane [EMAIL PROTECTED] wrote: I guess the question is whether, when Windows is using this setting, it tracks British summer time rules or not. Would someone check? What would a reasonable check be? I can start the Windows command

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Alvaro Herrera
Arturo Perez wrote: On Aug 22, 2006, at 5:35 PM, Tom Lane wrote: I seriously doubt that. date_part on a timestamptz is stable, not immutable, and AFAICT has been marked that way since 7.3. The problem is that the results depend on your current TimeZone setting --- for instance, 2AM

Re: [GENERAL] How do i store arbitrary questions and answers in SQL?

2006-08-23 Thread Enver ALTIN
Hi, On Wed, Aug 23, 2006 at 02:40:29AM -0700, lifeisgood wrote: CREATE TABLE Answer(ID INT, questionID INT, answer_text VARCHAR(255), datatype INT) You can actually store answer_text as a BLOB in the database that is packed in any format your application can handle. You can serialize a class

Re: [GENERAL] What's special about 1916-10-01 02:25:20? Odd jump in internal timestamptz representation

2006-08-23 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: 23 August 2006 14:05 To: Alistair Bayley Cc: Magnus Hagander; pgsql-general@postgresql.org Subject: Re: [GENERAL] What's special about 1916-10-01 02:25:20? Odd jump in internal

Re: [GENERAL] Installation Help needed

2006-08-23 Thread A. Kretschmer
am Wed, dem 23.08.2006, um 2:55:37 -0700 mailte shrini folgendes: Folks. I installed postgresql in my RHEL Server. Which version? nmap serverip from any client dows not show the 5432 port. No firewall is running in te server. How to remote access the postgresql server? Edit your

Re: [GENERAL] How do i store arbitrary questions and answers in SQL?

2006-08-23 Thread Karsten Hilbert
On Wed, Aug 23, 2006 at 04:13:24PM +0300, Enver ALTIN wrote: CREATE TABLE Answer(ID INT, questionID INT, answer_text VARCHAR(255), datatype INT) You can actually store answer_text as a BLOB in the database that is packed in any format your application can handle. You can serialize a

Re: [GENERAL] Queries joining views

2006-08-23 Thread Tom Lane
Alban Hertroys [EMAIL PROTECTED] writes: Mm_object is always larger than any other table in the database, as every table joins with (different) records in it to determine it's otype and owner. So I don't understand how a fraction of any of those tables could be larger than mm_object as a

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Karsten Hilbert
On Wed, Aug 23, 2006 at 09:07:35AM -0400, Alvaro Herrera wrote: Another idea would be to separate the date column (which would have the index) from the time column (which would have the timezone). The timezone is important -- if you have bloggers from all around the world you're gonna have

Re: [GENERAL] pl/R problem

2006-08-23 Thread Don Isgitt
Michael Fuhr wrote: On Tue, Aug 22, 2006 at 04:24:46PM -0500, Don Isgitt wrote: gds2=# create function sd(_float8) returns float as '' language 'plr'; CREATE FUNCTION gds2=# select round(sd('{1.23,1.31,1.42,1.27}'::_float8)::numeric,8); server closed the connection unexpectedly This

Re: [GENERAL] share library version problems

2006-08-23 Thread Bryan White
Tom Lane wrote: If the Fedora 5 RPMs won't install on your FC4 machine, grab the FC5 SRPM and do a quick rpmbuild --rebuild to make custom RPMs for your environment. After about 5 minutes of compiling I get this: == pg_regress: initdb failed Examine ./log/initdb.log for the reason. make:

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Tom Lane
Karsten Hilbert [EMAIL PROTECTED] writes: On Wed, Aug 23, 2006 at 09:07:35AM -0400, Alvaro Herrera wrote: Another idea would be to separate the date column (which would have the index) from the time column (which would have the timezone). The timezone is important -- if you have bloggers from

Re: [GENERAL] [8.1.4] Create index on timestamp fails

2006-08-23 Thread Karsten Hilbert
On Wed, Aug 23, 2006 at 09:42:00AM -0400, Tom Lane wrote: It sounds a bit bogus to me too. Another possibility is to keep the data storage as timestamptz (which is really the recommended type for any sort of real time values), and define the index on date_part('day', entry_time AT

Re: [GENERAL] pl/R problem

2006-08-23 Thread Joe Conway
Don Isgitt wrote: Thanks for the reply and the research. The relevant file is [EMAIL PROTECTED] R-2.3.0]$ ls -l $R_HOME/etc/Renviron -rw-rw-r--1 djisgitt djisgitt 1151 Jun 1 11:42 /home/djisgitt/R-2.3.0/etc/Renviron so I don't see that as the problem. I use R quite a lot, so I

Re: [GENERAL] share library version problems

2006-08-23 Thread Tom Lane
Bryan White [EMAIL PROTECTED] writes: Tom Lane wrote: If the Fedora 5 RPMs won't install on your FC4 machine, grab the FC5 SRPM and do a quick rpmbuild --rebuild to make custom RPMs for your environment. After about 5 minutes of compiling I get this: initdb: cannot be run as root Don't do

Re: [GENERAL] pl/R problem

2006-08-23 Thread Michael Fuhr
On Wed, Aug 23, 2006 at 08:38:01AM -0500, Don Isgitt wrote: Thanks for the reply and the research. The relevant file is [EMAIL PROTECTED] R-2.3.0]$ ls -l $R_HOME/etc/Renviron -rw-rw-r--1 djisgitt djisgitt 1151 Jun 1 11:42 /home/djisgitt/R-2.3.0/etc/Renviron so I don't see that

[GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Alvaro Herrera
I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may be a bug in my MUA. But I just saw it happened to a mail from Bruce

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Bruce Momjian
Alvaro Herrera wrote: I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may be a bug in my MUA. But I just saw it

Re: [GENERAL] pl/R problem

2006-08-23 Thread Don Isgitt
Adam Witney wrote: Don Isgitt wrote: Michael Fuhr wrote: On Tue, Aug 22, 2006 at 04:24:46PM -0500, Don Isgitt wrote: gds2=# create function sd(_float8) returns float as '' language 'plr'; CREATE FUNCTION gds2=# select round(sd('{1.23,1.31,1.42,1.27}'::_float8)::numeric,8);

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Alvaro Herrera
Bruce Momjian wrote: Alvaro Herrera wrote: I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may be a bug in my

[GENERAL] Slow insert/delete

2006-08-23 Thread Thor Tall
I am in the process of converting an old system to a new system where I have chosen to use postgres in stead of a home grow system based on b-trees. The system receives 2650 message a total of 10Mbytes of data per 15 minutes this information have to be store in 4 tables in the database. Some of

Re: [GENERAL] pl/R problem

2006-08-23 Thread Don Isgitt
Michael Fuhr wrote: On Wed, Aug 23, 2006 at 08:38:01AM -0500, Don Isgitt wrote: Thanks for the reply and the research. The relevant file is [EMAIL PROTECTED] R-2.3.0]$ ls -l $R_HOME/etc/Renviron -rw-rw-r--1 djisgitt djisgitt 1151 Jun 1 11:42 /home/djisgitt/R-2.3.0/etc/Renviron

Re: [GENERAL] pl/R problem

2006-08-23 Thread Alvaro Herrera
Don Isgitt wrote: Michael Fuhr wrote: On Wed, Aug 23, 2006 at 08:38:01AM -0500, Don Isgitt wrote: Thanks for the reply and the research. The relevant file is [EMAIL PROTECTED] R-2.3.0]$ ls -l $R_HOME/etc/Renviron -rw-rw-r--1 djisgitt djisgitt 1151 Jun 1 11:42

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Guido Neitzer
On 23.08.2006, at 16:31 Uhr, Alvaro Herrera wrote: Can you have multi-line subject lines? I didn't think that was possible. Yes. This is the header of a mail you sent to -patches: Aha? Subject is an unstructured header field and according to RFC 2822 [1]:

Re: [GENERAL] pl/R problem

2006-08-23 Thread Michael Fuhr
On Wed, Aug 23, 2006 at 09:37:17AM -0500, Don Isgitt wrote: Michael Fuhr wrote: Have you checked the permissions on all of the directories in the file's path? Have you verified that PostgreSQL is using the same $R_HOME? You can check the environment with plr_environ(): Yes. At least

Re: [GENERAL] error msg when pg_restore

2006-08-23 Thread Tom Lane
nuno [EMAIL PROTECTED] writes: pg_restore: [archiver (db)] could not execute query: ERROR: could not access file $libdir/dbsize: No such file or directory Command was: CREATE FUNCTION relation_size(text) RETURNS bigint AS '$libdir/dbsize', 'relation_size' LANGUAGE c STRICT; You

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Erik Jones
It most likely conforms strictly to a href=http://tools.ietf.org/html/rfc822#page-21;Rfc 822/a which is the standard, and mostly canonical, and allows for CR and LF but not the two together (CRLF), if I'm reading it correctly: text= any CHAR, including bare; = atoms, specials,

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Alvaro Herrera
Guido Neitzer wrote: 888888 2.2.1. Unstructured Header Field Bodies Some field bodies in this standard are defined simply as unstructured (which is specified below as any US-ASCII characters, except for CR and LF) with no further

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Guido Neitzer
On 23.08.2006, at 16:51 Uhr, Alvaro Herrera wrote: Guido Neitzer wrote: 888888 2.2.1. Unstructured Header Field Bodies Some field bodies in this standard are defined simply as unstructured (which is specified below as any US-ASCII

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Joshua D. Drake
Alvaro Herrera wrote: Bruce Momjian wrote: Alvaro Herrera wrote: I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may

Re: [GENERAL] share library version problems

2006-08-23 Thread Bryan White
Tom Lane wrote: Don't do the rpmbuild as root. Alternatively, I believe there's a %define you can set to skip the regression test ... but that's probably not a good idea. I think I have it solved now. I am not to familiar with the process of building from source RPMs. You said to not do it

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Bernhard Weisshuhn
Guido Neitzer wrote: So they don't contain line feeds or carriage returns and so the can't be multi-line. If a mail client sends multi line subjects it does something against the RFC and I assume with that, it does something wrong. This is the theory in RFC 2822 as far as I understand it.

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may be a bug in my MUA. But

Re: [GENERAL] share library version problems

2006-08-23 Thread Tom Lane
Bryan White [EMAIL PROTECTED] writes: Tom Lane wrote: Don't do the rpmbuild as root. I think I have it solved now. I am not to familiar with the process of building from source RPMs. You said to not do it as root but that meant I did not have write access to /usr/src/redhat. Well,

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: I noticed that Majordomo drops the second and subsequent lines of a Subject: line in message before dispatching for some reason. It has done this for some time; I noticed it some time ago in pgsql-es-ayuda but I thought it may be a

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Even though multi-line Subject: is theoretically legal according to the RFCs, it's certainly an awful idea; how many MUAs do you know that provide more than one line to display the subject in a normal view? So I don't really care if

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Tom Lane wrote: Even though multi-line Subject: is theoretically legal according to the RFCs, it's certainly an awful idea; how many MUAs do you know that provide more than one line to display the subject in a normal view? So I

Re: [GENERAL] Majordomo drops multi-line Subject:

2006-08-23 Thread Joshua D. Drake
Even though multi-line Subject: is theoretically legal according to the RFCs, it's certainly an awful idea; how many MUAs do you know that provide more than one line to display the subject in a normal view? So I don't really care if Majordomo truncates the subject --- I wouldn't see the rest of

[GENERAL] How to become Stats in postgresql?

2006-08-23 Thread David Collrep
Hello People, i need a command to become a cpu stats, cpu load, max query per sec, max transaktion etc. in the Postgresql? David Collrep

[GENERAL] help with postgresql and stats

2006-08-23 Thread David Collrep
Hello, which command to become stats, cpu load, max query per sec and transaction over postgresql? thank you david collrep

[GENERAL] Row type select syntax - inconsistency or misunderstanding?

2006-08-23 Thread Randall Lucas
(PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)) In trying to retrieve a row as a composite rowtype from a table, I'm running into what appears to be an inconsistent result based on whether I select *, table.*, or the list of

[GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Silvela, Jaime \(Exchange\)
Ive seen that some other people have had ERROR could not open relation with OID ### The suggested cause was somebody trying to drop a table in the middle of VACUUM. In my case, the error seems to be spreading. Initially it affected only one table in a staging area that would get

Re: [GENERAL] Row type select syntax - inconsistency or misunderstanding?

2006-08-23 Thread Tom Lane
Randall Lucas [EMAIL PROTECTED] writes: In trying to retrieve a row as a composite rowtype from a table, I'm running into what appears to be an inconsistent result based on whether I select *, table.*, or the list of columns in the table: FWIW, we've changed the behavior of ROW(foo.*) for 8.2

Re: [GENERAL] Row type select syntax - inconsistency or misunderstanding?

2006-08-23 Thread Randall Lucas
On Wed, Aug 23, 2006 at 02:31:35PM -0400, Tom Lane wrote: Randall Lucas [EMAIL PROTECTED] writes: In trying to retrieve a row as a composite rowtype from a table, I'm running into what appears to be an inconsistent result based on whether I select *, table.*, or the list of columns in the

Re: [GENERAL] pl/R problem

2006-08-23 Thread Don Isgitt
Alvaro Herrera wrote: Don Isgitt wrote: Michael Fuhr wrote: On Wed, Aug 23, 2006 at 08:38:01AM -0500, Don Isgitt wrote: Thanks for the reply and the research. The relevant file is [EMAIL PROTECTED] R-2.3.0]$ ls -l $R_HOME/etc/Renviron -rw-rw-r--1 djisgitt djisgitt

[GENERAL] How to detect Postgres deadlocks?

2006-08-23 Thread andre
Hi,We are using Postgres 7.4.5, and I'm trying to find a way to detect and gather deadlock information.1) Which sql queries should I use to detect deadlocks while they are happening? I see the deadlock info on the log file, but I'd like to query the database to see them as they happen... 2) Which

Re: [GENERAL] pl/R problem

2006-08-23 Thread Joe Conway
Don Isgitt wrote: Quite so, Alvaro Michael. Yes, world read as I said, but missing execute at one level. Sorry for my carelessness. It works as expected now. Ah, good to know. I'll add myself a todo to eliminate the crash in this scenario. I will include a fix in the next release, which

Re: [GENERAL] How to detect Postgres deadlocks?

2006-08-23 Thread Scott Marlowe
On Wed, 2006-08-23 at 14:45, andre wrote: Hi, We are using Postgres 7.4.5, and I'm trying to find a way to detect and gather deadlock information. 1) Which sql queries should I use to detect deadlocks while they are happening? I see the deadlock info on the log file, but I'd like to

[GENERAL] invalid byte sequence ?

2006-08-23 Thread Andreas
Hi, I've got pg 8.1.4 from the binary Windows installer. Windows 2000 / German Now I entered \d into psql on the text-console and got this: db_test=# \d ERROR: invalid byte sequence for encoding UTF8: 0xfc6d6572220a What's up ? db_test was created UTF8 encoded

Re: [GENERAL] invalid byte sequence ?

2006-08-23 Thread Bruce Momjian
Andreas wrote: Hi, I've got pg 8.1.4 from the binary Windows installer. Windows 2000 / German Now I entered \d into psql on the text-console and got this: db_test=# \d ERROR: invalid byte sequence for encoding UTF8: 0xfc6d6572220a What's up ? db_test was created UTF8 encoded What

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Tom Lane
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes: WARNING: terminating connection because of crash of another server process This is not an interesting message: the interesting message is the previous one about exactly what happened to the other process. Look earlier in the server log.

Re: [GENERAL] invalid byte sequence ?

2006-08-23 Thread Andreas
Bruce Momjian schrieb: Andreas wrote: I've got pg 8.1.4 from the binary Windows installer. Windows 2000 / German Now I entered \d into psql on the text-console and got this: db_test=# \d ERROR: invalid byte sequence for encoding UTF8: 0xfc6d6572220a What's up ? db_test was created UTF8

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Silvela, Jaime \(Exchange\)
Actually the server logging was disabled, which I am now enabling. But scripts have been complaining about not finding this or that relation with OID x. I've located each of the tables and am trying to recreate them. If I try to read from one, I get ERROR: could not open relation with OID 16896

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
Michael Perhaps we can look at the following as a simple example of what is happening- - create or replace function loop_association() returns trigger as $$ begin Insert Into p_id.loops (monitor) select new.devices_id from p_id.devices ; return null ; end ; $$ language plpgsql ;

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Tom Lane
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes: If I try to read from one, I get ERROR: could not open relation with OID 16896 If I try to redefine it, I get ERROR: relation bb_master already exists If I try to DROP it, ERROR: cache lookup failed for relation 16896 What do you get

Re: [GENERAL] Inserting Data

2006-08-23 Thread Tom Lane
Bob Pawley [EMAIL PROTECTED] writes: Perhaps we can look at the following as a simple example of what is happening- - create or replace function loop_association() returns trigger as $$ begin Insert Into p_id.loops (monitor) select new.devices_id from p_id.devices ;

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
I thought the NEW qualified the select. If not, how is select qualified?? Thanks Bob - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Bob Pawley [EMAIL PROTECTED] Cc: Michael Fuhr [EMAIL PROTECTED]; Postgresql pgsql-general@postgresql.org Sent: Wednesday, August 23,

Re: [GENERAL] Inserting Data

2006-08-23 Thread Tom Lane
Bob Pawley [EMAIL PROTECTED] writes: I thought the NEW qualified the select. Not at all; that would rather cripple the ability to write interesting triggers. I think what you are really wanting to do here is just insert into p_id.loops (monitor) values (new.devices_id);

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Silvela, Jaime \(Exchange\)
I get values frin the first statement but not from the second. After setting indexscan to off, still the same thing. Should this setting be off in general? -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 6:15 PM To: Silvela, Jaime (Exchange)

Re: [GENERAL] invalid byte sequence ?

2006-08-23 Thread Tom Lane
Andreas [EMAIL PROTECTED] writes: I've got pg 8.1.4 from the binary Windows installer. Windows 2000 / German Now I entered \d into psql on the text-console and got this: db_test=# \d ERROR: invalid byte sequence for encoding UTF8: 0xfc6d6572220a I can replicate this by using a UTF8

Re: [GENERAL] invalid byte sequence ?

2006-08-23 Thread Bruce Momjian
Is this a TODO? --- Tom Lane wrote: Andreas [EMAIL PROTECTED] writes: I've got pg 8.1.4 from the binary Windows installer. Windows 2000 / German Now I entered \d into psql on the text-console and got this:

Re: [GENERAL] invalid byte sequence ?

2006-08-23 Thread Tom Lane
I wrote: We've known about this and related issues with gettext for some time, but a bulletproof solution isn't clear. For the moment all you can do is be real careful about making your locale settings match up. I forgot to mention that it works fine if the server is told the client encoding

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
Thanks Tom But my problem with this solution comes whan I try to qualify with a 'where' clause. For instance - create or replace function loop_association() returns trigger as $$ begin insert into p_id.loops (monitor) values (new.devices_id) where new.device_number =

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Tom Lane
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes: I get values frin the first statement but not from the second. What values exactly ... particularly the OID? After setting indexscan to off, still the same thing. Should this setting be off in general? Certainly not! That was just an

Re: [GENERAL] [SLE] Install source

2006-08-23 Thread Susemail
On Sunday 20 August 2006 03:46, Anders Johansson wrote: On Sunday 20 August 2006 15:29, Chris Herrnberger wrote: Hay my main bitch with a smile is that since 5.2 I could point yast to any directory on my machine, remote or local and include the directory as a yast source, however more

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Silvela, Jaime \(Exchange\)
I get Oid: 16896 Relname: bb_master Relnamespace: 16392 Reltype: 16897 ... Reltablespace: 0 Relpages: 0 Reltuples: 0 ... Relkind: r ... Thanks Jaime -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 6:54 PM To: Silvela, Jaime (Exchange) Cc:

Re: [GENERAL] Inserting Data

2006-08-23 Thread Tom Lane
Bob Pawley [EMAIL PROTECTED] writes: insert into p_id.loops (monitor) values (new.devices_id) where new.device_number = library.devices.device_number and library.devices.type_ = 'mon' ; Huh? How did library.devices get into this? Are you trying to join to it, and if so why, seeing that

[GENERAL] XPath and XML support

2006-08-23 Thread Frank Cohen
I'm doing a performance and scalability test project for a PostgreSQL user who is working with geospatial data. The data is in GML form. For instance: watch version=9 id=flight time=2006-08-16T10:16:36.125-07:00 point latitude=7 longitude=55/ detail gml:Point

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Tom Lane
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes: I get Oid: 16896 Relname: bb_master Hmm ... but you're *sure* where oid = 16896 can't find this row, even with enable_indexscan = off? That doesn't make a lot of sense. To cut to the chase, though: try REINDEX pg_class and see if it

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Silvela, Jaime \(Exchange\)
It hadn't occurred to me to reindex the pg_class!! Beginner... After reindexing, both query lines were successful, and I was able to access my missing tables!! THANKS!! What could be the possible cause for this? Thanks again, Jaime -Original Message- From: Tom Lane [mailto:[EMAIL

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
What I have is one table which stores device_id numbers that are referenced on the second table library.devices. I need to insert device_ids from the first table that satisfy the conditions of the argument found on the library table. Hence the 'where' clause. So far all I can get are errors

Re: [GENERAL] CASCADING could not open relation with OID

2006-08-23 Thread Tom Lane
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes: What could be the possible cause for this? Hard to say ... have you had any hardware flakiness lately? Are you running an up-to-date PG release? regards, tom lane ---(end of

Re: [GENERAL] Inserting Data

2006-08-23 Thread Tom Lane
Bob Pawley [EMAIL PROTECTED] writes: What I have is one table which stores device_id numbers that are referenced on the second table library.devices. I need to insert device_ids from the first table that satisfy the conditions of the argument found on the library table. Hence the 'where'

Re: [GENERAL] How do i store arbitrary questions and answers in SQL?

2006-08-23 Thread Tim Allen
lifeisgood wrote: The problem : to store, in SQL/RDBMS, an arbitrary set of questions and their answers, where the questions are text (obviously) but the answers can be dates, text, integers, money etc. think of it as a big questionnaire where at design time we have no idea what the questions

Re: [GENERAL] XPath and XML support

2006-08-23 Thread Jeff Davis
On Wed, 2006-08-23 at 16:04 -0700, Frank Cohen wrote: I'm doing a performance and scalability test project for a PostgreSQL user who is working with geospatial data. The data is in GML form. For instance: watch version=9 id=flight time=2006-08-16T10:16:36.125-07:00 point latitude=7

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
I'm not arguing (I'm attempting to learn) - but this seems to be counter intuitive when writing a procedure. I know that it exists because, through the interface, I have selected it from the same library table. Could you explain why Postgresql simply doesn't accept the simple 'where'

Re: [GENERAL] Inserting Data

2006-08-23 Thread Bob Pawley
Let me explain. I have a table called p_id.devices which accumulates the devices_id for a multitude of differing devices used in PID development.(Process Engineering) I also have a table called library.devices which is ( or soon will be ) a detailed explanation of all of the particular

[GENERAL] Shared Objects (Dynamic loading)

2006-08-23 Thread Jasbinder Bali
Hi,I have a function in which i dynamicall load my shared object and the function definition is as follows:CREATE OR REPLACE FUNCTION sp_trigger_raw_email(int4, text) RETURNS bool AS'/usr/local/pgsql/jsbali/parser', 'parse_email' LANGUAGE 'c'

Re: [GENERAL] Shared Objects (Dynamic loading)

2006-08-23 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 01:03:43AM -0400, Jasbinder Bali wrote: CREATE OR REPLACE FUNCTION sp_trigger_raw_email(int4, text) RETURNS bool AS '/usr/local/pgsql/jsbali/parser', 'parse_email' LANGUAGE 'c' VOLATILE STRICT; ALTER FUNCTION sp_trigger_raw_email(int4,text ) OWNER TO postgres;

Re: [GENERAL] [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend

2006-08-23 Thread surabhi.ahuja
Title: Re: [JDBC] org.postgresql.util.PSQLException: An I/O error occured while sending to the backend hi, dont such messages get logged to postgreslog. Also, is it possible to check wht firewall is dropping the connection between the client and the server. thanks, regards Surabhi

Re: [GENERAL] [JDBC] org.postgresql.util.PSQLException: An I/O error occured

2006-08-23 Thread Oliver Jowett
surabhi.ahuja wrote: hi, dont such messages get logged to postgreslog. You might see something in the backend logs -- unexpected client EOF perhaps? Or just idle backend processes. It depends on exactly what is going wrong, and the timing of it. Also, is it possible to check wht firewall