Re: [GENERAL] character conversion problem about UTF-8-->SHIFT_JIS_2004

2008-02-07 Thread Hiroshi Saito
Ooops, shortage of information..sorry. Please see, http://winpg.jp/~saito/pg83/HASHIGODATA/ Hi. - Original Message - From: "bh yuan" <[EMAIL PROTECTED]> hi I used Postgresql7.4.3 with php for more than 3years. Now I want to change my database to Postgresql8.3. But I occur such prob

Re: [GENERAL] character conversion problem about UTF-8-->SHIFT_JIS_2004

2008-02-07 Thread Hiroshi Saito
Hi. - Original Message - From: "bh yuan" <[EMAIL PROTECTED]> hi I used Postgresql7.4.3 with php for more than 3years. Now I want to change my database to Postgresql8.3. But I occur such problem -- ERROR: character 0xe9ab99 of en

[GENERAL] character conversion problem about UTF-8-->SHIFT_JIS_2004

2008-02-07 Thread bh yuan
hi I used Postgresql7.4.3 with php for more than 3years. Now I want to change my database to Postgresql8.3. But I occur such problem -- ERROR: character 0xe9ab99 of encoding "UTF8" has no equivalent in "SJIS" ERROR: character 0xe9ab99 of enco

Re: [GENERAL] How can exe files such as 'pg_dump' be called from stored functions?

2008-02-07 Thread Satoru Fukushima
Steve, you're right! After permission was changed, the function works! Thanks Tom, too! When I wrote my entry, although I had tried to debug by outputting errors using '<', I used it to the same directory as the output file, which prevented any message from appearing because of the same permission

Re: [GENERAL] How can exe files such as 'pg_dump' be called from stored functions?

2008-02-07 Thread Steve Crawford
Tom Lane wrote: "Satoru Fukushima" <[EMAIL PROTECTED]> writes: can execute 'pg_dump', which produces an output file. However, when I made it as a stored function in C, it didn't work. Within the stored function, I used the exact same 'system' command. The other parts within the function such

Re: [GENERAL] How can exe files such as 'pg_dump' be called from stored functions?

2008-02-07 Thread Tom Lane
"Satoru Fukushima" <[EMAIL PROTECTED]> writes: > can execute 'pg_dump', which produces an output file. However, when I > made it as a stored function in C, it didn't work. Within the stored > function, I used the exact same 'system' command. The other parts > within the function such as getting inp

Re: [GENERAL] Test text value as interval

2008-02-07 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > Yes, this looks like it might work, thanks! But not sure which condition > to look for or if I'm doing this correctly. I tried syntax_error > condition, but I'm still receiving the same cast error trying this in a > trigger function... SYNTAX_ERROR

Re: [GENERAL] Test text value as interval

2008-02-07 Thread Robert Fitzpatrick
On Thu, 2008-02-07 at 16:58 -0800, Jeff Davis wrote: > On Thu, 2008-02-07 at 19:37 -0500, Robert Fitzpatrick wrote: > > Been searching for a way to do this, but haven't found what I was hoping > > to find. Is there any way in pl/pgsql to test a text value to see if it > > would be a valid interval

[GENERAL] How can exe files such as 'pg_dump' be called from stored functions?

2008-02-07 Thread Satoru Fukushima
Hello, Thanks for your attention. I would like to ask a question about how exe files such as 'pg_dump' can be called from stored functions. For example, a simple C code like below i

Re: [GENERAL] password option in pg_dumpall

2008-02-07 Thread Tom Lane
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > is there anyway of specifying password in the command line interface > of pg_dumpall?? No, and you wouldn't want to use it if there was (hint: putting a password on a command line is insecure). The recommended procedure to avoid a lot of password

[GENERAL] password option in pg_dumpall

2008-02-07 Thread [EMAIL PROTECTED]
is there anyway of specifying password in the command line interface of pg_dumpall?? this my script, and it asks for password for every host... thanks ''' #!/bin/sh for line in `cat /home/mark/work/infrastructure/farm_all` do pg_dumpall -h $line -U postgres | bzip2 > "$line.bz2" done ''' ---

Re: [GENERAL] Test text value as interval

