[GENERAL] PL/Perlu - list of columns

2010-07-18 Thread Sid
Hi, I'am writing pl/perlu function, it executes some query using spi_exec_query. What I want is to get list of fields even when query does not return any rows. Now I get this: { 'status' = 'SPI_OK_SELECT', 'processed' = 0, 'rows' = [] } Is there any way to get

Re: [GENERAL] NASA needs Postgres - Nagios help

2010-07-18 Thread Martin Gainty
Can you cron the nagios tasks? Sounds like an exciting job. Keep us apprised, Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger

Re: [GENERAL] Writing XML files to Operating System

2010-07-18 Thread Martin Gainty
Good Morning Admittedly oracle comes prepackaged with about 100 packaged goodies..reading and writing XML is the most useful. I experienced similar headaches when moving a Oracle DB to mysql and discovered my 100 or so XML output scripts could not be ported out of oracle..aggh! The only

[GENERAL] Full Text Search ideas

2010-07-18 Thread Howard Rogers
I asked recently about a performance problem I'd been having with some full text queries, and got really useful help that pointed me to the root issues. Currently, I'm trying to see if our document search (running on Oracle Text) can be migrated to PostgreSQL, and the reason I asked that earlier

[GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Andre Lopes
Hi, I have a DUMP file with INSERT's commands. I need to import this data to postgresql database with the psql command. How can I do this task? Best Regards,

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Szymon Guz
2010/7/18 Andre Lopes lopes80an...@gmail.com Hi, I have a DUMP file with INSERT's commands. I need to import this data to postgresql database with the psql command. How can I do this task? Best Regards, Hi, you can do that for example using the following command: psql database

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Osvaldo Kussama
2010/7/18 Andre Lopes lopes80an...@gmail.com: Hi, I have a DUMP file with INSERT's commands. I need to import this data to postgresql database with the psql command. How can I do this task? Best Regards, From manual [1] 24.1.1. Restoring the dump: psql dbname infile Osvaldo [1]

[GENERAL] Differences between Postgres and MySql

2010-07-18 Thread John Gage
John Gage, 25.06.2010 11:50: I am astonished to discover that MySQL does not support regular expressions much less something like tsvector. Getting really off-topic now: but MySQL does support Regex http://dev.mysql.com/doc/refman/5.1/en/regexp.html I have done an extensive comparison

Re: [GENERAL] Full Text Search ideas

2010-07-18 Thread Tom Lane
Howard Rogers h...@diznix.com writes: ims=# select count(*) from search_rm where to_tsvector('english', textsearch) @@ to_tsquery('english','bat sb12n'); count --- 3849 (1 row) Time: 408.962 ms ims=# select count(*) from search_rm where to_tsvector('english', textsearch) @@

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Andre Lopes
Thanks for the reply, I have this error: [quote] ERROR: invalid byte sequence for encoding UTF8: 0xff HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. [/quote] I have set the client encoding to

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Edoardo Panfili
On 18/07/10 22.06, Andre Lopes wrote: Hi, I have a DUMP file with INSERT's commands. I need to import this data to postgresql database with the psql command. How can I do this task? I think psql -U user_name database_name dump_file EDoardo -- Sent via pgsql-general mailing list

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Andre Lopes
If I do this command gives me the same error: [quote] ERROR: invalid byte sequence for encoding UTF8: 0xff HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. [/quote] What more can I do? Best

Re: [GENERAL] Differences between Postgres and MySql

2010-07-18 Thread Scott Marlowe
On Sun, Jul 18, 2010 at 2:13 PM, John Gage jsmg...@numericable.fr wrote: John Gage, 25.06.2010 11:50: I am astonished to discover that MySQL does not support regular expressions much less something like tsvector. Getting really off-topic now: but MySQL does support Regex

[GENERAL] xpath index not being used

2010-07-18 Thread Irooniam
Hello, I've searched the mailing list and I tried using defining a xpath index per the post, but my query is still not using it. Essentially, I'm storing a fragment of xml and I want to create xpath indexes on them. The two rows I'm going to insert look like this (alex bob are the only names

Re: [GENERAL] NASA needs Postgres - Nagios help

2010-07-18 Thread Michael Friedrich
Hi there, On 2010-07-15 07:06, Stefan Kaltenbrunner wrote: well - there was direct database support in nagios ages ago(nagios 1.x is ancient) and replaced with a plugin based approach based on their eventbroker architecture called NDOutils. Based on tracking internal state it can be used to

[GENERAL] How to change the file encoding of a 3gb file?

2010-07-18 Thread Andre Lopes
Hi, I'am trying to import an SQL file with 3gb of INSERTS. I must to change the encode of the file to UTF8, how can I change the encode of the file without open it? This 3gb file crashes every program... Give me a clue. Best Regards,

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Osvaldo Kussama
2010/7/18 Andre Lopes lopes80an...@gmail.com: If I do this command gives me the same error: [quote] ERROR:  invalid byte sequence for encoding UTF8: 0xff HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by

Re: [GENERAL] How to import *.sql file to postgresql database

2010-07-18 Thread Rory Campbell-Lange
On 18/07/10, Andre Lopes (lopes80an...@gmail.com) wrote: If I do this command gives me the same error: [quote] ERROR: invalid byte sequence for encoding UTF8: 0xff HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is

Re: [GENERAL] How to change the file encoding of a 3gb file?

2010-07-18 Thread Scott Marlowe
On Sun, Jul 18, 2010 at 3:51 PM, Andre Lopes lopes80an...@gmail.com wrote: Hi, I'am trying to import an SQL file with 3gb of INSERTS. I must to change the encode of the file to UTF8, how can I change the encode of the file without open it? This 3gb file crashes every program... Has iconv

Re: [GENERAL] How to change the file encoding of a 3gb file?

2010-07-18 Thread zhong ming wu
Will running the following on your file useful http://www.gnu.org/software/recode/ It helped me with a pg_dump file in the past On Sun, Jul 18, 2010 at 5:51 PM, Andre Lopes lopes80an...@gmail.com wrote: Hi, I'am trying to import an SQL file with 3gb of INSERTS. I must to change the encode

Re: [GENERAL] xpath index not being used

2010-07-18 Thread Craig Ringer
On 19/07/10 05:41, Irooniam wrote: However, when I check which index it's using, it's not using the xpath index: explain select * from test where ((xpath('//names/name[. =bob]/text()', data))[1]::text) = 'bob'; QUERY PLAN

Re: [GENERAL] Full Text Search ideas

2010-07-18 Thread Howard Rogers
On Mon, Jul 19, 2010 at 6:16 AM, Tom Lane t...@sss.pgh.pa.us wrote: Howard Rogers h...@diznix.com writes: ims=# select count(*) from search_rm where to_tsvector('english', textsearch) @@ to_tsquery('english','bat sb12n'); count ---  3849 (1 row) Time: 408.962 ms ims=# select

Re: [GENERAL] How to change the file encoding of a 3gb file?

2010-07-18 Thread manitou-sig
Andre Lopes wrote: I'am trying to import an SQL file with 3gb of INSERTS. I must to change the encode of the file to UTF8, how can I change the encode of the file without open it? This 3gb file crashes every program... Give me a clue. I'd use recode: