[ADMIN] Explicit Cast

2003-08-20 Thread Rhaoni Chiu Pereira
Hi List, As I already said .. I'm porting an Oracle DB to PostgreSQL and I must rewrite most of the functions . So I have a problem to do something like this: ... atual_fatura in(''+'',''-'') ... It gives me the following error: Unable to identify an operator '-' for types 'numeric'

[ADMIN] Need Help on query tuning

2003-08-20 Thread Somasekhar Bangalore
Hi, I am having 7.2.3 version of postgres database. I have huge data in my database. I have a couple of views and functions used in the application.if i run the views. The views take a long time to get the data. I am joining just 4 tables namely roles,link_roles ,link_rights ,rights.

Re: [ADMIN] changing field length

2003-08-20 Thread Jodi Kanter
Title: how do I copy from one field to another? Gaetano Mendola wrote: "Jodi Kanter" [EMAIL PROTECTED] wrote: I am running 7.3.3. Can I change a field that is varying character(128) to varying character(250)? nope.You can a) create a new

Re: [ADMIN] changing field length

2003-08-20 Thread Bruno Wolff III
On Wed, Aug 20, 2003 at 10:16:38 -0400, Jodi Kanter [EMAIL PROTECTED] wrote: how do I copy from one field to another? update tablename set newcol = oldcol; ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [ADMIN] changing field length

2003-08-20 Thread Jodi Kanter
Title: ExecUpdate: Fail to add null value in not null attribute study_name Is there any way around this error. Col1 is a not null field but col2 is not obviously since it is currently empty! Thanks for the help. Jodi Bruno Wolff III wrote: On Wed, Aug 20,

Re: [ADMIN] changing field length

2003-08-20 Thread Jodi Kanter
Title: please ignore last message. I had my columns switched. sorry about that! Thanks for the quick response. jodi Bruno Wolff III wrote: On Wed, Aug 20, 2003 at 10:16:38 -0400, Jodi Kanter [EMAIL PROTECTED] wrote: how do I copy from one field to

[ADMIN] Sobig.f in the list

2003-08-20 Thread Dani Oderbolz
Guys, be careful, it seems that several Mails in the List have contained a virus - I guess its sobig.f. Cheers, Dani ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [ADMIN] changing field length

2003-08-20 Thread Jodi Kanter
Title: can I now make this field not null? is it possible to move a field up in a table? now that I have done this move the new field is at the bottom of the list of fields. From time to time we have had to make changes to our schema so I will rerun our script

Re: [ADMIN] Sobig.f in the list

2003-08-20 Thread Sam Barnett-Cormack
On Wed, 20 Aug 2003, Dani Oderbolz wrote: Guys, be careful, it seems that several Mails in the List have contained a virus - I guess its sobig.f. Or that a copy of sobig learned the mailing list address and masqueraded as being from the list. -- Sam Barnett-Cormack Software Developer

Re: [ADMIN] changing field length

2003-08-20 Thread Bruno Wolff III
On Wed, Aug 20, 2003 at 10:49:08 -0400, Jodi Kanter [EMAIL PROTECTED] wrote: can I now make this field not null? is it possible to move a field up in a table? now that I have done this Currently, not without recreating the table. There was some discussion about that a few months ago, but

Re: [ADMIN] changing field length

2003-08-20 Thread Jodi Kanter
Title: Ok. so for now I want to return to where I started. so I renamed the table and regenerated my original table with the fields in the order that I like. I cannot just do a insert into table select * from other_table; because the fields are in a different

Re: [ADMIN] changing field length

2003-08-20 Thread Bruno Wolff III
On Wed, Aug 20, 2003 at 11:16:18 -0400, Jodi Kanter [EMAIL PROTECTED] wrote: Ok. so for now I want to return to where I started. so I renamed the table and regenerated my original table with the fields in the order that I like. I cannot just do a insert into table select * from

Re: [ADMIN] Explicit Cast

2003-08-20 Thread Mendola Gaetano
Rhaoni Chiu Pereira [EMAIL PROTECTED] wrote: Hi List, As I already said .. I'm porting an Oracle DB to PostgreSQL and I must rewrite most of the functions . So I have a problem to do something like this: ... atual_fatura in(''+'',''-'') ... It gives me the following error: Unable

Re: [ADMIN] Need Help on query tuning

2003-08-20 Thread Mendola Gaetano
Somasekhar Bangalore [EMAIL PROTECTED] wrote: Hi, I am having 7.2.3 version of postgres database. I have huge data in my database. I have a couple of views and functions used in the application.if i run the views. The views take a long time to get the data. I am joining just 4 tables namely

Re: [ADMIN] Explicit Cast

2003-08-20 Thread Stephan Szabo
On Wed, 20 Aug 2003, Rhaoni Chiu Pereira wrote: Hi List, As I already said .. I'm porting an Oracle DB to PostgreSQL and I must rewrite most of the functions . So I have a problem to do something like this: ... atual_fatura in(''+'',''-'') ... It gives me the following error:

