[GENERAL] How to add an INHERITS to an already populated table ?

2005-05-31 Thread David Pradier
Hi everybody, is it possible to add some inheritance lively, without doing a dump/restore ? Some bits of information to explain why I'd like to do that : I've got those big tables, without correct constraints, sometimes even without foreign keys et with sometimes some problems of data

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Richard Huxton
David Pradier wrote: Hi everybody, is it possible to add some inheritance lively, without doing a dump/restore ? Not AFAIK. Easiest solution is probably to script some ALTER TABLE ADD COLUMN commands. -- Richard Huxton Archonet Ltd ---(end of

Re: [GENERAL] a way to reset the postgres password to nothing..

2005-05-31 Thread Richard Huxton
bruce wrote: hi... i've set up a postrges db, and i can get to it using a user/passwd. however, when i su into the postgres user, and i try to do a 'psql -U postgres' it prompts me for the password.. i have no idea what the password would be.. i created everything, and thought i had just given

Re: [GENERAL] How to add an INHERITS to an already populated table ?

2005-05-31 Thread Zlatko Matic
Hi. Recently I have tried to do the same thing and I coudn't include inheritence in existing tables. After a half of day of frustration, I have got an idea. I have successfully done it by using EMS PostgreSQL Manager Lite (you can download it from the net). There is an option Duplicate in EMS

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Oleg Bartunov
look on pg_inherits table and pg_class.relhassubclass. More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 On Tue, 31 May 2005, Richard Huxton wrote: David Pradier wrote: Hi everybody, is it possible to add some inheritance lively, without doing a dump/restore ? Not AFAIK. Easiest

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Oleg Bartunov
On Tue, 31 May 2005, Oleg Bartunov wrote: look on pg_inherits table and pg_class.relhassubclass. More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 example: create table t (i int4); create table t1 (i int4); create table t2 (i int4); -- mark 't' has children tables update pg_class

[GENERAL] pg_get_serial_sequence and table inheritence

2005-05-31 Thread Timothy Perrigo
Is there anything similar to pg_get_serial_sequence that will work with tables that have an inherited serial column? For example, if I have 2 tables: create table base ( idserial not null primary key ); and create table derived ( stufftext, constraint derived_pkey primary key(id)

[GENERAL] database auto-commit

2005-05-31 Thread FERREIRA, William (COFRAMI)
hi i writing a j2ee application working with postgresql and i meet a problem with autocommit from my j2ee application i call a perl function and i get an error : in french : Les Large Objects ne devraient pas être utilisés en mode auto-commit. in english : Large Objects should not be used in

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread Alvaro Herrera
On Tue, May 31, 2005 at 04:53:46PM +0400, Oleg Bartunov wrote: On Tue, 31 May 2005, Oleg Bartunov wrote: look on pg_inherits table and pg_class.relhassubclass. More info http://www.pgsql.ru/db/mw/msg.html?mid=2044343 example: create table t (i int4); create table t1 (i int4); create

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread David Pradier
Well, it seems very promising ! I think I'll make some tests and do it your way asap. Thanks a lot ! Thanks to everybody else, too. Best regards, David -- [EMAIL PROTECTED] - tel: 01.46.47.21.33 - fax: 01.46.47.21.37 ---(end of broadcast)--- TIP

Re: [GENERAL] How to add an INHERITS to an already populated table

2005-05-31 Thread David Pradier
Please note that the inheritance is not fully set -- if you discover strange behavior e.g. when altering any of the tables, don't be surprised. In particular, you should set the attislocal and attinhcount attributes in pg_attribute for the child tables; also pg_depend entries are missing. I

[GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Jeff Brown
Hi guys Is there some sort of C API available for PostgreSQL? Cheers Jeff ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] tsearch2 + trigram pairing

2005-05-31 Thread Viljo Marrandi
Hello, I'm trying to figure out how to get tsearch2 and pg_trgm working together nicely. I have successfully installed both of them on Postgresql 8.0.3. Let's say I've one table 'info' with field 'words' in it. I created 'words_idx tsvector' field from it and populated it with some data.

Re: [GENERAL] Using PG 8.0 with OpenSSL

2005-05-31 Thread Kay-Uwe Genz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Joshua, you're right. But it's no problem for me, if I change the concept. Thanks a lot. Kay-Uwe Genz -BEGIN PGP SIGNATURE- Version: PGP 8.0.3 - not licensed for commercial use: www.pgp.com

[GENERAL] For Tom Lane

2005-05-31 Thread [EMAIL PROTECTED]
From : Tom Lane [EMAIL PROTECTED] To : gabriele zelasco [EMAIL PROTECTED] Cc : pgsql-general@postgresql.org Date : Thu, 26 May 2005 17:50:29 -0400 Subject : Re: [GENERAL] Locking rows gabriele zelasco [EMAIL PROTECTED] writes: I would like to start a transaction

Re: [GENERAL] pg_get_serial_sequence and table inheritence

2005-05-31 Thread Rafa Couto
2005/5/31, Timothy Perrigo [EMAIL PROTECTED]: I'd like to be able to call pg_get_serial_sequence passing derived for the table and id for the sequence column (to get, in this case base_id_seq). If nothing like this currently exists, any suggestions on how I could write a plpgsql function to

[GENERAL] Connecting to Postgres from LAN

2005-05-31 Thread Andrus
I installed Postgres 8 to Windows XP and added a line hostall all 168.179.0.1/32 trust to pg_hba.conf file When connection from LAN to the Postgres with user name postgres I got error no pg_hba.conf entry for host 168.179.0.10, user postgres, database mydb, SSL

[GENERAL] For Tom Lane (Msg-ID: [EMAIL PROTECTED])

2005-05-31 Thread [EMAIL PROTECTED]
gabriele zelasco [EMAIL PROTECTED] writes: I would like to start a transaction with a sql function. When user press edit button on my form, i would lock the current row. After user has modified data on form, pressing save button I would save t= he modified row by sql update function and

[GENERAL] Missing numbers

2005-05-31 Thread josue
Hello list, I need to track down the missing check numbers in a serie, table contains a column for check numbers and series like this: dbalm=# select doc_numero,doc_ckseriesfk from bdocs where doc_cta=1 dbalm-# and doc_tipo='CHE' order by doc_numero; doc_numero | doc_ckseriesfk

[GENERAL] System info in/through database on Windows 2000 Postres 8.x

2005-05-31 Thread Oisin Glynn
Hi, I am wondering if there is a way to get simple (or more advanced ) system information from the database about the server. Free disk space, Memory usage, CPU usage. And any other health of system information in general. I have done some archive searching but not turned up very much.

Re: [GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Alvaro Herrera
On Mon, May 30, 2005 at 11:31:17PM -0700, Jeff Brown wrote: Hi guys Is there some sort of C API available for PostgreSQL? For C you can use libpq. For C++, see libpqxx in gborg.org (or did it move to pgfoundry.org?) -- Alvaro Herrera (alvherre[a]surnet.cl) Oh, great altar of passive

[GENERAL] interval integer comparison

2005-05-31 Thread Havasvölgyi Ottó
Hi all, Pg 8.0.3 allows me to compare interval with integer, but I cannot see any reasonable rule: These are true: 1 '1 days'::interval 2 '1 days'::interval 999 '1 days'::interval 1999 '2 days'::interval 2000 != '2 days'::interval 2001 '2 days'::interval ... 20999 '21

Re: [GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Havasvölgyi Ottó
Jeff, Yes, libpq. Look at the 27th chapter in the manual. Otto - Original Message - From: Jeff Brown [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Tuesday, May 31, 2005 8:31 AM Subject: [GENERAL] Accessing PostgreSQL from C++ Hi guys Is there some sort of C API

Re: [GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Christopher Browne
[EMAIL PROTECTED] (Jeff Brown) wrote: Is there some sort of C API available for PostgreSQL? Yes, there is a C API available for PostgreSQL. It is called libpq. Was there some particular reason why you could not find it in the documentation? It has an entire chapter devoted to it in the

Re: [GENERAL] interval integer comparison

2005-05-31 Thread Tom Lane
=?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= [EMAIL PROTECTED] writes: Pg 8.0.3 allows me to compare interval with integer, but I cannot see any reasonable rule: 1 '1 days'::interval The reason that doesn't fail outright is that both integer and interval have implicit coercions to text. So the

Re: [GENERAL] Missing numbers

2005-05-31 Thread Harald Fuchs
In article [EMAIL PROTECTED], josue [EMAIL PROTECTED] writes: Hello list, I need to track down the missing check numbers in a serie, table contains a column for check numbers and series like this: dbalm=# select doc_numero,doc_ckseriesfk from bdocs where doc_cta=1 dbalm-# and

Re: [GENERAL] For Tom Lane

2005-05-31 Thread Scott Marlowe
On Fri, 2005-05-27 at 09:57, [EMAIL PROTECTED] wrote: Thanks for answer Tom Consider what happens when the user leaves for lunch Well, I've already thought about it.But I'm working with VS2003 and disconnected dataset.. so when user edit data he's modifying an old disconnected row,

[GENERAL] Primary key column numbers...

2005-05-31 Thread Justin Tocci
What I'm trying to do is IF the relation given is a TABLE, give the primary key column numbers. IF the relation is a VIEW, just give an array with a '1' in it. ELSE NULL. Later I'll put in some hocus-pocus to be more intelligent about VIEWs but right now this would do me fine. I've read the

Re: [GENERAL] Connecting to Postgres from LAN

2005-05-31 Thread Alexandre Lollini
on 30/05/05 20:47, Andrus [EMAIL PROTECTED] wrote: I installed Postgres 8 to Windows XP and added a line hostall all 168.179.0.1/32 trust to pg_hba.conf file When connection from LAN to the Postgres with user name postgres I got error no pg_hba.conf

[GENERAL] postgreSQL 7.3.8, pg_dump not able to find large object

2005-05-31 Thread Ron Snyder
We've been getting errors similar to the following (the specific large object that is missing is different every time) during our nightly pg_dump: pg_dump: dumpBlobs(): could not open large object: ERROR: inv_open: large object 48217896 not found I found a suggestion

Re: [GENERAL] [PORTS] Major flood of mail to lists ...

2005-05-31 Thread Mohan, Ross
Wow, you mean mail besides my own is considering to be junk? ;-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc G. Fournier Sent: Tuesday, May 31, 2005 1:46 PM To: pgsql-announce@postgresql.org Cc: pgsql-general@postgresql.org;

Re: [ODBC] [GENERAL] how to unsubscribe

2005-05-31 Thread Goulet, Dick
BTW: Who let all the spammers into the list(s)? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Marlowe Sent: Tuesday, May 24, 2005 10:06 AM To: [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org; [EMAIL PROTECTED] Subject: Re: [ODBC] [GENERAL] how

Re: [GENERAL] Primary key column numbers...

2005-05-31 Thread Tom Lane
Justin Tocci [EMAIL PROTECTED] writes: SELECT indkey FROM (SELECT relname, indkey FROM pg_catalog.pg_index join pg_catalog.pg_class ON pg_index.indrelid = pg_class.oid WHERE indisprimary=true UNION SELECT viewname, ('{1}')::int2vector[] as indkey FROM pg_catalog.pg_views ) t WHERE

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-05-31 Thread Alvaro Herrera
On Tue, May 31, 2005 at 01:03:30AM -0400, Tom Lane wrote: So the initial evidence is that this was not an intentional change. Do we want to revert it? The behavior has been in the field now for more than a full release cycle --- all 7.4.* releases behave this way --- so one could argue that

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-05-31 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, May 31, 2005 at 01:03:30AM -0400, Tom Lane wrote: So the initial evidence is that this was not an intentional change. Do we want to revert it? The behavior has been in the field now for more than a full release cycle --- all 7.4.* releases

[GENERAL] using pg_dump to dump only a schema?

2005-05-31 Thread thomas
hi there, i'm wondering, if i can use pg_dump to move only one schema of a db from the one server, intoan other schema on the other server? for example: Server A: Database: xyz_test Schema: 123 Server B: Database: xyz_prod Schema: 999 The tablenames and so on are equal. and i wan't to

Re: [GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Gianni Mariani
Jeff Brown wrote: Hi guys Is there some sort of C API available for PostgreSQL? I'm quite happy with libpqxx. ftp://gborg.postgresql.org/pub/libpqxx/stable/libpqxx-2.5.0.tar.gz Cheers Jeff ---(end of broadcast)--- TIP 8: explain analyze

Re: [GENERAL] using pg_dump to dump only a schema?

2005-05-31 Thread Scott Marlowe
On Tue, 2005-05-31 at 15:03, thomas wrote: hi there, i'm wondering, if i can use pg_dump to move only one schema of a db from the one server, intoan other schema on the other server? for example: Server A: Database: xyz_test Schema: 123 Server B: Database: xyz_prod Schema: 999

[GENERAL] Major flood of mail to lists ...

2005-05-31 Thread Marc G. Fournier
Do to moderator error (namely, mine), several hundred messages (spread across all the lists) were just approved ... Sorry for all the incoming junk :( Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!: yscrappy

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

2005-05-31 Thread Alvaro Herrera
On Tue, May 31, 2005 at 03:43:56PM -0400, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, May 31, 2005 at 01:03:30AM -0400, Tom Lane wrote: So the initial evidence is that this was not an intentional change. Do we want to revert it? The behavior has been in the field now

[GENERAL] How to wait until startup completes

2005-05-31 Thread Gary Horton
I'm starting up postgresql with this command line: /usr/bin/setpgrp ${POSTGRESQL_HOME}/bin/pg_ctl -w -o -i start ...and there are two things about this that raise a question. First, we use the setpgrp because, although pg_ctl documentation (7.3.4) states that it can be used for properly

[GENERAL] US Phone Number Data

2005-05-31 Thread Matthew T. O'Connor
Hello, Not sure if this is a good place to ask this question, but it is the general list My company is looking for a way to get a list of all the names and phone numbers with addresses for New Jersey. Does anyone know where / how I can get this dataset? I have done some googling and

Re: [GENERAL] Missing numbers

2005-05-31 Thread Simon Riggs
On Tue, 2005-05-31 at 18:28 +0200, Harald Fuchs wrote: In article [EMAIL PROTECTED], josue [EMAIL PROTECTED] writes: Hello list, I need to track down the missing check numbers in a serie, table contains a column for check numbers and series like this: dbalm=# select

[GENERAL] freebsd port successful/failed install

2005-05-31 Thread Matthew Terenzio
Any FreeBSD experts know what conditions might have the port (postgresql-server-8.0.1_3) look like like it installs successfully but /usr/local/pgsql/data is not created and so there is no postgresql.conf to find. also running /usr/local/etc/rc.d/010.pgsql.sh initdb looks like it just

Re: [GENERAL] freebsd port successful/failed install

2005-05-31 Thread Marc G. Fournier
On Tue, 31 May 2005, Matthew Terenzio wrote: Any FreeBSD experts know what conditions might have the port (postgresql-server-8.0.1_3) look like like it installs successfully but /usr/local/pgsql/data is not created and so there is no postgresql.conf to find. also running

Re: [GENERAL] CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS

2005-05-31 Thread Neil Conway
On Tue, 2005-05-31 at 15:43 -0400, Tom Lane wrote: OK, next question: is this a bug fix we should back-patch into 7.4, or just change it in HEAD? I agree with Alvaro: fix it in HEAD, but don't backport the change to 8.0 or 7.4. -Neil ---(end of

Re: [GENERAL] How to wait until startup completes

2005-05-31 Thread Tom Lane
Gary Horton [EMAIL PROTECTED] writes: [ assorted startup problems ] You did not say what platform this is on, nor which Postgres version you are running. Tsk tsk. As for the setpgrp business, that doesn't sound real unreasonable. I use nohup for that purpose, and it seems to work fine on all

Re: [GENERAL] Missing numbers

2005-05-31 Thread Alvaro Herrera
On Wed, Jun 01, 2005 at 01:21:28AM +0100, Simon Riggs wrote: On Tue, 2005-05-31 at 18:28 +0200, Harald Fuchs wrote: SELECT g.num FROM generate_series ((SELECT min(doc_numero) FROM bdocs), (SELECT max(doc_numero) FROM bdocs)) AS g(num) LEFT JOIN bdocs ON

[GENERAL] unsubscribe

2005-05-31 Thread E U
---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[GENERAL] Issue with OS X

2005-05-31 Thread Jamie Deppeler
Hi, I am trying to install postgresql 8 on a G5 OS X machine and cannot get past this error i have tried changing the shared buffer with no luck. Error message: /usr/local/pgsql/data postgres$ FATAL: could not create shared memory segment: Invalid argument DETAIL: Failed system call was