[GENERAL] owner of a database does not own "public" schema?

2010-06-28 Thread Thomas Kellerer
Hi, I was playing around with schemas and noticed that that the owner of a the database (specified with the CREATE DATABASE command) is not the owner of the database's public schema: (Connect as super user) c:\temp>psql postgres postgres Password for user postgres: psql (8.4.3) Type "help" fo

Re: [GENERAL] Prepared statement issue in Pgpool-II

2010-06-28 Thread Vibhor Kumar
On 28/06/10 11:14 PM, raghu ram wrote: Hi, We are using pgool-II version 2.3.2.2 (tomiteboshi)and postgres 8.3.9 and facing the below error while running the select queries in the application side:: ERROR: prepared statement "mdb2_statement_pgsql_71417ca02c1aa9cec1dd2570c46e992e" does

Re: [GENERAL] Need xml element constructor given tag, attribute array & children

2010-06-28 Thread Craig Ringer
On 29/06/10 09:49, J. Greg Davidson wrote: > Hi Everybody, > > I'm having trouble finding any way to build up > XML values from their logical components, e.g. > given an XML element tag, an array of attributes > in some form, and an xml[] array of children I > can't find any SQL function or expres

[GENERAL] Need xml element constructor given tag, attribute array & children

2010-06-28 Thread J. Greg Davidson
Hi Everybody, I'm having trouble finding any way to build up XML values from their logical components, e.g. given an XML element tag, an array of attributes in some form, and an xml[] array of children I can't find any SQL function or expression which would construct the XML element. Surely the s

Re: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-28 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> There actually were two smgr storage modules in the code we inherited >> from Berkeley, and I think there were probably more at one time. > Yes, the second storage manager we had was for WORM drives, or more > accurately, stubs were left in our code for

Re: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-28 Thread Bruce Momjian
Tom Lane wrote: > Dave Page writes: > > Hmm, I think I misread Thom's question. The smgr API used to be far > > more rigidly designed as I understand it, to allow the possibility of > > having different storage engines (for example, maybe one that used raw > > devices). I don't know that any other

Re: [GENERAL] XML - DOCTYPE element - documentation suggestion

2010-06-28 Thread Peter Eisentraut
On fre, 2010-06-18 at 02:43 +0800, Craig Ringer wrote: > The xml datatype documentation should probably mention that whole > documents must be loaded with an XMLPARSE(DOCUMENT 'doc_text_here), > they > cannot just be cast from text to xml as happens when you pass an xml > document as text to a para

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-28 Thread Bruce Momjian
Craig Ringer wrote: > On 24/06/10 12:42, Iwao Shikase wrote: > > > In my environment, Database cluster is in NFS server. > > So you are mounting an nfs file system shared by "localhost" ? > > Why not run PostgreSQL directly on the underlying file system, rather > than via nfs? > > > I guess tha

[GENERAL] Prepared statement issue in Pgpool-II

2010-06-28 Thread raghu ram
Hi, We are using pgool-II version 2.3.2.2 (tomiteboshi)and postgres 8.3.9 and facing the below error while running the select queries in the application side:: ERROR: prepared statement "mdb2_statement_pgsql_71417ca02c1aa9cec1dd2570c46e992e" does not exist STATEMENT: DEALLOCATE PREPARE md

Re: [GENERAL] weird initdb output

2010-06-28 Thread Scott Marlowe
On Mon, Jun 28, 2010 at 2:11 PM, Geoffrey Myers wrote: > I wrote a script that creates a new database from an existing backup. Works > great on my machine.  Another user tries to use it and sees the following > output from initdb: > > could not change directory to "/root" > The files belonging to

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

2010-06-28 Thread Bruce Momjian
A. Kretschmer wrote: > 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) And double-quotes preserve case: test=> select '

[GENERAL] PostgreSQL training

2010-06-28 Thread Ingmar Alting
Hello All, I want to take a training course about “PostgreSQL” and have been browsing trough http://www.postgresql.org/about/eventarchive , but I am not sure about the level of training offered as there are disclaimers everywhere. Is there anybody on the list having experience with training off

Re: [GENERAL] weird initdb output

2010-06-28 Thread Geoffrey
Tom Lane wrote: Geoffrey writes: I wrote a script that creates a new database from an existing backup. Works great on my machine. Another user tries to use it and sees the following output from initdb: could not change directory to "/root" The files belonging to this database system will b

Re: [GENERAL] postgres user password: Log on failure

2010-06-28 Thread Vibhor Kumar
On 28/06/10 8:58 PM, Igor Neyman wrote: Log on failure: Only an unprivileged user can start > the server"; Error 1063; Error 1069). > Error Message shows that services are getting started with Admin Privileges. Please use unprivileged user(i.e Non admin user) for starting the services.

Re: [GENERAL] PG dump and restore

2010-06-28 Thread Dennis C
That was it exactly as I just tested the entire process and it all worked fine again. For some reason, I inadvertently replaced the "-Fc" part with a "-c" somewhere along the way. Thanks again! On Fri, Jun 25, 2010 at 5:18 PM, Adrian Klaver wrote: > On Friday 25 June 2010 4:59:17 pm Dennis C w

