Re: [GENERAL] Need help - Regarding Data Compression in PostgreSQL.

2008-12-18 Thread salma
I started feeling nobody wants to answer those questions but finally got a reply :-) Thanks a lot Scott. - Salma - Original Message - From: "Scott Marlowe" To: "salma" Cc: ; Sent: Friday, December 19, 2008 5:36 AM Subject: Re: [GENERAL] Need help - Regarding Data Compression in Pos

Re: [GENERAL] Hi iam the beginner

2008-12-18 Thread ries van Twisk
On Dec 18, 2008, at 10:19 PM, Star Liu wrote: On Tue, Dec 16, 2008 at 2:02 PM, sai srujan wrote: Hi This is srujan and I am beginner of postgresql 8.1 and I have just stopped using mysql and i would like to use the dump (.sql file) created in it. I would like transfer the

Re: [GENERAL] Hi iam the beginner

2008-12-18 Thread Star Liu
On Tue, Dec 16, 2008 at 2:02 PM, sai srujan wrote: > Hi > This is srujan and I am beginner of postgresql 8.1 and I have > just stopped using mysql and i would like to use the dump (.sql file) > created in it. I would like transfer the databases in my sql to postgresql > 8.1. Ple

Re: [GENERAL] Need help - Regarding Data Compression in PostgreSQL.

2008-12-18 Thread Alvaro Herrera
Scott Marlowe escribió: > On Tue, Dec 16, 2008 at 6:52 AM, salma wrote: > > 2. What kind of compression, if any, is available in PostgreSQL. > > Standard unix compress I believe No, it's our own LZ implementation, which is focused on speed but does not compress as well as gzip or compress (see

Re: [GENERAL] Hi iam the beginner

