Re: [GENERAL] Postgres mystery

2005-03-29 Thread Michael Fuhr
On Wed, Mar 30, 2005 at 09:11:09AM +0200, Shaun Clements wrote: > Can anyone tell me what the problem is here: > I am inserting into a table via a stored procedure, to a few columns within > the table and postgres is throwing a > CANNOT EXECUTE NULL QUERY. > > EXECUTE ''INSERT INTO table (column1

Re: [GENERAL] Postgres mystery

2005-03-29 Thread Richard Huxton
Shaun Clements wrote: Can anyone tell me what the problem is here: I am inserting into a table via a stored procedure, to a few columns within the table and postgres is throwing a CANNOT EXECUTE NULL QUERY. EXECUTE ''INSERT INTO table (column1, column2, column3, ''||quote_ident(column4)||'') val

Re: [GENERAL] Postgres mystery

2005-03-29 Thread Klint Gore
On Wed, 30 Mar 2005 09:11:09 +0200, Shaun Clements <[EMAIL PROTECTED]> wrote: > Can anyone tell me what the problem is here: > I am inserting into a table via a stored procedure, to a few columns within > the table and postgres is throwing a > CANNOT EXECUTE NULL QUERY. > > > EXECUTE ''INSERT IN

Re: [GENERAL] Zombie processes

2005-03-29 Thread Richard Huxton
Peterson, Bjorn wrote: I am running Postgres 8.0.1 on a Windows 2000 server as a service, and the query returns appropriate values after about 30 seconds when executed from a psql console. However, when running this query from a Java application on the same machine through the postgres JDBC driver

Re: [GENERAL] Upgrade data

2005-03-29 Thread Richard Huxton
josue wrote: Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggestion to properly upgrade my dbs, I also have blobs stored there. Try pg_dump foll

[GENERAL] Postgres mystery

2005-03-29 Thread Shaun Clements
Title: [GENERAL] Postgres mystery Can anyone tell me what the problem is here: I am inserting into a table via a stored procedure, to a few columns within the table and postgres is throwing a CANNOT EXECUTE NULL QUERY. EXECUTE ''INSERT INTO table (column1, column2, column3, ''||quote_ident

Re: [GENERAL] How to return a record and sets of record in plpython

2005-03-29 Thread Sim Zacks
As far as I understand, though I hope someone will post that I'm wrong, plpython cannot return recordsets. In general, I use plpgsql when I want recordets and plpython when I want functionality. I have also called plpython functions from a plpgsql function when I wanted a single value result. "R

Re: [GENERAL] 8.0.2beta1

2005-03-29 Thread Bruce Momjian
Sorry, I have been in Boston since Sunday and return home tomorrow and will then try to get the release notes done unless someone else gets to it first. --- Tom Lane wrote: > "Cristian Prieto" <[EMAIL PROTECTED]> writes: > >

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Caleb Simonyi-Gindele) would write: > John Burger wrote: If it were me, and someone proposed a model where two-way replication was needed, I would tell them to rethink their model. It's broken. >>> >>> I would respectfully d

Re: [GENERAL] Possible to run the server with ANSI/ISO string

2005-03-29 Thread Ken Johanson
The latest mysql build (5.0.3) now supports standard backslash behavior, using the below config option. set-variable=sql-mode=PIPES_AS_CONCAT,ANSI_QUOTES,NO_BACKSLASH_ESCAPE PG seems to be the last holdout. :-) Ken Ken Johanson wrote: [snip] I think most people agree that being SQL compliant is g

Re: [GENERAL] sub query constraint

2005-03-29 Thread Dale Sykora
Yudie Pg wrote: CREATE OR REPLACE FUNCTION validate_actions_insert() RETRUNS OPAQUE AS ' CREATE OR REPLACE FUNCTION validate_actions_insert() RETURNS OPAQUE AS $$ DECLARE rs RECORD; BEGIN SELECT INTO rs * FROM user_data WHERE name = NEW.user and write_access = 't'; IF NOT FOUND THEN RA

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver,