2008-02-07 Thread Jeff Davis
On Thu, 2008-02-07 at 19:37 -0500, Robert Fitzpatrick wrote: > Been searching for a way to do this, but haven't found what I was hoping > to find. Is there any way in pl/pgsql to test a text value to see if it > would be a valid interval without having to try and store in a field? In > a trigger, I

Re: [GENERAL] "advanced" database design (long)

2008-02-07 Thread SunWuKung
On febr. 2, 15:15, [EMAIL PROTECTED] (Lewis Cunningham) wrote: > --- vladimir konrad <[EMAIL PROTECTED]> wrote: > > > I think that I understand basic relational theory but then I had an > > idea. > > Basically, instead of adding field to a table every time there is a > > need for it, have a table s

[GENERAL] Test text value as interval

2008-02-07 Thread Robert Fitzpatrick
Been searching for a way to do this, but haven't found what I was hoping to find. Is there any way in pl/pgsql to test a text value to see if it would be a valid interval without having to try and store in a field? In a trigger, I'd like to test a NEW text type field. Right now, I have just the fol

Re: [GENERAL] using DROP in a transaction

2008-02-07 Thread Tom Lane
"Willy-Bas Loos" <[EMAIL PROTECTED]> writes: > then in TTY2, run > begin; > drop table test; > create table test (id int4 primary key); > insert into test (id) values (2); > then, in TTY1: > select * from test; > Actually, i thought of a longer test, but it stops here - there is no > re

Re: [GENERAL] using DROP in a transaction

2008-02-07 Thread Willy-Bas Loos
er.. never mind the BDE part, it has nothing to do with this. On Feb 8, 2008 12:53 AM, Willy-Bas Loos <[EMAIL PROTECTED]> wrote: > Hi, > > We have a large set of simple queries, that can run in both PostgreSQL and > BDE (Corel Paradox backend). > We want to be able to re-create some half-product

[GENERAL] using DROP in a transaction

2008-02-07 Thread Willy-Bas Loos
Hi, We have a large set of simple queries, that can run in both PostgreSQL and BDE (Corel Paradox backend). We want to be able to re-create some half-product tables (cache, sortof), while they are (possibly) being accessed by other users. Otherwise there would be a severe performance penalty. We w

Re: [GENERAL] offline*

2008-02-07 Thread Andy Colson
LARC/J.L.Shipman/jshipman wrote: On occasion and for reasons I cannot fathom, postgres will show as $ svcs postgresql STATE STIMEFMRI disabled 10:23:23 svc:/application/database/postgresql:version_81 offline* 13:58:38 svc:/application/database/postgresql:version_82 I w

Re: [GENERAL] "RETURN QUERY" mystery

2008-02-07 Thread Dejan Dimic
On Feb 6, 7:45 pm, dima <[EMAIL PROTECTED]> wrote: > Can anybody give us more detailed explanation about "RETURN QUERY" > syntax and usage with possible some non trivial samples. > > Thanks in advance. I somehow get it. Here is one of my examples that, perhaps, could help someone that doesn't se i

[GENERAL] offline*

2008-02-07 Thread LARC/J.L.Shipman/jshipman
On occasion and for reasons I cannot fathom, postgres will show as $ svcs postgresql STATE STIMEFMRI disabled 10:23:23 svc:/application/database/postgresql:version_81 offline* 13:58:38 svc:/application/database/postgresql:version_82 I will not be able to access the data

Re: [GENERAL] Is news.postgresql.org down?

2008-02-07 Thread Magnus Hagander
Rainer Bauer wrote: Monday, January 28, 2008, 12:45:16 PM, you wrote: MH> On Mon, Jan 28, 2008 at 10:07:43AM +0100, Rainer Bauer wrote: Hello, I cannot retrieve any list messages through the news server anymore (since last Tuesday). Are there any known problems? The reported error is: "503 NNT

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > The query r_triggers.c is executing is (after simplifying a bit): >SELECT * > FROM t2 fk > LEFT OUTER JOIN t1 pk ON ( pk.id = fk.t1id::character) > WHERE pk.id IS NULL > AND fk.t1id IS NOT NULL > Note the cast. Real

Re: [GENERAL] Fossology Install & Config Issues...