2008-12-18 Thread Pedro Doria Meunier
(sorry all, I *couldn't* resist!) Scott ... In all these years that's the 1st time I've ever 'heard' the term "massage you data" !!! All sorts of deviant thoughts come to your mind! LOL BR, Pedro Doria Meunier GSM: +351961720188 Skype: pdoriam On Friday 19 December 2008 12:03:26 am Scott Mar

Re: [GENERAL] Need help - Regarding Data Compression in PostgreSQL.

2008-12-18 Thread Scott Marlowe
On Tue, Dec 16, 2008 at 6:52 AM, salma wrote: > Hi, > > I'd like to know: > 1. If it is possible to compress data in the PostgreSQL. Ayup. Anything over a standard size gets compressed out of line into TOAST tables. > 2. What kind of compression, if any, is available in PostgreSQL. Standard un

Re: [GENERAL] Hi iam the beginner

2008-12-18 Thread Scott Marlowe
On Mon, Dec 15, 2008 at 11:02 PM, sai srujan wrote: > Hi > This is srujan and I am beginner of postgresql 8.1 and I have > just stopped using mysql and i would like to use the dump (.sql file) > created in it. I would like transfer the databases in my sql to postgresql > 8.1. Pl

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Gregory Stark
Aarni writes: > "ERROR: operator does not exist: character varying = integer at character 286 > HINT: No operator matches the given name and argument type(s). You might > need > to add explicit type casts." > > Quick fix to sql statements eg. > > ... WHERE CAST (your_char AS INTEGER) = integ

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Aarni
On Thursday 18 December 2008 12:46:38 Peter Eisentraut wrote: > novnov wrote: > > I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and > > when I try to work with a table I get this error: > > > > Error: Operator does not exist: "char" = integer > > > > Hopefully that is enough

Re: [GENERAL] Postgre Tables problem

2008-12-18 Thread Alan Hodgson
On Tuesday 16 December 2008, Danail Pavlov wrote: > I have to create a postgre database programmatically from VB .Net and > after that to create a tables. After successfully creating the Data Base, > when a try to create a table in this DB i have this error - "schema > "dbName" does not exist, Cod

Re: [GENERAL] Lost password

2008-12-18 Thread Johan Nel
Martin, You need to find the file pg_hba.conf. Inside of it find the lines showing: # IPv4 local connections: hostall all 127.0.0.1/32 md5 Change the md5 to trust, make sure it is only for local host that you do it. Save the file and restart your postgres server.

Re: [GENERAL] 8.1.11 PREPARE problem?

2008-12-18 Thread Jeremiah Jahn
doh! my second prepared statement is getting prepared as all text, when the second and third parameters should be timestamps. argh! Is there some sort of logging, that says how prepared statements are getting prepared? On Thu, 2008-12-18 at 13:13 -0600, Jeremiah Jahn wrote: > moving on: > After

[GENERAL] Postgre Tables problem

2008-12-18 Thread Danail Pavlov
Dear Sir/Madam, I have to create a postgre database programmatically from VB .Net and after that to create a tables. After successfully creating the Data Base, when a try to create a table in this DB i have this error - "schema "dbName" does not exist, Code 3F000" I'm sure that name is correc

[GENERAL] Hi iam the beginner

2008-12-18 Thread sai srujan
Hi This is srujan and I am beginner of postgresql 8.1 and I have just stopped using mysql and i would like to use the dump (.sql file) created in it. I would like transfer the databases in my sql to postgresql 8.1. Please do reply. I am waiting for it. Thanks in Advance

[GENERAL] Need help - Regarding Data Compression in PostgreSQL.

2008-12-18 Thread salma
Hi, I'd like to know: 1. If it is possible to compress data in the PostgreSQL. 2. What kind of compression, if any, is available in PostgreSQL. 3. If compression is available, what kind of disk space savings can I expect using it. I'd appreciate it if you can take some time and get me this inf

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Raymond O'Donnell
On 18/12/2008 12:40, Julius Tuskenis wrote: > Yes, Raymond - I know how to return record set in function using FOR, > but since version 8.3 there is a option - using RETURN QUERY SELECT > something FROM somewhere;. So if it works for SELECT why should it not > work for EXECUTE ? Oh - I didn't know

Re: [GENERAL] unable to assign value to composite column in trigger

2008-12-18 Thread Ketema Harris
On Dec 18, 2008, at 4:19 PM, Ketema Harris wrote: The following is a snippet from a trigger i am using: _mycompositeType.user_id = (OLD).mycompositeType.user_id; ...do some stuff... --notice that assigning from the trigger record works but later on... (new).mycompositeType.transaction_id

[GENERAL] unable to assign value to composite column in trigger

2008-12-18 Thread Ketema Harris
The following is a snippet from a trigger i am using: _mycompositeType.user_id = (OLD).mycompositeType.user_id; ...do some stuff... --notice that assigning from the trigger record works but later on... (new).mycompositeType.transaction_id := _transaction_id; Fails with syntax error at or n

Re: [GENERAL] Mirroring existing mysql setup

2008-12-18 Thread Scott Marlowe
On Thu, Dec 18, 2008 at 12:32 PM, snacktime wrote: > Where I work we use mysql for a fairly busy website, and I'd like to > eventually start transitioning to postgres if possible. The largest > obstacle is the lack of replication as a core feature. I'm well aware > of the history behind why it'

Re: [GENERAL] 8.1.11 PREPARE problem?

2008-12-18 Thread Jeremiah Jahn
thanks for the help. between CAST(? as timestamp) and CAST(? as timestamp) fixes my problem. because my second query uses a between the same day parameter it wasn't being found when it was treated as a string, as a timestamp it works fine. Apparently a simple query will convert the string to a ti

Re: [GENERAL] 8.1.11 PREPARE problem?

2008-12-18 Thread Tom Lane
Jeremiah Jahn writes: > This is with jdbc3-415. None of the (jdbc, or pg) change logs since then > have mentioned this problem. When run as a prepared statement the first > statement will execute and return results, while the next two seem to > execute, but return no results. It seems quite unlik

Re: [GENERAL] Mirroring existing mysql setup

2008-12-18 Thread Erik Jones
On Dec 18, 2008, at 11:32 AM, snacktime wrote: Where I work we use mysql for a fairly busy website, and I'd like to eventually start transitioning to postgres if possible. The largest obstacle is the lack of replication as a core feature. I'm well aware of the history behind why it's not in

[GENERAL] Mirroring existing mysql setup

2008-12-18 Thread snacktime
Where I work we use mysql for a fairly busy website, and I'd like to eventually start transitioning to postgres if possible. The largest obstacle is the lack of replication as a core feature. I'm well aware of the history behind why it's not in core, and I saw a post a while back saying it would

[GENERAL] alocate table in memory and multui listener

2008-12-18 Thread Lennin Caro
I have two cuestion: 1- postgresql have the method to allocate a table in memory 2- In postgresql can have multiple port to listen thank... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/p

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread novnov
The error went away; I updated the admin tool I use (pg lightning admin) and that seemed to help. Thanks everyone. Julius Tuskenis-2 wrote: > > Raymond O'Donnell rašė: >> A lot of previously automatic casts were removed in the 8.3 series - >> this is possibly one of them. >> >> You now need t

Re: [GENERAL] 8.1.11 PREPARE problem?

2008-12-18 Thread Jeremiah Jahn
moving on: After digging through the JDBC source. It seems that the server is returning a 'C': // Command Status (end of Execute) before returning any data rows. So it doesn't look like JDBC is causing any problems. I've tried not running the first, and only running the second, and I get still no

Re: [GENERAL] Server side large object functions

2008-12-18 Thread George Weaver
- Original Message - From: "Howard Cole" If you use Npgsql (.NET library) rather than ODBC - there are functions for reading large objects into memory. Cool! I've been meaning to have a look at Npgsql - maybe this is the nudge I need! Thanks, George -- Sent via pgsql-general

Re: [GENERAL] Server side large object functions

2008-12-18 Thread Howard Cole
George Weaver wrote: My objective it to read a large object into memory as opposed to exporting it to a disk file. I'm using version 8.3.3, psqlODBC 8.2.2 and vb.net. If you use Npgsql (.NET library) rather than ODBC - there are functions for reading large objects into memory. Howard Cole

[GENERAL] 8.1.11 PREPARE problem?

2008-12-18 Thread Jeremiah Jahn
This is with jdbc3-415. None of the (jdbc, or pg) change logs since then have mentioned this problem. When run as a prepared statement the first statement will execute and return results, while the next two seem to execute, but return no results. When run by hand, not prepared , each statement runs

Re: [GENERAL] Syntax error with select statement

2008-12-18 Thread aravind chandu
Hello,    Thanks for your help,but i still have some problem.While executing it i encountered an error something like this: terminate called after throwing an instance of 'pqxx::syntax_error'   what():  ERROR:  unterminated dollar-quoted string at or near "$Password$ M^

Re: [GENERAL] Server side large object functions

2008-12-18 Thread Alvaro Herrera
George Weaver wrote: > As an aside, if I do a PostgreSQL Website search for "loread", I get not > hits. Apparently these functions are not documented at all :-( Most of the chapter on large objects http://www.postgresql.org/docs/8.3/static/lo-funcs.html seems predicated on that one will be usi

Re: [GENERAL] Missing usenet messages. Was: A bit confused about Postgres Plus

2008-12-18 Thread Rainer Bauer
Alvaro Herrera wrote: >Rainer Bauer wrote: >> >> It seems like Alvaros message was sent only via private mail, because it does >> not show in the mailing list archive. > >It is on the archives, here: >http://archives.postgresql.org/message-id/20081217122802.GA4453%40alvh.no-ip.org > >As Dave said

Re: [GENERAL] Server side large object functions

2008-12-18 Thread George Weaver
From: "Alvaro Herrera" George Weaver wrote: But if I try to find the same for lo_read I get: development=# \df+ lo_read alvherre=# \df loread Listado de funciones Schema | Nombre | Tipo de dato de salida | Tipos de datos de argumentos +

Re: [GENERAL] Server side large object functions

2008-12-18 Thread Alvaro Herrera
George Weaver wrote: > But if I try to find the same for lo_read I get: > > development=# \df+ lo_read alvherre=# \df loread Listado de funciones Schema | Nombre | Tipo de dato de salida | Tipos de datos de argumentos ++

[GENERAL] Server side large object functions

2008-12-18 Thread George Weaver
Hi, The PostgreSQL manual indicates that: "There are server-side functions callable from SQL that correspond to each of the client-side functions described above." In psql I can get the argument data types for lo_open: development=# \df+ lo_open

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread gerhard
Added indices on the two tables that used foreign keys to the delting table, and voila - delete finishes fast. Thanks for the tip, also using explain analyze, as someone else pointed out, would have shown me, where the problem comes from. Thanks everybody for helping. Gerhard -- Sent via pgsql-

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread gerhard
On Dec 18, 2:46 pm, gerhard wrote: > oops, should have thought about setting the foreign key constraint > deferrable, maybe showing this in table definition (\d) would be a > good idea. > will recreate my foreign key deferrable and do some timings ... OK, recreated my foreign key constraints defe

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread Sam Mason
On Thu, Dec 18, 2008 at 05:29:52AM -0800, gerhard wrote: > I'm running a delete command on a postgresql-8.1.9 server. 25000 > tuples are delete, time is ~ 400 secs > detailid | integer | not null default nextval > ('downtime_detail_detailid_seq'::regclass) > downtimeid | integer | > detail

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread Csaba Nagy
On Thu, 2008-12-18 at 05:29 -0800, gerhard wrote: > I suspect the foreign key constraint of downtime_detail to slow down > the delete process. Is this a bug, probably fixed in latest version > (8.1.x) or should I drop the constraint and recreate after deletion - > which I only see as workaround ?

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread Tom Lane
gerhard writes: > oops, should have thought about setting the foreign key constraint > deferrable, maybe showing this in table definition (\d) would be a > good idea. Don't think that'll make any difference. What *should* help is having an index on downtime_detail.downtimeid. As-is it's got to

Re: [GENERAL] DELETE running at snail-speed

2008-12-18 Thread gerhard
oops, should have thought about setting the foreign key constraint deferrable, maybe showing this in table definition (\d) would be a good idea. will recreate my foreign key deferrable and do some timings ... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

[GENERAL] DELETE running at snail-speed

2008-12-18 Thread gerhard
I'm running a delete command on a postgresql-8.1.9 server. 25000 tuples are delete, time is ~ 400 secs the command: delete from downtime where start<'Aug 1 00:00:00 2008' The table definitions are: linie4=> \d downtime Table "public.downtime" Column

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Julius Tuskenis
Raymond O'Donnell rašė: A lot of previously automatic casts were removed in the 8.3 series - this is possibly one of them. You now need to cast explicitly in such cases, e.g. select '5'::integer; Ray. That is a good advice and a good practice. But the solution usually takes time. For a q

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
Yes, Raymond - I know how to return record set in function using FOR, but since version 8.3 there is a option - using RETURN QUERY SELECT something FROM somewhere;. So if it works for SELECT why should it not work for EXECUTE ? Julius Tuskenis Raymond O'Donnell rašė: On 18/12/2008 12:12, Ju

Re: [GENERAL] Missing usenet messages. Was: A bit confused about Postgres Plus

2008-12-18 Thread Alvaro Herrera
Rainer Bauer wrote: > Hi all, > > Thomas Kellerer wrote here > > > > [I'm reading this list through the newsserver at news.gmane.org, > > and several answers did not seem to make it to news.gmane.org > > but only to my private em

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Raymond O'Donnell
On 18/12/2008 12:12, Julius Tuskenis wrote: > While experimenting I found that if I wright FOR rec IN EXECUTE 'my sql' > LOOP .. its OK, but If I wright RETURN QUERY EXECUTE 'my sql' I get > syntax error. Is it a bug? No, it's a syntax error. :-) You need to do something like this to return

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
Thank you Andreas and Grzegorz. It worked! While experimenting I found that if I wright FOR rec IN EXECUTE 'my sql' LOOP .. its OK, but If I wright RETURN QUERY EXECUTE 'my sql' I get syntax error. Is it a bug? Julius Tuskenis A. Kretschmer rašė: In response to Julius Tuskenis :

Re: [GENERAL] Missing usenet messages. Was: A bit confused about Postgres Plus

2008-12-18 Thread Dave Page
On Thu, Dec 18, 2008 at 11:15 AM, Rainer Bauer wrote: > It seems like Alvaros message was sent only via private mail, because it does > not show in the mailing list archive. His message went to -www, not to -general. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com -- Sent via pgs

[GENERAL] Missing usenet messages. Was: A bit confused about Postgres Plus

2008-12-18 Thread Rainer Bauer
Hi all, Thomas Kellerer wrote here > [I'm reading this list through the newsserver at news.gmane.org, > and several answers did not seem to make it to news.gmane.org > but only to my private email] I am reading the Postgres list

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Peter Eisentraut
novnov wrote: I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and when I try to work with a table I get this error: Error: Operator does not exist: "char" = integer Hopefully that is enough of a clue to be useful. Maybe this is the first time I've tried moving one of my no

Re: [GENERAL] Other queries locked out during long insert

2008-12-18 Thread Peter Eisentraut
Joshua J. Kugler wrote: OK, that makes sense. There was nothing on the TRUNCATE page to suggest that TRUNCATE would lock the tables. Maybe an addition to the documentation is in order? Where do I go to suggest that? I have added something to document this. -- Sent via pgsql-general mailing

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Raymond O'Donnell
On 18/12/2008 05:26, novnov wrote: > I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and > when I try to work with a table I get this error: > > Error: Operator does not exist: "char" = integer A lot of previously automatic casts were removed in the 8.3 series - this is poss

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread A. Kretschmer
In response to Julius Tuskenis : > Hello, list. > > I have a function witch returns record set. What troubles me is that > depending on parameters I pass to this function the execution time > varies greatly. On the other hand if I execute the query (not the > function) with pgAdmin - it gives

Re: [GENERAL] SQL plan in functions

2008-12-18 Thread Grzegorz Jaśkiewicz
On Thu, Dec 18, 2008 at 9:18 AM, Julius Tuskenis wrote: > Hello, list. > > I have a function witch returns record set. What troubles me is that > depending on parameters I pass to this function the execution time varies > greatly. On the other hand if I execute the query (not the function) with >

Re: [GENERAL] Prevent new timeline during archive recovery

2008-12-18 Thread Jonatan Evald Buus
Cheers for the input Simon, please find a couple of thoughts / questions below /Jona On Thu, Dec 18, 2008 at 12:04 AM, Simon Riggs wrote: > > On Wed, 2008-12-17 at 17:54 +0100, Jonatan Evald Buus wrote: > > Greetings, > > We're currently developing an alternative to pg_standby, internally > > n

[GENERAL] SQL plan in functions

2008-12-18 Thread Julius Tuskenis
Hello, list. I have a function witch returns record set. What troubles me is that depending on parameters I pass to this function the execution time varies greatly. On the other hand if I execute the query (not the function) with pgAdmin - it gives results quickly. In previous post You helpe

Re: [GENERAL] text_soundex function

2008-12-18 Thread Chris
Chris wrote: Otandeka Simon Peter wrote: Hi Chris, Tried it and I get LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john'); HINT: No function matches the given name and argument types. You might need to add explicit type casts. Ahh, it's a contrib module. It's not installed by defau

Re: [GENERAL] text_soundex function

2008-12-18 Thread Chris
Otandeka Simon Peter wrote: Hi Chris, Tried it and I get LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john'); HINT: No function matches the given name and argument types. You might need to add explicit type casts. Ahh, it's a contrib module. It's not installed by default, it's like

Re: [GENERAL] text_soundex function

2008-12-18 Thread Otandeka Simon Peter
Hi Chris, Tried it and I get LINE 1: SELECT * FROM s WHERE soundex(nm) = soundex('john'); HINT: No function matches the given name and argument types. You might need to add explicit type casts. yet the data type of the nm is text. I am using 8.3.1. Anything am doing wrong? On Thu, Dec 18, 20