2005-03-29 Thread Joshua D. Drake
Mohan, Ross wrote: Hello Postgres'ers, Oracle newbie to PG here, curious about best books and online resources. A *lot* of what I am finding in google is one to four year old p*ssing contest with MySQL vs. Postgres (don't care) or "Why doesn't PostGres support five level hypergalactic triple ACID

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Tony Caduto
If you are using Delphi you can use the tclientdataset which has a Briefcase type system built in. Or you can use one of the many middleware systems that are available for Delphi, all of which will do what you want. www.remobjects.com www.astatech.com etc etc Most of them work by creating a XML

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-29 Thread Dann Corbit
Probably there is a more recent link. This is the one that popped up in Google: http://www.postgresql.org/docs/7.3/interactive/plpgsql-porting.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mohan, Ross Sent: Tuesday, March 29, 2005 4:35 PM To: pgsq

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-29 Thread Dann Corbit
Here's a newer link: http://www.postgresql.org/docs/8.0/interactive/plpgsql-porting.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mohan, Ross Sent: Tuesday, March 29, 2005 4:35 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Oracle Migration.

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-29 Thread Guy Rouillier
Mohan, Ross wrote: > Hello Postgres'ers, > > Oracle newbie to PG here, curious about best books and online > resources. A *lot* of what I am finding in google is one to four year > old p*ssing contest with MySQL vs. Postgres (don't care) or "Why > doesn't PostGres support five level hypergalactic

[GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-29 Thread Mohan, Ross
Hello Postgres'ers, Oracle newbie to PG here, curious about best books and online resources. A *lot* of what I am finding in google is one to four year old p*ssing contest with MySQL vs. Postgres (don't care) or "Why doesn't PostGres support five level hypergalactic triple ACID Phase Inverters on

[GENERAL] database monitor

2005-03-29 Thread Edson Vilhena de Carvalho
I´m a estudante and I am making a project where I am developing a database monitor, PostgreSQL is one of the database's that my aplication will monotorize. I have only started working with postgreSQL recently I am likin it. I would like to know what do you think it is importante and useful do be

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Scott Marlowe
On Tue, 2005-03-29 at 16:06, Caleb Simonyi-Gindele wrote: > John Burger wrote: > > >>> If it were me, and someone proposed a model where two-way replication > >>> was needed, I would tell them to rethink their model. It's broken. > >> > >> > >> I would respectfully disagree that the requirement f

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Yudie Pg
On Tue, 29 Mar 2005 16:00:37 -0500, John Burger <[EMAIL PROTECTED]> wrote: > >> If it were me, and someone proposed a model where two-way replication > >> was needed, I would tell them to rethink their model. It's broken. > > > > I would respectfully disagree that the requirement for two-way > > r

[GENERAL] Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

2005-03-29 Thread Amir Zicherman
hi guys. i'm using microsoft odbc and i close and open a lot of connections through my code at a regular basis. for some reason, sometimes, not always, i get the following error when i try to open a new connection to the DB: "ERROR [IM005] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHand

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Caleb Simonyi-Gindele
John Burger wrote: If it were me, and someone proposed a model where two-way replication was needed, I would tell them to rethink their model. It's broken. I would respectfully disagree that the requirement for two-way replication indicates a broken design. I agree with your disagreement. Thi

[GENERAL] Upgrade data

2005-03-29 Thread josue
Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggestion to properly upgrade my dbs, I also have blobs stored there. Thanks in advance, -- Sincer

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread John Burger
If it were me, and someone proposed a model where two-way replication was needed, I would tell them to rethink their model. It's broken. I would respectfully disagree that the requirement for two-way replication indicates a broken design. I agree with your disagreement. This design is present in

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Guy Rouillier
Dann Corbit wrote: > If it were me, and someone proposed a model where two-way replication > was needed, I would tell them to rethink their model. It's broken. I'm relatively new to PostgreSQL so won't comment about that. But some DBMSs have this feature built in because it is a fairly common

