Re: [GENERAL] calling vacuum from a script

2010-06-23 Thread Greg Smith
Devrim GÜNDÜZ wrote: (Why are you using VACUUM FULL? It has been considered harmful, at least for a regular maintenance job.) We should point everyone using VACUUM FULL like Janet to read http://wiki.postgresql.org/wiki/VACUUM_FULL -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL

[GENERAL] How can I know whether an index already exists

2010-06-23 Thread kaifeng.zhu
Hi there, How can I know whether an index already exists? I have googled for hours and cannot found the solution... Any response are appreciated. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] How can I know whether an index already exists

2010-06-23 Thread Sergey Konoplev
On 23 June 2010 10:16, kaifeng.zhu cafe...@gmail.com wrote: Hi there, How can I know whether an index already exists? SELECT * FROM pg_indexes WHERE indexname ~ 'your_indexname'; -- Sergey Konoplev Blog: http://gray-hemp.blogspot.com / Linkedin: http://ru.linkedin.com/in/grayhemp /

Re: [GENERAL] How can I know whether an index already exists

2010-06-23 Thread John R Pierce
On 06/22/10 11:16 PM, kaifeng.zhu wrote: Hi there, How can I know whether an index already exists? I have googled for hours and cannot found the solution... query this table, http://www.postgresql.org/docs/current/static/catalog-pg-class.html possibly joined with...

[GENERAL] disable password prompt - command line

2010-06-23 Thread Ravi Katkar
Hi List, I need a small help regarding the password options available with PGSQL, I found POSTGRE SQL has -W and -password options available which is prompting for the password. But I want to take the password thru command line argument and keep the password in a variable. Is there any

Re: [GENERAL] disable password prompt - command line

2010-06-23 Thread Vibhor Kumar
On 23/06/10 7:56 AM, Ravi Katkar wrote: Hi List, I need a small help regarding the password options available with PGSQL, I found POSTGRE SQL has *–W* and *–password* options available which is prompting for the password. But I want to take the password thru command line argument and keep

Re: [GENERAL] how to create an admin user for restore database.

2010-06-23 Thread Guillaume Lelarge
Le 23/06/2010 05:17, Sam Wun a écrit : With user liferayadmin on db liferay, I got the following errors: 03:14:50,558 WARN [DBUtil:474] ERROR: permission denied for relation quartz_locks: insert into QUARTZ_LOCKS values('TRIGGER_ACCESS'); 03:14:50,567 WARN [DBUtil:474] ERROR: permission

Re: [GENERAL] High Availability with Postgres

2010-06-23 Thread Dimitri Fontaine
John R Pierce pie...@hogranch.com writes: yeah. generally when money is involved in the transactions, you gotta stick to the 'no committed data lost ever'. there's plenty of other use cases for that too. Well, it's a cost/benefit/risk evaluation you have to make. It'd be bad news that the

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Tom Wilcox
Hi, I have not used python2.3 on this machine at all (to my knowledge). It is a fresh install of the latest Ubuntu 64 which comes with Python 2.6 and 3.1. The build I want to run is the 64-bit PostgreSQL download for Linux x86-64 from Entreprise DB

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Dave Page
On Wed, Jun 23, 2010 at 9:52 AM, Tom Wilcox hungry...@gmail.com wrote: Hi, I have not used python2.3 on this machine at all (to my knowledge). It is a fresh install of the latest Ubuntu 64 which comes with Python 2.6 and 3.1. The build I want to run is the 64-bit PostgreSQL download for

[GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Alexander Farber
Hello, why aren't double quotes accepted below? db1=# alter user user1 password pass1; ERROR: syntax error at or near pass1 LINE 1: alter user user1 password pass1; ^ db1=# alter user user1 password 'pass1'; ALTER ROLE Is there a thumb rule to know when to use

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Guillaume Lelarge
Le 23/06/2010 11:03, Alexander Farber a écrit : Hello, why aren't double quotes accepted below? db1=# alter user user1 password pass1; ERROR: syntax error at or near pass1 LINE 1: alter user user1 password pass1; ^ db1=# alter user user1 password

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Pavel Stehule
Hello ANSI SQL uses double quotes only for SQL identifiers. For literals are used single quotes. like SELECT col AS some strange sql column identifier, 'some string value' FROM some strange sql table identifier so for case sensitive or strange (is keyword, contains space) sql identifiers use

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread A. Kretschmer
In response to Alexander Farber : Hello, why aren't double quotes accepted below? db1=# alter user user1 password pass1; ERROR: syntax error at or near pass1 LINE 1: alter user user1 password pass1; ^ db1=# alter user user1 password 'pass1'; ALTER ROLE

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Tom Wilcox
Hi, If I use the apt-get facility on Ubuntu is that supposed to get the appropriate postgres version for my OS setup (i.e. 64-bit and Python 2.6) ? Because I think I have done that already and it didn't solve my problem, but I will try again now (first uninstalling the current pg version).

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Dave Page
On Wed, Jun 23, 2010 at 10:19 AM, Tom Wilcox hungry...@gmail.com wrote: Hi, If I use the apt-get facility on Ubuntu is that supposed to get the appropriate postgres version for my OS setup (i.e. 64-bit and Python 2.6) ? I would assume so. I'm more of a Redhat guy though. -- Dave Page

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Magnus Hagander
On Wed, Jun 23, 2010 at 11:20, Dave Page dp...@pgadmin.org wrote: On Wed, Jun 23, 2010 at 10:19 AM, Tom Wilcox hungry...@gmail.com wrote: Hi, If I use the apt-get facility on Ubuntu is that supposed to get the appropriate postgres version for my OS setup (i.e. 64-bit and Python 2.6) ? I

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Alexander Farber
And identifiers means column names (eventually containing whitespace)? Thank you Alex -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread A. Kretschmer
In response to Alexander Farber : And identifiers means column names (eventually containing whitespace)? Right. test=# select 'foo' as my new column; my new column --- foo (1 row) Regards, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -

Re: [GENERAL] Single quotes vs. double quotes when setting a pwd and other cmds

2010-06-23 Thread Thom Brown
On 23 June 2010 10:41, Alexander Farber alexander.far...@gmail.com wrote: And identifiers means column names (eventually containing whitespace)? Columns, tables, schemas, views, triggers, indexes etc. See: http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Tom Wilcox
OK! I have successfully got plpythonu installed. The solution was to remove any and all postgresql installation and files except /data. I then ran this from command line: sudo apt-get install postgresql-plpython-8.4 which installed plpython AND postgresql at the same time. Happy days. Next

Re: [GENERAL] libpython - cannot open shared object file

2010-06-23 Thread Dimitri Fontaine
Tom Wilcox hungry...@gmail.com writes: Next problem: $libdir/fuzzystrmatch: No such file or directory. I guess I need to install the /share stuff separately.. Looks like apt-get install postgresql-contrib-8.4 should do the trick.

[GENERAL] what is the meaning of Datum?

2010-06-23 Thread Luca Ferrari
Hi all, ok this is a silly question, but I've got a doubt: what is the exact meaning of Datum? I see having a look at the macroes (e.g., PG_RETURN_XXX) that a Datum can be used as a pointer or as a single data, that is it can be a reference or a value. Is this right? So for instance the fact

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Russell Smith
On 23/06/10 02:16, Joshua D. Drake wrote: On Tue, 2010-06-22 at 13:51 +, Greg Sabino Mullane wrote: Is there any technical obstacle to anyone creating PL/PHP? I am cruious as to why it doesn't alreay exist. Obviously we need to improve our documentation. What led you to

Re: [GENERAL] best way to check pgdump

2010-06-23 Thread Raymond O'Donnell
On 23/06/2010 04:52, Janet Jacobsen wrote: Hi. What is the best way to check a pgdump without doing a restore? If you used one of the binary formats for pg_dump, you can have pg_restore list the contents without actually restoring the database. If you did a text dump, just look into the file.

Re: [GENERAL] how to create an admin user for restore database.

2010-06-23 Thread Raymond O'Donnell
On 23/06/2010 02:50, Sam Wun wrote: When I launched pgadmin in windows and login as user liferayadmin, from the tools menu, the restore command is disabled. I think the user liferayadmin does not have the privilege to restore database. Something else worth checking is whether pgAdmin has

Re: [GENERAL] how to create an admin user for restore database.

2010-06-23 Thread Raymond O'Donnell
On 23/06/2010 12:21, Raymond O'Donnell wrote: On 23/06/2010 02:50, Sam Wun wrote: When I launched pgadmin in windows and login as user liferayadmin, from the tools menu, the restore command is disabled. I think the user liferayadmin does not have the privilege to restore database.

[GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
consider following example: CREATE TABLE foob(id serial primary key, name varchar default ''); CREATE TABLE fooA(id serial primary key, fooB int not null references fooB(id) on update cascade on delete cascade, name varchar default ''); CREATE FUNCTION foobarrA() RETURNS trigger AS $_$ BEGIN

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: consider following example: CREATE TABLE foob(id serial primary key, name varchar default ''); CREATE TABLE fooA(id serial primary key, fooB int not null references fooB(id) on update cascade on delete cascade, name varchar default '');

[GENERAL] missing uuid functions in postgresql-contrib RPM for linux?

2010-06-23 Thread Andrew Geery
In the postgresql-contrib-8.4.4-1PGDG.rhel4 RPM (downloaded from http://www.postgresql.org/ftp/binary/v8.4.4/linux/rpms/redhat/rhel-4-i386/), there is no installation script or libraries for the uuid_* functions: # rpm -qlp postgresql-contrib-8.4.4-1PGDG.rhel4.i386.rpm | grep -i uid

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
this is 8.3.7, for the record. And no, They won't let me update it to 8.3.11 :/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: this is 8.3.7, for the record. And no, They won't let me update it to 8.3.11 :/ Well, same applies: http://www.postgresql.org/docs/8.3/static/sql-createtrigger.html I've just run the same set of statements you specified against 8.4.1, 8.4.4

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
any ideas than, how can make it actually do what I wanted it to do please ? Making FK deferrable doesn't help. thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
nope, that's not the thing. This is just specific to my example. But production code I have, doesn't have such confusing name, and still fails. Plus postgresql doesn't rely on names, but on oids rather. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: any ideas than, how can make it actually do what I wanted it to do please ? Making FK deferrable doesn't help. thanks. Is it practical to put the trigger on the other table instead? Thom -- Sent via pgsql-general mailing list

Re: [GENERAL] how to create an admin user for restore database.

2010-06-23 Thread Adrian Klaver
On Wednesday 23 June 2010 12:45:14 am Guillaume Lelarge wrote: Le 23/06/2010 05:17, Sam Wun a écrit : With user liferayadmin on db liferay, I got the following errors: 03:14:50,558 WARN [DBUtil:474] ERROR: permission denied for relation quartz_locks: insert into QUARTZ_LOCKS

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
not really, as it depends on pretty much both tables. This is where de-normalization would actually makes sens, except for that it wouldn't - because it will badly effect all my other queries (joining on varchar is so slow). I could drop FK, and replace that with my own trigger(s), but that's a

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Adrian Klaver
On Wednesday 23 June 2010 5:35:52 am Grzegorz Jaśkiewicz wrote: consider following example: CREATE TABLE foob(id serial primary key, name varchar default ''); CREATE TABLE fooA(id serial primary key, fooB int not null references fooB(id) on update cascade on delete cascade, name varchar

Re: [GENERAL] missing uuid functions in postgresql-contrib RPM for linux?

2010-06-23 Thread Devrim GÜNDÜZ
On Wed, 2010-06-23 at 09:29 -0400, Andrew Geery wrote: In the postgresql-contrib-8.4.4-1PGDG.rhel4 RPM (downloaded from http://www.postgresql.org/ftp/binary/v8.4.4/linux/rpms/redhat/rhel-4-i386/), there is no installation script or libraries for the uuid_* functions: # rpm -qlp

Re: [GENERAL] best way to check pgdump

2010-06-23 Thread Adrian Klaver
On Wednesday 23 June 2010 4:12:40 am Raymond O'Donnell wrote: On 23/06/2010 04:52, Janet Jacobsen wrote: Hi. What is the best way to check a pgdump without doing a restore? If you used one of the binary formats for pg_dump, you can have pg_restore list the contents without actually

Re: [GENERAL] missing uuid functions in postgresql-contrib RPM for linux?

2010-06-23 Thread Ashesh Vashi
Hi Andrew, You can download one-click installer from http://www.enterprisedb.com/products/pgdownload.do. That does have support for uuid on RHEL4 too. -- Thanks Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise Postgres Companyhttp://www.enterprisedb.com On Wed, Jun 23, 2010 at 6:59 PM,

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Adrian Klaver
On Wednesday 23 June 2010 7:02:59 am Grzegorz Jaśkiewicz wrote: nope, that's not the thing. This is just specific to my example. But production code I have, doesn't have such confusing name, and still fails. Plus postgresql doesn't rely on names, but on oids rather. For what it worth I tried

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Tom Lane
Luca Ferrari fluca1...@infinito.it writes: ok this is a silly question, but I've got a doubt: what is the exact meaning of Datum? It's the backend-internal representation of a single value of any SQL data type. The code using the Datum has to know which type it is, since the Datum itself

Re: [GENERAL] missing uuid functions in postgresql-contrib RPM for linux?

2010-06-23 Thread Andrew Geery
FWIW, I don't see the install script in the RHEL5 version RPM either: # rpm -qpl postgresql-contrib-8.4.4-1PGDG.rhel5.i386.rpm | grep -i uid /usr/share/doc/postgresql-contrib-8.4.4/uninstall_uuid-ossp.sql Thanks Andrew 2010/6/23 Devrim GÜNDÜZ dev...@gunduz.org: On Wed, 2010-06-23 at 09:29

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
well, change foob column name to something else, and try yourself. It still fails. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Adrian Klaver
On Wednesday 23 June 2010 7:57:22 am Grzegorz Jaśkiewicz wrote: well, change foob column name to something else, and try yourself. It still fails. As I said in my previous post it did not fail on my instance of 8.3.7. In other words the DELETE succeeded. At this point I do not have an

Re: [GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-23 Thread Deven
Hi Joao, Thanks for reply.Let I will tell you the details that you want :- We are using postgresql 8.4 version. And I come to know that on certain table Autovacuuming is not getting started from the pg_stat_user_tables table containts.I will also send the autovacuum_* directives from

Re: [GENERAL] Facing Problem in Autovacuuming Deamon....

2010-06-23 Thread Deven
Thank you for your reply Let I will provide you some of the information on your queries... We are using Postgresql 8.4 version... and I will attach my configuration file for Autovacuuming for your reference. Also I will attach my pg_stat_user_tables data on vacuuming and autovacuuming from

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
the delete will succeed. That's not the point of the exercise tho. The point, is to print name in trigger, rather than null! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Teodor Macicas
Tom Lane wrote: Luca Ferrari fluca1...@infinito.it writes: ok this is a silly question, but I've got a doubt: what is the exact meaning of Datum? It's the backend-internal representation of a single value of any SQL data type. The code using the Datum has to know which type it is,

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: well, change foob column name to something else, and try yourself. It still fails. Wait a minute... it's deleting from foob, which is considered deleted for the remainder of that transaction. This cascades to fooa which sets off the trigger

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
it is confusing to me, because I thought triggers are firring BEFORE anything goes away. So I assume that all data is still going to be visible to the trigger, as it is firing BEFORE. The only thing is, it looks like the FKs are doing the deletion and than things are handed over to triggers. --

Re: [GENERAL] High Availability with Postgres

2010-06-23 Thread Craig Ringer
On 23/06/10 03:05, John R Pierce wrote: yeah. generally when money is involved in the transactions, you gotta stick to the 'no committed data lost ever'. there's plenty of other use cases for that too. 2PC is sometimes a reasonable alternative to shared-storage failover, though. It can be a

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: the delete will succeed. That's not the point of the exercise tho. The point, is to print name in trigger, rather than null! But if it's been deleted from foob already, how can it print it? So if foob has a row with an id of 5, then: DELETE

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: it is confusing to me, because I thought triggers are firring BEFORE anything goes away. So I assume that all data is still going to be visible to the trigger, as it is firing BEFORE. The only thing is, it looks like the FKs are doing the

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Grzegorz Jaśkiewicz
I do understand what you are saying, but still it is highly unintuitive. Since trigger is BEFORE, developer will expect that data to be there. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Thom Brown
2010/6/23 Grzegorz Jaśkiewicz gryz...@gmail.com: I do understand what you are saying, but still it is highly unintuitive. Since trigger is BEFORE, developer will expect that data to be there. Yes, I'm still not exactly sure why it's seeing uncommitted changes. :/ Thom -- Sent via

Re: [GENERAL] missing uuid functions in postgresql-contrib RPM for linux?

2010-06-23 Thread Devrim GUNDUZ
23.Haz.2010 tarihinde 17:53 saatinde, Andrew Geery andrew.ge...@gmail.com şunları yazdı: FWIW, I don't see the install script in the RHEL5 version RPM either: # rpm -qpl postgresql-contrib-8.4.4-1PGDG.rhel5.i386.rpm | grep -i uid

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Alvaro Herrera
Excerpts from Luca Ferrari's message of mié jun 23 06:09:28 -0400 2010: Hi all, ok this is a silly question, but I've got a doubt: what is the exact meaning of Datum? I see having a look at the macroes (e.g., PG_RETURN_XXX) that a Datum can be used as a pointer or as a single data, that is

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Joshua D. Drake
On Wed, 2010-06-23 at 12:15 -0400, Alvaro Herrera wrote: Moreover, is there a documentation (aside the source code) that explains and links each internal data structure like HeapTuple, HeapTupleHeader, and so on? The source code comments should be plenty. Have you tried reading

Re: [GENERAL] what happens to postmaster?

2010-06-23 Thread zach cruise
using navicat 8's import wizard which does row inserts (provider=msdaora.1; persist security info=true). more http://www.navicat.com/manual/online_manual/win_manual/ImportODBC.html i know this is not navicat support, but can anyone from navicat support also try answer this question? On Tue, Jun

Re: [GENERAL] what happens to postmaster?

2010-06-23 Thread Scott Marlowe
On Wed, Jun 23, 2010 at 12:42 PM, zach cruise zachc1...@gmail.com wrote: using navicat 8's import wizard which does row inserts (provider=msdaora.1; persist security info=true). more http://www.navicat.com/manual/online_manual/win_manual/ImportODBC.html i know this is not navicat support, but

Re: [GENERAL] what is the meaning of Datum?

2010-06-23 Thread Tom Lane
Teodor Macicas teodor.maci...@epfl.ch writes: Tom Lane wrote: C code will work with a value in a native representation, and then convert to or from Datum in order to pass the value through data-type-independent interfaces. And how this convertions will be made ? Are there internal functions

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Tom Lane
Thom Brown thombr...@gmail.com writes: Yes, I'm still not exactly sure why it's seeing uncommitted changes. :/ Because it's all one transaction. A transaction that couldn't see its own changes wouldn't be very useful. I think what the OP is unhappy about is that he imagines that the ON CASCADE

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-23 Thread Adrian Klaver
On 06/23/2010 08:22 AM, Grzegorz Jaśkiewicz wrote: the delete will succeed. That's not the point of the exercise tho. The point, is to print name in trigger, rather than null! Sorry about the noise, I completely missed what you where getting at. -- Adrian Klaver adrian.kla...@gmail.com --

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Alvaro Herrera
Excerpts from Devrim GUNDUZ's message of lun jun 21 23:55:41 -0400 2010: IIRC, it does not compile against newer PostgreSQL releases and it is not under development right now. It compiles with 9.0 just fine (and earlier releases too, though I didn't bother to test anything earlier than 8.2).

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Scott Marlowe
On Wed, Jun 23, 2010 at 3:31 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Devrim GUNDUZ's message of lun jun 21 23:55:41 -0400 2010: IIRC, it does not compile against newer PostgreSQL releases and it is not under development right now. It compiles with 9.0 just fine

[GENERAL] copy/duplicate database schemas

2010-06-23 Thread Jamie Kahgee
I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages, is there an easy way to copy an entire schema to a new one (tables, contents, trigges, functions, etc..)? right now i just have - schema what I want is - schema

Re: [GENERAL] Problem Using RowType Declaration with Table Domains

2010-06-23 Thread Merlin Moncure
On Tue, Jun 22, 2010 at 12:26 AM, Tom Lane t...@sss.pgh.pa.us wrote: George Weaver gwea...@shaw.ca writes: I have the following (very simplified) scenario: CREATE DOMAIN orderstatus AS text NOT NULL DEFAULT 'Open'; CREATE TABLE orders ( orderno serial                                        

[GENERAL] UPDATE after Cancle

2010-06-23 Thread David Kerr
Howdy all - I just got this odd behavior in my system. This is PG 8.3.10 on RedHat 5.4 psql bla bla=# update blatab set blafield = replace(blafield,'XXX-1','XXX1-') where created_by = 'blauser'; runs for a while dave hit's ctl-c becuase i messed up the substitution value Cancel request

Re: [GENERAL] UPDATE after Cancle

2010-06-23 Thread Joshua D. Drake
On Wed, 2010-06-23 at 13:05 -0700, David Kerr wrote: Howdy all - I just got this odd behavior in my system. This is PG 8.3.10 on RedHat 5.4 psql bla bla=# update blatab set blafield = replace(blafield,'XXX-1','XXX1-') where created_by = 'blauser'; runs for a while dave hit's

Re: [GENERAL] copy/duplicate database schemas

2010-06-23 Thread Merlin Moncure
On Wed, Jun 23, 2010 at 3:21 PM, Jamie Kahgee jamie.kah...@gmail.com wrote: I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages,  is there an easy way to copy an entire schema to a new one (tables, contents, trigges,

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread John DeSoi
On Jun 22, 2010, at 1:08 AM, Scott Marlowe wrote: I recall talking to the guys at command prompt and apparently something in the php runtime makes it unsuitable for pl deployment. Any chance that the Parrot runtime could be used for PHP and other languages? I read that some folks are

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Joshua D. Drake
On Wed, 2010-06-23 at 17:17 -0400, John DeSoi wrote: On Jun 22, 2010, at 1:08 AM, Scott Marlowe wrote: I recall talking to the guys at command prompt and apparently something in the php runtime makes it unsuitable for pl deployment. Any chance that the Parrot runtime could be used for

[GENERAL] flatten pg_auth_members

2010-06-23 Thread A.M.
Hello, I am trying to make a query which will flatten pg_auth_members into a table with two columns user and group which will recurse inherited roles so that each login role is associated once with any inherited roles (assuming all associated roles are inherited). This query does not do what

Re: [GENERAL] SQL error: could not connect to database

2010-06-23 Thread Kenichiro Tanaka
Hi. At first,I think you lack some settings. (eg. pg_hba.conf,listen_addresses or restarting) But you say I can log in to postgresql without password prompt using the psql tool. I can image some case,but we have to get some more information. So I'd like you to try the following program.This

[GENERAL] PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)

2010-06-23 Thread Konstantin Izmailov
Is there a way to prevent transaction abort when preparing command in version 7.4? I googled but haven't been able to find the answer. The issue occurs when our software trys to prepare a command that is already prepared (by the same or different app). PQprepare returns error and aborts current

[GENERAL] Fwd: Stalled post to pgsql-es-ayuda

2010-06-23 Thread Sebastian Machuca
Hello everyone. I have a problem First, some basic data: OS: Red Hat Version 8.3 Size 15 GB The directory which contain the PGDATA/data is full, and i move the entire directory data to another partition, and i link symbolic to PGDATA. Now, when i try to start the server, keep on startup

Re: [GENERAL] PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)

2010-06-23 Thread Scott Marlowe
On Wed, Jun 23, 2010 at 10:55 PM, Konstantin Izmailov pgf...@gmail.com wrote: Is there a way to prevent transaction abort when preparing command in version 7.4? I googled but haven't been able to find the answer. The issue occurs when our software trys to prepare a command that is already

Re: [GENERAL] copy/duplicate database schemas

2010-06-23 Thread Craig Ringer
On 24/06/10 03:21, Jamie Kahgee wrote: I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages, is there an easy way to copy an entire schema to a new one (tables, contents, trigges, functions, etc..)? Others have replied with

Re: [GENERAL] PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)

2010-06-23 Thread Konstantin Izmailov
Scott, thank you for the quick answer! I think it would work if our software tracks which statements have already been prepared on the connection. On Wed, Jun 23, 2010 at 8:25 PM, Scott Marlowe scott.marl...@gmail.comwrote: On Wed, Jun 23, 2010 at 10:55 PM, Konstantin Izmailov

Re: [GENERAL] Fwd: Stalled post to pgsql-es-ayuda

2010-06-23 Thread Tom Lane
Sebastian Machuca serr...@gmail.com writes: The directory which contain the PGDATA/data is full, and i move the entire directory data to another partition, and i link symbolic to PGDATA. Now, when i try to start the server, keep on startup process recovering When i try to connect, this

Re: [GENERAL] PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)

2010-06-23 Thread Scott Marlowe
On Thu, Jun 24, 2010 at 12:28 AM, Konstantin Izmailov pgf...@gmail.com wrote: Scott, thank you for the quick answer! I think it would work if our software tracks which statements have already been prepared on the connection. Good chance of it, but honestly, running such an old and now

Re: [GENERAL] PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)

2010-06-23 Thread Tom Lane
Scott Marlowe scott.marl...@gmail.com writes: On Wed, Jun 23, 2010 at 10:55 PM, Konstantin Izmailov pgf...@gmail.com wrote: The company is not willing to upgrade from 7.4 to a later version due to risk. The risk of upgrading is less than the risk of staying on an unsupported version of

[GENERAL] The case of PostgreSQL on NFS Server

2010-06-23 Thread Iwao Shikase
Hi This is shikase. I have a question about PostgreSQL on NFS Server as follows. Please let me know advice about that. If I posted the wrong mailing-list, please let me know. I found the manual 17.2.1 Network File System. 17.2.1 Network File System If client and server NFS implementations

[GENERAL] Global temporary table - schema

2010-06-23 Thread Ravi Katkar
Hi List, When I have created Global temporary table its created under/in PG_temp_1 schema by default, When tried to specify the schema name explicitly its throwing below error ERROR: temporary tables cannot specify a schema name I wanted to create a Global temporary table in public or the

Re: [GENERAL] Global temporary table - schema

2010-06-23 Thread Pavel Stehule
2010/6/24 Ravi Katkar ravi.kat...@infor.com: Hi List, When I have created Global temporary table its created under/in PG_temp_1 schema by default, When tried to specify the schema name explicitly its throwing below error ERROR:  temporary tables cannot specify a schema name I