Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
On Tue, Apr 05, 2005 at 01:43:56PM -0400, Joseph Shraibman wrote: > > Can I take the new .c file, do a make install, and have it work in 7.4.7 ? Not unmodified, since it uses features new to 8.0 (e.g., tablespaces). -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of

Re: [GENERAL] Loosing connection with the database

2005-04-05 Thread Kris Jurka
On Sat, 2 Apr 2005, [ISO-8859-1] Poul Møller Hansen wrote: > >This sort of thing has been seen to occur when multiple client-side > >threads try to use the same database connection without proper locking > >to ensure only one thread uses it at a time. See for example > >http://archives.postgres

Re: [GENERAL] array_append not working

2005-04-05 Thread Joe Conway
Lucas F. wrote: Sorry, this is probably a dumb mistake on my part. New to Postgres. Running 8.0 on Linux. The array_append below is giving me a syntax error, and I have no idea what I am doing wrong. array_append(v_query_array,(rec.item_field_name || '=' || v_value::text)::text); You need to assig

[GENERAL] array_append not working

2005-04-05 Thread Lucas F.
Sorry, this is probably a dumb mistake on my part. New to Postgres. Running 8.0 on Linux. The array_append below is giving me a syntax error, and I have no idea what I am doing wrong. Also as a side note is there a straightforward way to get a value from a dynamic query into a local variable? The

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Joshua D. Drake
Or were you trying to say "let's ship it, and I don't care if major Linux distributors refuse to include it in their packaging because it's too hard to build that way"? Close but not quite :). I was saying that Linux distributors are going to do what their users want. Otherwise the distribution di

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Joshua D. Drake
Obviously my opinion is that B is met and A is being worked on. I just caught on to this thread. For those of us who don't want PHP withing shouting distance of our PostgreSQL server what does this mean? It means nothing. If you don't want to use plPHP don't :) I don't trust PHP or its dev

Re: [GENERAL] Out of memory error on select

2005-04-05 Thread Greg Stark
Werner Bohl <[EMAIL PROTECTED]> writes: > Explain output: > "HashAggregate (cost=881509.02..881510.02 rows=200 width=20)" > " Filter: (count(*) > 1)" > " -> Seq Scan on lssi_base (cost=0.00..872950.68 rows=1711668 > width=20)" If this is just a one-time query just do set enable_hashagg = o

Re: [GENERAL] Out of memory error on select

2005-04-05 Thread Scott Marlowe
On Tue, 2005-04-05 at 16:04, Werner Bohl wrote: > I have a fairly large table (21M) records. One field of type varchar(16) > has some duplicate values, which I'm trying to identify. > Executing select dup_field from dup_table group by dup_field having > count(*) > 1 errs with Out of Memory error. S

[GENERAL] Out of memory error on select

2005-04-05 Thread Werner Bohl
I have a fairly large table (21M) records. One field of type varchar(16) has some duplicate values, which I'm trying to identify. Executing select dup_field from dup_table group by dup_field having count(*) > 1 errs with Out of Memory error. Server has 4GB memory, the backend-process errs after 3.7

[GENERAL] Catching DDL events (or equivalent functionality)

2005-04-05 Thread Master of the beasts
Hi, I know that you can not (and maybe should not) install triggers on system catalogs. But, if I want to catch certain DDL events (such as adding a column), is there any way to do it in PostgreSQL? Maybe, it could be useful that the triggers (installed on normal tables) can be fired not only b

Re: [GENERAL] cygwin and psql

2005-04-05 Thread Magnus Hagander
Title: Meddelande It needs to be removed fromt he path of the server process if you want to use PL/Perl, PL/Tcl or PL/Python. If not, you should be ok having it ni there, just not during the installation. It should have no effect in the clients environment.   //Magnus -Ursprungligt

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Russ Brown
Scott Marlowe wrote: What I would much prefer is a matrix that shows all the features a PL should / could have, and which PLs have those features, which features are currently being implemented, who maintains them if they are maintained, if they aren't maintained, etc.. So that when it comes time

[GENERAL] unsubscribe