Re: [GENERAL] postgres user password: Log on failure

2010-06-28 Thread Igor Neyman
> -Original Message- > From: dario@libero.it [mailto:dario@libero.it] > Sent: Monday, June 28, 2010 11:41 AM > To: pgsql-general@postgresql.org > Subject: postgres user password: Log on failure > > Hello, > > I'm on Windows XP with postgresql 8.4 installed by > postgresql-8.4

[GENERAL] weird initdb output

2010-06-28 Thread Geoffrey Myers
I wrote a script that creates a new database from an existing backup. Works great on my machine. Another user tries to use it and sees the following output from initdb: could not change directory to "/root" The files belonging to this database system will be owned by user "postgres". This us

[GENERAL] Vamos fazer esta operação

2010-06-28 Thread GEORGE KEVIN
Sr.George Kevin Islamic Development Bnak Ouagadougou, Burkina Faso ( www.isdb.org) Tel: +226 70 54 98 80   Caro amigo, Por favor, eu quero que você leia esta carta com muita atenção e peço desculpa por trazer esta mensagem em sua caixa de correio, sem qualquer introdução formal devido à urgê

Re: [GENERAL] weird initdb output

2010-06-28 Thread Tom Lane
Geoffrey writes: > I wrote a script that creates a new database from an existing backup. > Works great on my machine. Another user tries to use it and sees the > following output from initdb: > could not change directory to "/root" > The files belonging to this database system will be owned by

Re: [GENERAL] weird initdb output

2010-06-28 Thread John R Pierce
On 06/28/10 11:41 AM, Geoffrey wrote: I wrote a script that creates a new database from an existing backup. Works great on my machine. Another user tries to use it and sees the following output from initdb: could not change directory to "/root" The files belonging to this database system will

[GENERAL] weird initdb output

2010-06-28 Thread Geoffrey
I wrote a script that creates a new database from an existing backup. Works great on my machine. Another user tries to use it and sees the following output from initdb: could not change directory to "/root" The files belonging to this database system will be owned by user "postgres". This us

Re: [GENERAL] Is full-row updates slower than single-value updates

2010-06-28 Thread Tom Lane
Pavel Stehule writes: > 2010/6/28 Björn Lindqvist : >> My question is like the subject, is it much slower to update all >> columns values than just a single column? Generated update queries >> from ORM:s generally have the following format: >> >> update foo set a = 1, b = 2, c = 3, where id

Re: [GENERAL] Is full-row updates slower than single-value updates

2010-06-28 Thread Pavel Stehule
Hello 2010/6/28 Björn Lindqvist : > Hello everyone, > > My question is like the subject, is it much slower to update all > columns values than just a single column? Generated update queries > from ORM:s generally have the following format: > > update foo set a = 1, b = 2, c = 3, where id = 12

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