Re: [GENERAL] 8.0.1 in a non-standard location and tsearch2

2005-03-29 Thread Oleg Bartunov
On Tue, 29 Mar 2005, Ben wrote: Yes by reinstalling to the default location. :) When I get a chance I'll try this again, but I've been too swamped to give it a go. I just tried myself to install pgsql into non-standard location and got no problem. On Tue, 29 Mar 2005, Oleg Bartunov wrote: Di

Re: [GENERAL] 8.0.1 in a non-standard location and tsearch2

2005-03-29 Thread Ben
Yes by reinstalling to the default location. :) When I get a chance I'll try this again, but I've been too swamped to give it a go. On Tue, 29 Mar 2005, Oleg Bartunov wrote: > Did you resolve your problem ? > > On Tue, 29 Mar 2005, Ben wrote: > > > Yes, I did. > > > > On Fri, 25 Mar 2005,

Re: [GENERAL] 8.0.1 in a non-standard location and tsearch2

2005-03-29 Thread Oleg Bartunov
Did you resolve your problem ? On Tue, 29 Mar 2005, Ben wrote: Yes, I did. On Fri, 25 Mar 2005, Oleg Bartunov wrote: Did you try 'make clean' first ? On Thu, 24 Mar 2005, Ben wrote: I'm trying to install tsearch2 into an empty database on a new 8.0.1 postgres install. The machine already has an old

Re: [GENERAL] do I need replication or something else?

2005-03-29 Thread Dann Corbit
Sounds like you are begging for trouble. Suppose that a customer calls in to the main office, and you update some customer data. The field salesman also updates data for this customer. If you update the main office database with the field data, you will lose information. If you update the field

[GENERAL] btree index bloat, prototype non-locking solution

2005-03-29 Thread Dave Chapeskie
The issue commonly referred to as 'btree index bloat' is better after the release of 7.4 but still exists. What follows is a description of the problem (for the non-developers or those that have forgotten), how it can occur in real tables, current work-arounds (REINDEX), and a possible solution th

[GENERAL] do I need replication or something else?

2005-03-29 Thread Caleb Simonyi-Gindele
We have a billing system and we want the ability to send users out into the field with an unconnected (no WAN, VPN etc) laptop containing our pg db and software. Upon their return we need to synchronize changes to the main db. We would like the ability to be able to have this accomplished at th

Re: [GENERAL] pg_xlog disk full error, i need help

2005-03-29 Thread Janning Vygen
Am Dienstag, 29. März 2005 16:37 schrieb Tom Lane: > Janning Vygen <[EMAIL PROTECTED]> writes: > > Am Montag, 28. März 2005 18:06 schrieb Tom Lane: > >> The only way for pg_xlog to bloat vastly beyond what it's supposed to be > >> (which is to say, about twice your checkpoint_segments setting) is i

Re: [GENERAL] 8.0.2beta1

2005-03-29 Thread Michael Fuhr
On Tue, Mar 29, 2005 at 12:22:20PM -0500, Tom Lane wrote: > "Cristian Prieto" <[EMAIL PROTECTED]> writes: > > What are the differences, bugfixes, features, etc in the 8.0.2beta1? I > > was looking around and I couldn't find anything related... Could > > somebody help me? > > Unfortunately we hav

Re: [GENERAL] 8.0.1 in a non-standard location and tsearch2

2005-03-29 Thread Ben
Yes, I did. On Fri, 25 Mar 2005, Oleg Bartunov wrote: > Did you try 'make clean' first ? > > On Thu, 24 Mar 2005, Ben wrote: > > > I'm trying to install tsearch2 into an empty database on a new 8.0.1 > > postgres > > install. The machine already has an older 7.4 install of postgres on it, so

Re: [GENERAL] Views!

2005-03-29 Thread Hrishikesh Deshmukh
Could you give me an example as to how to do it in SQL? CREATE TABLE myschema.mytable ( table1, table2,table3..table17 ); Also can i do querying against a schema/view? Thanks, Hrishi On Tue, 29 Mar 2005 17:16:33 +, Ragnar Hafstað <[EMAIL PROTECTED]> wrote: > On Tue, 2005-03-29 at 11:48

Re: [GENERAL] 8.0.2beta1

2005-03-29 Thread Tom Lane
"Cristian Prieto" <[EMAIL PROTECTED]> writes: > What are the differences, bugfixes, features, etc in the 8.0.2beta1? I = > was looking around and I couldn't find anything related... Could = > somebody help me? Unfortunately we haven't prepared release notes yet. If you want to do testing, what I

Re: [GENERAL] Views!

2005-03-29 Thread Ragnar Hafstað
On Tue, 2005-03-29 at 11:48 -0500, Hrishikesh Deshmukh wrote: [rearranged] > On Tue, 29 Mar 2005 09:01:24 -0500, Sean Davis <[EMAIL PROTECTED]> wrote: > > On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote: > > > > > > > > I have 254 tables, i want to "subset" it in 237 and 17 tables?! > >

Re: [GENERAL] sub query constraint

2005-03-29 Thread Dale Sykora
Yudie Pg wrote: One way to do this is to add a write_access column to actions and use a constraint to force it to be true. Create a UNIQUE key of (name, write_access) for user_data and then add a FOREIGN KEY reference from (name, write_access) in actions to (name, write_access) in user_data. Yes

Re: [GENERAL] 8.0.2beta1 RPMs

2005-03-29 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Tue, 29 Mar 2005, Robin Ericsson wrote: PostgreSQL RPM Building Project[1] has built RPMs for 8.0.2beta1. RPMs for Red Hat Linux 9, Red Hat Enterprise Linux Enterprise Server 3.0, Fedora Cor 1,2,3 are now available, and more to come later. Are

Re: [GENERAL] Views!

2005-03-29 Thread Hrishikesh Deshmukh
Hi, I have go through the docs; what you are suggesting is that take 237 tables and add them into a schema! Could you please please give a code snippet? Thanks, Hrishi On Tue, 29 Mar 2005 09:01:24 -0500, Sean Davis <[EMAIL PROTECTED]> wrote: > Have a look at schemas: > > http://www.postgresql.

Re: [GENERAL] after gentoo emerge plpython failure

2005-03-29 Thread Guy Rouillier
Sim Zacks wrote: > Question for gentoo people - > Is it required to restart daemons, such as postgresql, after an > emerge world? In general, yes, since typically system packages would be updated. But you'd have to see what packages are getting updated as a result of a particular emerge to say

[GENERAL] Solaris 10 svc setup

2005-03-29 Thread Mark Greenbank
Hi, Does anyone have a Solaris 10 smf script that they'd like to share for controlling postgreSQL startup, shutdown, etc.? Mark ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister Your

[GENERAL] Zombie processes

2005-03-29 Thread Peterson, Bjorn
I’m running out of ideas for the following problem:   I have a moderately complex query as follows-   SELECT t.term_id, a.user_id, a.time_slot, a.status, SUM(CASE WHEN a.date>=t.start_date THEN 1 ELSE 0 END), COUNT(a. date) FROM "Table1" a, "Table2" t, "Table2" ytd, "Table3" cu, "Ta

[GENERAL] 8.0.2beta1

2005-03-29 Thread Cristian Prieto
What are the differences, bugfixes, features, etc in the 8.0.2beta1? I was looking around and I couldn't find anything related... Could somebody help me?

[GENERAL] 8.0.2beta1 RPMs

2005-03-29 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, PostgreSQL RPM Building Project[1] has built RPMs for 8.0.2beta1. RPMs for Red Hat Linux 9, Red Hat Enterprise Linux Enterprise Server 3.0, Fedora Cor 1,2,3 are now available, and more to come later. They are available at: http://www.postgresql.o