2005-04-05 Thread Carlos Roberto Chamorro Mostac
unsubscribe _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com ---(end of broadcast)--- TIP 2: you can get off

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > somee <[EMAIL PROTECTED]> writes: > > I want to change column order in select * from table instruction; > > I can do that changing attnum but I don't know it is safely or not for > > system. > > It won't work and will likely crash the backend. Out of curios

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Grzegorz Przeździecki
Welcome > > Yes, unless you also TRUNCATE the table, because attnum ordering tells > about the physical data layout within the table rows. Furthermore, > altering only pg_attribute is unlikely to represent a complete update > of the catalogs --- attnums also show up in pg_index, pg_attrdef, > pg_d

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Tom Lane
Grzegorz =?iso-8859-2?q?Prze=BCdziecki?= <[EMAIL PROTECTED]> writes: >> It won't work and will likely crash the backend. > Even if I will do like this and for ever?? > 1. attnum will be unique and greater than 0 > 2. no holes in attnum numeric > 3. Make change > 4. restart postgresql Yes, unle

Re: [GENERAL] Check for existence of index

2005-04-05 Thread David Rysdam
Tom Lane wrote: David Rysdam <[EMAIL PROTECTED]> writes: Why can't I have the same index name be on different tables? You can ... if they are in different schemas. Indexes and tables share the same namespace, ie, they must be unique within a schema. As for your original question, you prob

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Grzegorz Przeździecki
Dnia wtorek, 5 kwietnia 2005 20:13, Tom Lane napisał: > somee <[EMAIL PROTECTED]> writes: > > I want to change column order in select * from table instruction; > > I can do that changing attnum but I don't know it is safely or not for > > system. > > It won't work and will likely crash the backend.

Re: [GENERAL] Check for existence of index

2005-04-05 Thread Tom Lane
David Rysdam <[EMAIL PROTECTED]> writes: > Why can't I have the same index name be on > different tables? You can ... if they are in different schemas. Indexes and tables share the same namespace, ie, they must be unique within a schema. As for your original question, you probably want somethin

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Tom Lane
somee <[EMAIL PROTECTED]> writes: > I want to change column order in select * from table instruction; > I can do that changing attnum but I don't know it is safely or not for > system. It won't work and will likely crash the backend. regards, tom lane

[GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread somee
Welcome I want to change column order in select * from table instruction; I can do that changing attnum but I don't know it is safely or not for system. Question is can do that or not. Thanks for help Best Regards ---(end of broadcast)--- TIP

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Joseph Shraibman
Can I take the new .c file, do a make install, and have it work in 7.4.7 ? Michael Fuhr wrote: On Tue, Apr 05, 2005 at 01:25:01PM -0400, Joseph Shraibman wrote: local]:o=>select version(); version --

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
On Tue, Apr 05, 2005 at 01:25:01PM -0400, Joseph Shraibman wrote: > local]:o=>select version(); > version > - > PostgreSQL 7.4.7 on i686-pc-linux

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Joseph Shraibman
local]:o=>select version(); version - PostgreSQL 7.4.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) (1

Re: [GENERAL] Check for existence of index

2005-04-05 Thread David Rysdam
And another thing, can't I do this: create table s.a (blah); create table s.b (blah); create index myindex on s.a(blah); create index myindex on s.b(blah); ? When I drop them I have to specify the schema name, so presumably it tracks them that way. Why can't I have the same index name be on dif

Re: [GENERAL] contrib/dbsize

2005-04-05 Thread Michael Fuhr
On Tue, Apr 05, 2005 at 12:24:02PM -0400, Joseph Shraibman wrote: > > How come relation_size() doesn't work on an index? Could you define "doesn't work"? An example with the expected and actual output might show what's happening. I just ran some simple tests and relation_size() correctly showed

Re: [GENERAL] Vacuum time degrading

2005-04-05 Thread Tom Lane
Wes <[EMAIL PROTECTED]> writes: > Ok, now I follow. Taking the biggest indexes: > The weekend before: > INFO: index "message_recipients_i_recip_date" now contains 393961361 row > versions in 2435100 pages > INFO: index "message_recipients_i_message" now contains 393934394 row > versions in 1499

Re: [GENERAL] Vacuum time degrading

2005-04-05 Thread Wes
On 4/5/05 11:15 AM, "Tom Lane" <[EMAIL PROTECTED]> wrote: > I didn't say it wasn't consistent, just that it doesn't prove the > point. The speedup you saw could have been from elimination of index > bloat more than from bringing the index into physically sorted order. > An estimate of the overall

[GENERAL] Check for existence of index

2005-04-05 Thread David Rysdam
I have a script that automatically creates my database objects. In order to automatically create indexes, it needs to first make sure they don't exist. For things like tables, this is easy: select * from information_schema.tables where table_schema = "" and table_name = "" But for indexes it

Re: [GENERAL] Postmaster running out of discspace; Data corruption?

2005-04-05 Thread Hannes Dorbath
ok :) Thank you On 05.04.2005 18:11, Tom Lane wrote: Hannes Dorbath <[EMAIL PROTECTED]> writes: one of our servers did accidently run out of discspace during a huge data load. Postmaster closed the connection with `no space left on device, cannot write x_log' or something similar. We have fsync=f

[GENERAL] contrib/dbsize

2005-04-05 Thread Joseph Shraibman
How come relation_size() doesn't work on an index? ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailin

Re: [GENERAL] Vacuum time degrading

2005-04-05 Thread Tom Lane
Wes <[EMAIL PROTECTED]> writes: > On 4/4/05 8:50 AM, "Tom Lane" <[EMAIL PROTECTED]> wrote: >> That doesn't follow from what you said. Did you check that the physical >> sizes of the indexes were comparable before and after the reindex? > No, how do I do that (or where is it documented how to do i

Re: [GENERAL] Postmaster running out of discspace; Data corruption?

2005-04-05 Thread Tom Lane
Hannes Dorbath <[EMAIL PROTECTED]> writes: > one of our servers did accidently run out of discspace during a huge > data load. Postmaster closed the connection with `no space left on > device, cannot write x_log' or something similar. We have fsync=false on > that machine. Do we have to fear dat

Re: [GENERAL] Vacuum time degrading

2005-04-05 Thread Wes
On 4/4/05 8:50 AM, "Tom Lane" <[EMAIL PROTECTED]> wrote: > That doesn't follow from what you said. Did you check that the physical > sizes of the indexes were comparable before and after the reindex? No, how do I do that (or where is it documented how to do it)? How is it not consistent? I bel

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Tom Lane
tony <[EMAIL PROTECTED]> writes: > I just caught on to this thread. For those of us who don't want PHP > withing shouting distance of our PostgreSQL server what does this mean? Nothing. You'll always have the option to not build plPHP and/or not install it, no matter what we do or don't do with t

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > I understand your point Tom. However as I said in a earlier > post, just because it is in core doesn't mean they have to > package it. If it were in our CVS, but still shipped as an separate, independently-built source package, then my objection woul

[GENERAL] Postmaster running out of discspace; Data corruption?