2010-06-28 Thread Konstantin Izmailov
I have figured it out and everything works wonderfully!!! Here is test code that allows preparing a query with cursor using libpq library: PGconn* conn = PQconnectdb("host=localhost dbname=postgres user=postgres password=12345 port=5432"); PGresult* res = ::PQexec(conn, "START TRANSACTION", 0, 0

Re: [GENERAL] EDB editions

2010-06-28 Thread Steve Crawford
On 06/26/2010 01:32 AM, RP Khare wrote: Hi, What is the difference between PGSQL provided by www.postgresql.org and www.enterprisedb.com? EnterpriseDB offers three variants: 1. Simple PostgreSQL 2. Standard Server, and 3. Advanced Server I want to migrate my production MySQL datab

[GENERAL] Is full-row updates slower than single-value updates

2010-06-28 Thread Björn Lindqvist
Hello everyone, My question is like the subject, is it much slower to update all columns values than just a single column? Generated update queries from ORM:s generally have the following format: update foo set a = 1, b = 2, c = 3, where id = 1234; So each column is touched which, I suspect

Re: [GENERAL] How to log query parameters instead of variables with log_min_duration_statement

2010-06-28 Thread Tom Lane
Max Williams writes: > I'm running 8.4.4 so you are saying this should work? Works for me, just as described here: http://archives.postgresql.org/pgsql-committers/2006-09/msg00152.php regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

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

2010-06-28 Thread Konstantin Izmailov
Looks like other people were asking similar question, but there is no answer: http://forums.devshed.com/postgresql-help-21/combine-prepare-and-declare-cursor-437562.html On Mon, Jun 28, 2010 at 1:00 AM, Konstantin Izmailov wrote: > lol > > Seriosly, this customer issues resulted in improvement of

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Mathieu De Zutter
On 28/06/10 17:22, Neubert Joachim wrote: I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". I have the following: CREATE OR REPLACE FUNCTION unaccent(TEXT) RETURNS TEXT AS $$ use Text::Unaccent; return unac_string('UTF8', $_[0]); $$ LANGU

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Thom Brown
On 28 June 2010 16:33, Thom Brown wrote: > On 28 June 2010 16:22, Neubert Joachim wrote: >> I want to convert accented characters to the according base character, e.g. >> "Ü" or "Ú" to "U". >> >> >> >> Is there a way to do this with pgsql functions? >> >> >> >> >> >>   postgres=# select convert('

[GENERAL] postgres user password: Log on failure

2010-06-28 Thread dario....@libero.it
Hello, I'm on Windows XP with postgresql 8.4 installed by postgresql-8.4.4-1-windows. exe with essentially default settings (only the path to the data dir was changed from default). I realized that sometimes (not always!) the server cannot start when I reboot my machine (I get error messages on

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread John R Pierce
On 06/28/10 8:22 AM, Neubert Joachim wrote: I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". Is there a way to do this with pgsql functions? translate(somestring, 'ÙÚÛÜŨŪŬŮŰŲùúûüũūŭůűų', 'UUuu') of course, expand those with a

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Thom Brown
On 28 June 2010 16:22, Neubert Joachim wrote: > I want to convert accented characters to the according base character, e.g. > "Ü" or "Ú" to "U". > > > > Is there a way to do this with pgsql functions? > > > > > >   postgres=# select convert('Ü', 'UTF8', 'SQL_ASCII'); > >    convert > >   -

Re: [GENERAL] How to log query parameters instead of variables with log_min_duration_statement

2010-06-28 Thread Max Williams
I'm running 8.4.4 so you are saying this should work? I don't really want to go to debug level logging, tried it for 5 mins and it just logs too much! Max -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: 28 June 2010 15:28 To: Max Williams Cc: pgsql-general@postgresql

[GENERAL] convert accented character to base character

2010-06-28 Thread Neubert Joachim
I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". Is there a way to do this with pgsql functions? postgres=# select convert('Ü', 'UTF8', 'SQL_ASCII'); convert -- \303\234 did not work as I had hoped. Any help wou

Re: [GENERAL] How to log query parameters instead of variables with log_min_duration_statement

2010-06-28 Thread Tom Lane
Max Williams writes: > I am logging long queries with log_min_duration_statement but would like to > see the parameters for parameterized queries. Eg... You need a more recent version of Postgres. The versions that can do that at all (8.2 and up) will do it automatically.

Re: [GENERAL] Looking for a PostGre SQL Trainer, Bangalore

2010-06-28 Thread Thomas Kellerer
Ravi Kariparmbil - Epistiuum Solutios, 28.06.2010 14:40: Hello, I am looking for a PostGre SQL trainer who can do a training program for a client of mine in Bangalore. I think this if off-topic here And you should learn how to write the name correctly :) Writing PostGre is like writing MerCe

[GENERAL] Looking for a PostGre SQL Trainer, Bangalore

2010-06-28 Thread Ravi Kariparmbil - Epistiuum Solutios
Hello, I am looking for a PostGre SQL trainer who can do a training program for a client of mine in Bangalore. If interested please send me a mail. Regards, Ravi 9686554646 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] Enabling all backup options

2010-06-28 Thread Magnus Hagander
On Mon, Jun 28, 2010 at 13:43, RP Khare wrote: > I installed EnterpriseDB PostgreSQL Plus Standard Server R2 and I want to > enable each and every feature related to recovery. I want to enable WAL and > other features so that at the time of disaster, my database recovery is > guaranteed. If you'r

[GENERAL] Enabling all backup options

2010-06-28 Thread RP Khare
I installed EnterpriseDB PostgreSQL Plus Standard Server R2 and I want to enable each and every feature related to recovery. I want to enable WAL and other features so that at the time of disaster, my database recovery is guaranteed. How to proceed? Regards, Rohit Prakash.

Re: [GENERAL] How to log query parameters instead of variables with log_min_duration_statement

2010-06-28 Thread zhong ming wu
On Mon, Jun 28, 2010 at 5:29 AM, Max Williams wrote: > Hi, > > I am logging long queries with log_min_duration_statement but would like to > see the parameters for parameterized queries. Eg… > Consider increasing log level. I think you need to go to "debug" at least. -- Sent via pgsql-general

[GENERAL] How to log query parameters instead of variables with log_min_duration_statement

2010-06-28 Thread Max Williams
Hi, I am logging long queries with log_min_duration_statement but would like to see the parameters for parameterized queries. Eg... Jun 28 10:21:49 dbs1 postgres[20866]: [2-1] LOG: duration: 6625.543 ms execute PRSTMT1405204512-1371060978/PORTAL1405204512-1371060978: SELECT COUNT(*) Jun 28 10:

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

2010-06-28 Thread Konstantin Izmailov
lol Seriosly, this customer issues resulted in improvement of the way our driver prepares statements. Keeping the map of prepared statements names is actually faster than using Savepoints (less roundtrips to server). I found that DECLARE ... CURSOR FOR ... cannot be prepared. Basically I'm lookin