Re: [ADMIN] changing field length

2003-08-20 Thread scott.marlowe
As always, there's more than one way to skin a cat... Create a new table and insert into it: create newtable (field newdef, field2 newdef); insert into newtable ( select oldfield, oldfield2 from oldtable ); Create it on the fly with Postgresql casting shortcuts: select

Re: [ADMIN] Compression of text fields

2003-08-20 Thread Stephan Szabo
On Wed, 20 Aug 2003, Brian McCane wrote: I have read somewhere that text fields are compressed. What I am curious about is how the compression of text fields by PostgreSQL might be affecting the performance of my software. I currently store entire copies of documents in a table

Re: [ADMIN] Compression of text fields

2003-08-20 Thread Joe Conway
Stephan Szabo wrote: On Wed, 20 Aug 2003, Brian McCane wrote: 4) Can I disable the compression to improve storage speed if the compression algorithm is not as good as deflate See ALTER TABLE ALTER COLUMN SET STORAGE (I would guess you would want external, but I'm not 100% sure,

[ADMIN] template1 database...

2003-08-20 Thread Thomas LeBlanc
We have accidentally added tables and other objects to this database. How do we return template1 back to the default setup? Thomas LeBlanc _ bGet MSN 8/b and help protect your children with advanced parental controls.

Re: [ADMIN] Sobig.f in the list

2003-08-20 Thread Tom Lane
Sam Barnett-Cormack [EMAIL PROTECTED] writes: On Wed, 20 Aug 2003, Dani Oderbolz wrote: Guys, be careful, it seems that several Mails in the List have contained a virus - I guess its sobig.f. Or that a copy of sobig learned the mailing list address and masqueraded as being from the list.

Re: [ADMIN] template1 database...

2003-08-20 Thread Devrim GUNDUZ
Hi, On Wed, 20 Aug 2003, Thomas LeBlanc wrote: We have accidentally added tables and other objects to this database. How do we return template1 back to the default setup? I think this will help you: http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php Written by Josh Berkus.

[ADMIN] Help with pg_restore

2003-08-20 Thread dan
I'm having some problems running pg_rstore, and reading the documentation hasn't helped. I've used postgres for a couple of years as a programmer, but this is the first time I've had to restore a large database. I'm also posting this message to the postgres-novices lists. We've got a large

[ADMIN] DBMirror - Replicating binary objects of type bytea ?

2003-08-20 Thread VanderLeeden
Anyone has a clue of why the replication using DBMirror (PostgreSQL 7.3.4) does not replicate correctly if the primary key is of type "bytea" ? Error messagefrom DBMirror.pl is e.g. ERROR: Cannot insert a duplicate key into unique index payment_pkey Second question: Is a "manual" failover

Re: [ADMIN] Help with pg_restore

2003-08-20 Thread dan
Tom Lane writes: Were there any error messages in that output? None that I saw, but I'll scan the file again. It's a rather large file (18 GB), so that scan could take a while. You've left out a lot of other significant information, btw, like how you invoked pg_dump, what OS this is, what PG

Re: [ADMIN] get current queries

2003-08-20 Thread Chris Miles
There is a simple way to get this all from psql. First edit postgresql.conf and make sure: stats_command_string = true (and restart or HUP postmaster if necessary) Then connect to your database and use my favorite query: SELECT datname,procpid,current_query FROM pg_stat_activity ORDER

[ADMIN] This table won't use INDEX until I DUMP/RESTORE it ?

2003-08-20 Thread Chris Miles
I have a DB that appears to perform badly. A test of one table with one of the typical queries gives me a query plan indicating a Seq Scan; DB=# EXPLAIN select pcref,pcseqnbr from catrecrel where pcbsref='something' and (pccaref is null or pccaref='') and pcpar is null order by pcseqnbr ;

[ADMIN] pg_dump does not dump index, constraints, sequences

2003-08-20 Thread Adi Alurkar
Greetings i am trying to export the schema for a database, in PG 7.2 running pg_dump -s would extract the schema, but in Pg 7.3.4 pg_dump -s extracts only the table definitions and does not extract the index, sequence, constraint info, how do i extract all of this information from the DB.

Re: [ADMIN] This table won't use INDEX until I DUMP/RESTORE it ?

2003-08-20 Thread Priya G
try to analyze the table. That may help to use the index From: Chris Miles <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] CC: Chris Miles <[EMAIL PROTECTED]> Subject: [ADMIN] This table won't use INDEX until I DUMP/RESTORE it ? Date: Tue, 19 Aug 2003 17:46:16 +0100 I have a DB that appears to

Re: [ADMIN] This table won't use INDEX until I DUMP/RESTORE it ?

2003-08-20 Thread Stephan Szabo
On Tue, 19 Aug 2003, Chris Miles wrote: I have a DB that appears to perform badly. A test of one table with one of the typical queries gives me a query plan indicating a Seq Scan; DB=# EXPLAIN select pcref,pcseqnbr from catrecrel where pcbsref='something' and (pccaref is null or