2005-04-05 Thread Hannes Dorbath
Hi, one of our servers did accidently run out of discspace during a huge data load. Postmaster closed the connection with `no space left on device, cannot write x_log' or something similar. We have fsync=false on that machine. Do we have to fear data corruption? Postmaster continued as normal (

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread tony
Le mardi 05 avril 2005 à 08:26 -0700, Joshua D. Drake a écrit : > Frankly I don't think we should care if PHP is borked on > their API or build process. We should care if plPHP is: > > A. Quality enough software (and yes it needs some work) to > go into core. > > B. Appropriate for the PostgreSQ

Re: [GENERAL] PL/PERL: raise notice, exception ?

2005-04-05 Thread Jim C. Nasby
On Tue, Apr 05, 2005 at 07:37:03AM -0700, David Fetter wrote: > On Tue, Apr 05, 2005 at 04:28:10PM +0200, Philippe Lang wrote: > > Hi, > > > > Is there in PL/PERL, under PG 8.01, an equivalent for the "raise > > notice, exception" commands of PL/PGSQL? > > Use the elog() function. :) See also ht

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Marc G. Fournier
On Tue, 5 Apr 2005, Russell Smith wrote: I may be a bad man for suggesting it... But is it possible to ship libpq as a seperate tarball that you can compile without postgresql server? Actually, its something that I'm going to sit down and work on ... not pulling libpq out of core, but creating

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Joshua D. Drake
The proposal on the table is to bundle plPHP into the Postgres source package, and the problem is that that introduces a circular dependency at build time because PHP already made a similar bundling. That was a bad move on their part and we shouldn't compound the problem by making a similar error

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn_Marqu=E9s?= writes: > El Lun 04 Abr 2005 17:36, Tom Lane escribió: >> Perl and Python don't have "BuildPrereq: postgresql-devel" in their rpmspecs. >> PHP does. > The header files would not be a problem. The real problem is that you also > need to have postgresql-libs. :-

Re: [GENERAL] installation AIX - LINUX

2005-04-05 Thread Tom Lane
"H.J. Sanders" <[EMAIL PROTECTED]> writes: > So why is .. server/libpq missing on AIX. You forgot to do "make install-all-headers", likely. You don't actually *need* those files, unless you intend to do server-side code development. regards, tom lane

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Tom Lane
Robin Ericsson <[EMAIL PROTECTED]> writes: > Martijn van Oosterhout wrote: >> I suppose the choice comes down to either PHP splitting the DB access >> (like other languages) or PostgreSQL splitting out pl/PHP. > Most major distributions (Fedora Core, Debian, Redhat) splits core php > and database

Re: [GENERAL] [Fwd: [webmaster] in Search of free hosting with

2005-04-05 Thread Scott Marlowe
On Tue, 2005-04-05 at 08:38, Robert Treat wrote: > On Sun, 2005-04-03 at 07:43, tony wrote: > > Le dimanche 03 avril 2005 Ã 04:10 -0700, Jaqui Greenlees a Ãcrit : > > > Sim Zacks wrote: > > > > dot geeks home page > > > > " The new server will *not support PostgreSQL* so please migrate > > > >

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Scott Marlowe
On Mon, 2005-04-04 at 19:52, Paul Tillotson wrote: > Joshua D. Drake wrote: > > > > >> Honestly, I think if we're going to spend time worrying about languages > >> as features then we should be doing more to advertise the fact that > >> perl/PHP/python/ruby/etc programmers can program in the datab

Re: [GENERAL] PL/PERL: raise notice, exception ?

2005-04-05 Thread David Fetter
On Tue, Apr 05, 2005 at 04:28:10PM +0200, Philippe Lang wrote: > Hi, > > Is there in PL/PERL, under PG 8.01, an equivalent for the "raise > notice, exception" commands of PL/PGSQL? Use the elog() function. :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100

[GENERAL] PL/PERL: raise notice, exception ?

2005-04-05 Thread Philippe Lang
Hi, Is there in PL/PERL, under PG 8.01, an equivalent for the "raise notice, exception" commands of PL/PGSQL? Philippe ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] pg_restore

2005-04-05 Thread Sven Willenberger
On Tue, 2005-04-05 at 12:10 +0530, Nageshwar Rao wrote: > Hi, > > I took a dump using the following command > > Pg_dump -f bk.dmp > > > When I tried to restore a table from the dump it just hangs there > > Pg_restore -f bk.dump -t table_name > > > Also tried by giving username also > > A

Re: [GENERAL] [Fwd: [webmaster] in Search of free hosting with

2005-04-05 Thread Robert Treat
On Sun, 2005-04-03 at 07:43, tony wrote: > Le dimanche 03 avril 2005 à 04:10 -0700, Jaqui Greenlees a écrit : > > Sim Zacks wrote: > > > dot geeks home page > > > " The new server will *not support PostgreSQL* so please migrate your > > > DB > > > to MySQL (using the mygeek area of the site) o

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martín Marqués
El Lun 04 Abr 2005 18:00, Doug McNaught escribió: > Robert Treat <[EMAIL PROTECTED]> writes: > > > If by "stripped down" you mean without postgresql database support then > > I'll grant you that, but it is no different than other any other pl > > whose parent language requires postgresql to be ins

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martín Marqués
El Lun 04 Abr 2005 17:36, Tom Lane escribió: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > > Maybe I am just dense, but the argument seems to be completely moot. PHP > > is no different than Perl or Python in this case. > > Perl and Python don't have "BuildPrereq: postgresql-devel" in their

[GENERAL] Connection refused

2005-04-05 Thread Rafael . Hernamperez
Hi, I have installed Postgre 8.0 on a Windows XP. Yesterday, I was creating a database with pgAdmin III tool. Today, I can't connect to database. When I start pgAdmin and I try to connect to the database server, the next message is showed: "could not connect to server: Connection refused (0x00

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Robin Ericsson
Martijn van Oosterhout wrote: On Tue, Apr 05, 2005 at 11:17:48AM +0200, Robin Ericsson wrote: Martijn van Oosterhout wrote: I suppose the choice comes down to either PHP splitting the DB access (like other languages) or PostgreSQL splitting out pl/PHP. Most major distributions (Fedora Core, Debian,

[GENERAL] installation AIX - LINUX

2005-04-05 Thread H.J. Sanders
Hello. We have installed 7.4.7 on both AIX 4.3.3 and LiNUX SUSE 9. On AIX from source and on Linux from the rpm. Both went well but in comparing the installation we found that something is missing on AIX. On Linux we got .. include/pgsql/libpg server/libpq

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martijn van Oosterhout
On Tue, Apr 05, 2005 at 11:17:48AM +0200, Robin Ericsson wrote: > Martijn van Oosterhout wrote: > >I suppose the choice comes down to either PHP splitting the DB access > >(like other languages) or PostgreSQL splitting out pl/PHP. > > Most major distributions (Fedora Core, Debian, Redhat) splits c

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Robin Ericsson
Martijn van Oosterhout wrote: I suppose the choice comes down to either PHP splitting the DB access (like other languages) or PostgreSQL splitting out pl/PHP. Most major distributions (Fedora Core, Debian, Redhat) splits core php and database-access in different packages. Might be that sqlite is c

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Martijn van Oosterhout
On Tue, Apr 05, 2005 at 06:06:09PM +1000, Russell Smith wrote: > The issue also includes the fact that you can't install libpq without having > postgresql > installed. If you could do that, the circular dependency wouldn't exist. > > Some systems build postgresql into php, given that is the case

Re: [GENERAL] insert woes

2005-04-05 Thread tony
Le mardi 05 avril 2005 à 09:43 +0100, Richard Huxton a écrit : > Copies of the queries in question please. Also, cut the INSERT INTO off > the front and have a look for any duplicates. Sorry, I was just looking for a logic booster not SQL correction and I thought of trying without the INSERT INT

Re: [GENERAL] insert woes

2005-04-05 Thread Richard Huxton
tony wrote: Hi, I am migrating data from one data structure to another and having problems writing a correct INSERT INTO blah SELECT ... from existing tables I have contact, my addresses (each contact can have several addresses) and address (each address can have several contacts). I am getting uni

[GENERAL] insert woes

2005-04-05 Thread tony
Hi, I am migrating data from one data structure to another and having problems writing a correct INSERT INTO blah SELECT ... from existing tables I have contact, my addresses (each contact can have several addresses) and address (each address can have several contacts). I am getting unique key a

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Russell Smith
On Tue, 5 Apr 2005 06:01 am, Joshua D. Drake wrote: > Tom Lane wrote: > > >Andrew Dunstan <[EMAIL PROTECTED]> writes: > > > >>... If there are no license or build issues I'm in favor. > >> > > > >Peter has pointed out that the problem of circular dependencies is a > >showstopper for integrating pl

Re: [GENERAL] invalid input syntax for type bytea

2005-04-05 Thread Janning Vygen
Am Montag, 4. April 2005 17:36 schrieb Tom Lane: > Janning Vygen <[EMAIL PROTECTED]> writes: > > i have a databse in postgresql 7.4 with some pdf files in a bytea column. > > > > everything works fine but sometimes when i dump and restore i get > > > > psql:../tmp/dump.sql:704022: ERROR: invalid i