2008-02-07 Thread Tom Lane
"Kurt Schroeder" <[EMAIL PROTECTED]> writes: > [EMAIL > PROTECTED]:/fossology/fossology-0.6.0#./install/usr/local/fossology/test.d/dbcheck > ERROR: Unable to connect to the database > Connection string: 'dbname=fossology local=localhost user=fossy > password=fossy' > Connection status: '1' > E

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Stephan Szabo
On Thu, 7 Feb 2008, Harald Fuchs wrote: > This works fine in 8.2.4, but 8.3.0 rejects the ALTER TABLE with the > following (somewhat misleading) error message: > > ERROR: insert or update on table "t2" violates foreign key constraint > "t2_t1id_fk" > DETAIL: Key (t1id)=(t1id1) is not presen

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Gregory Stark
"Harald Fuchs" <[EMAIL PROTECTED]> writes: > (Note the different column types.) > > This works fine in 8.2.4, but 8.3.0 rejects the ALTER TABLE with the > following (somewhat misleading) error message: > > ERROR: insert or update on table "t2" violates foreign key constraint > "t2_t1id_fk" >

Re: [GENERAL] Reload only specific databases from pg_dumpall

2008-02-07 Thread Guido Neitzer
On 06.02.2008, at 19:41, Andrej Ricnik-Bay wrote: And a more generic version :} Thanks for that! I had solved my problem as I saw that actually importing all database from the dump file was faster than compressing the dump file (on a 4 core Woodcrest). So it wasn't that big of a deal that

Re: [GENERAL] Fossology Install & Config Issues...

2008-02-07 Thread Alvaro Herrera
Kurt Schroeder escribió: > 3. Ran the dbcheck command and received the same error: > > [EMAIL > PROTECTED]:/fossology/fossology-0.6.0#./install/usr/local/fossology/test.d/dbcheck > ERROR: Unable to connect to the database > Connection string: 'dbname=fossology local=localhost user=fossy > pass

Re: [GENERAL] Fossology Install & Config Issues...

2008-02-07 Thread Kurt Schroeder
Still failing. Here's what I did: 1. Edited the pg_hba.conf file and added the line: hostall all 127.0.0.1 255.255.255.255 trust [EMAIL PROTECTED]:/etc/postgresql/8.1/main$ psql -d fossology -U fossy -h localhost Welcome to psql 8.1.10, the PostgreSQL interactive t

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Tom Lane
"Gregory Williamson" <[EMAIL PROTECTED]> writes: > Harald, >> (Note the different column types.) > Precisely -- there are a number of casts that have been removed from > this release. This isn't a casting problem, I don't think. 8.3 is definitely stricter about implicit casts with FKs, eg try ad

Re: [GENERAL] Kernel kills postgres process - help need

2008-02-07 Thread Hervé Piedvache
Thanks Alvaro for your answer really clear. Another, may be stupid question, but when you have several web nodes like me ... with several physical database (I'm not talking about replication, it's just that the web node can contact 3 or 4 differents database for differents applications), what i

Re: [GENERAL] Subquery Factoring ?

2008-02-07 Thread Adam Rich
Gregory, > Are you using it just to avoid retyping a complex subquery? Or do you > expect > that the feature will reduce the execution time by avoiding re- > executing the > subquery for each call site in the query? The only situation where I rely on this currently is when my main/outer query re

Re: [GENERAL] Fossology Install & Config Issues...

2008-02-07 Thread Kurt Schroeder
No, it didn't work! When I ran: [EMAIL PROTECTED]:/fossology/fossology-0.6.0$ psql -d fossology -U fossy -h localhost I got the error: psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "fossy", database "fossology", SSL off I will work on resolving this. Thank you!!! - Kurt On Feb