Re: [GENERAL] Tracking row updates - race condition

2005-03-29 Thread Alex Adriaanse
Harald Fuchs wrote: In article <[EMAIL PROTECTED]>, Alex Adriaanse <[EMAIL PROTECTED]> writes: Thanks for the input everyone. I think Harald's approach will work well... I'm not so sure anymore :-( Consider something like that: UPDATE tbl SET col1 = 1 WHERE col2 = 1; UPDATE tbl SET col1 =

[GENERAL] Unable to restore table oids from pg_dump

2005-03-29 Thread dharana
Hello list, I've got a problem. I have a table like this: id | integer | not null item_table_oid| oid | item_row_id | oid | "id" is a serial field for this table, "item_table_oid" is an oid referencing the oid of the table in the pg_catalog.pg_class table "item_row_

Re: [GENERAL] pg_xlog disk full error, i need help

2005-03-29 Thread Tom Lane
Janning Vygen <[EMAIL PROTECTED]> writes: > Am Montag, 28. März 2005 18:06 schrieb Tom Lane: >> The only way for pg_xlog to bloat vastly beyond what it's supposed to be >> (which is to say, about twice your checkpoint_segments setting) is if >> checkpoints are somehow blocked from happening. The o

Re: [GENERAL] Views!

2005-03-29 Thread Sean Davis
Have a look at schemas: http://www.postgresql.org/docs/current/static/ddl-schemas.html Sean On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote: Hi All, I have 254 tables, i want to "subset" it in 237 and 17 tables?! Is creating views the answer?/ Is there a better way to "subset" them? Thanks,

Re: [GENERAL] Referential integrity using constant in foreign key

2005-03-29 Thread Richard Huxton
Thomas F.O'Connell wrote: Referential integrity never dictates the need for "dummy" columns. If you have a column that you need to refer to a column in another table so strongly that you want the values always to be in sync, you create a foreign key, establishing referential integrity between a

[GENERAL] Views!

2005-03-29 Thread Hrishikesh Deshmukh
Hi All, I have 254 tables, i want to "subset" it in 237 and 17 tables?! Is creating views the answer?/ Is there a better way to "subset" them? Thanks, Hrishi ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED

Re: [GENERAL] plpython function problem workaround

2005-03-29 Thread Marco Colombo
On Tue, 29 Mar 2005, Marco Colombo wrote: # escapes (expanded by PostgreSQL) q3 = r"select count(f1) from test1 where f1 = 'this is a multi line string\r\nline2\r\nline3\r\n'" curs.execute(q3) ^^ This line (no. 28) is useless (but harmless), please ignore it (just a cut&paste error

Re: [GENERAL] plpython function problem workaround

2005-03-29 Thread Marco Colombo
On Tue, 29 Mar 2005, Sim Zacks wrote: The only ?issue? that I have found with it is similar to an issue I posted about multiline in general, which does not seem to be considered a bug. I've posted similar concerns in the past. The whole point is that there are two possible approaches: 1) treat text

[GENERAL] unsubscribe

2005-03-29 Thread [EMAIL PROTECTED]
unsubscribe ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Tracking row updates - race condition

2005-03-29 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Alex Adriaanse <[EMAIL PROTECTED]> writes: > Thanks for the input everyone. I think Harald's approach will work > well... I'm not so sure anymore :-( Consider something like that: UPDATE tbl SET col1 = 1 WHERE col2 = 1; UPDATE tbl SET col1 = 2 WHERE col2 = 1; w

Re: [GENERAL] plpython function problem workaround

2005-03-29 Thread Sim Zacks
The only ?issue? that I have found with it is similar to an issue I posted about multiline in general, which does not seem to be considered a bug. I would say if it is documented that any newlines in a python function, including embedded newlines, are *NIX newlines no matter what operating system t