Re: [GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Gregory Williamson
Harald, > > I've found an incompatibility between PostgreSQL 8.2.4 and 8.3.0 which > is not clearly documented. Here's a short example: <...> > > (Note the different column types.) > Precisely -- there are a number of casts that have been removed from this release. You can find details in t

[GENERAL] 8.2/8.3 incompatibility

2008-02-07 Thread Harald Fuchs
I've found an incompatibility between PostgreSQL 8.2.4 and 8.3.0 which is not clearly documented. Here's a short example: CREATE TABLE t1 ( id CHAR(5) NOT NULL, PRIMARY KEY (id) ); INSERT INTO t1 (id) VALUES ('t1id1'); INSERT INTO t1 (id) VALUES ('t1id2'); INSERT INTO t1 (id) V

Re: [GENERAL] Kernel kills postgres process - help need

2008-02-07 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > The PHP model of persistent connections is silly and useless, because each > PHP process keeps an open connection (or more than one, if it connects to > different databases), which is then idle most of the time. Some might say that keeping PHP proces

Re: [GENERAL] Subquery Factoring ?

2008-02-07 Thread Gregory Stark
"Adam Rich" <[EMAIL PROTECTED]> writes: > Are there any plans to support materialized subquery / factoring (sql-99 > WITH) in Postgresql? I am spoiled with this feature in oracle, and find > myself wishing I had it in postgresql more and more. It *seems* to an > outsider like a relatively easy ad

[GENERAL] Need help with decoding of sql array from WAL files version 7.4.17

2008-02-07 Thread Andrey Stoev
I need to restore two records from a lost transaction and I am having only the WAL file, managed by Postgresql 7.4.17. The structure of records is: * Record 1: varchar(400)[] with exact 191 elements, where al least 185 elements are just "*" and at most 6 are string with length>1. Like this {first

Re: [GENERAL] Kernel kills postgres process - help need

2008-02-07 Thread Alvaro Herrera
Hervé Piedvache escribió: > Tom, > > Le mercredi 9 janvier 2008, Tom Lane a écrit : > > =?utf-8?q?Herv=C3=A9_Piedvache?= <[EMAIL PROTECTED]> writes: > > > When I have a lot of connexions (persistante connexions from 6 web > > > apache/php serveurs using PDO, about 110 process on each web servers)

Re: [GENERAL] Migration of /data from 32bit to 8.2 64bit

2008-02-07 Thread Magnus Hagander
On Thu, Feb 07, 2008 at 11:26:27AM +0100, Jean-Samuel Reynaud wrote: > Hi All, > > I want to migration an existing database from a 32bit server to a 64bit > server. I will use exactly the same postgresql version (8.2.6). > Did I need to dump the data to do this or a single copy of /data will > wor

[GENERAL] Full text search and count

2008-02-07 Thread lbarcala
Hello: I have been reading and testing some issues of postgres 8.3 and I have a doubt: Is there any way to obtain the number of hits of a full text query? I have seen that I can highlight the matching tokens but, what about to count the number of tokens that verify a full text query? Is it possib

[GENERAL] Migration of /data from 32bit to 8.2 64bit

2008-02-07 Thread Jean-Samuel Reynaud
Hi All, I want to migration an existing database from a 32bit server to a 64bit server. I will use exactly the same postgresql version (8.2.6). Did I need to dump the data to do this or a single copy of /data will work ? Is any interger lenght impact on /data ? Thanks, --

[GENERAL] PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files

2008-02-07 Thread Lawrence Oluyede
As specified in the W3C Recommendation for XML the DOCTYPE element is perfectly valid in a document. I have a bunch of XML files generated by the boost library which contains a doctype like this: which lies within the bound of the recommendation (http://www.w3.org/TR/xml/#sec-prolog-dtd): "Note

Re: [GENERAL] Kernel kills postgres process - help need

2008-02-07 Thread Hervé Piedvache
Tom, Le mercredi 9 janvier 2008, Tom Lane a écrit : > =?utf-8?q?Herv=C3=A9_Piedvache?= <[EMAIL PROTECTED]> writes: > > When I have a lot of connexions (persistante connexions from 6 web > > apache/php serveurs using PDO, about 110 process on each web servers) on > > the server, or long request, it

Re: [GENERAL] Constraint violations don't report the value that violates

2008-02-07 Thread Russell Smith
Tom Lane wrote: Foreign keys give a value that is failing for the foreign key, is there a reason that other constraints don't do the same thing? It's not very well-defined, for instance what would you report for CHECK some_black_box_function(a, b, c+d) FKs are constrained by the

[GENERAL] Subquery Factoring ?

2008-02-07 Thread Adam Rich
Are there any plans to support materialized subquery / factoring (sql-99 WITH) in Postgresql? I am spoiled with this feature in oracle, and find myself wishing I had it in postgresql more and more. It *seems* to an outsider like a relatively easy addition. I searched the archives but only fou