Re: [GENERAL] PostgreSQL and SSIS

2011-05-24 Thread Craig Ringer
On 24/05/11 04:38, Bailey, Rick wrote: On the Windows Server 2008R2 machine, I installed 64 bit Postgres ODBC drivers and found that I could not see them when creating an ADO.net connection manager in BIDS. BIDS appears to be the Microsoft Business Intelligence Development Studio, an add-on

Re: [GENERAL] PostgreSQL and SSIS

2011-05-24 Thread Dann Corbit
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Craig Ringer Sent: Monday, May 23, 2011 11:00 PM To: Bailey, Rick Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] PostgreSQL and SSIS On 24/05/11 04:38,

Re: [GENERAL] disable seqscan

2011-05-24 Thread Nick Raj
On Mon, May 23, 2011 at 7:35 PM, Tom Lane t...@sss.pgh.pa.us wrote: Nick Raj nickrajj...@gmail.com writes: Andrew Sullivan a...@crankycanuck.ca wrote: It sounds like your index can't actually be used to satisfy your query. Without seeing the table definition, index definition, and

Re: [GENERAL] PostgreSQL and SSIS

2011-05-24 Thread John R Pierce
On 05/23/11 1:38 PM, Bailey, Rick wrote: I have an Microsoft SQL Server IS job that has been running in production for several years. It pulls data from a PostgreSQL 8.4.2 database on Linux into an SQL Server 2005 installation on Windows Server 2003 (all 32-bit). I am re-writing this in a

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-24 Thread jun yang
2011/5/24 Rick Genter rick.gen...@gmail.com: On May 23, 2011, at 9:46 PM, jun yang wrote: thanks for the info,i am just not have such deep learn of pg internal, i am on user level,not hacker,so the mail is in pgsql-general,not hacker list. What you are asking to do is not a typical user

[GENERAL] Returning Rows in Procedure

2011-05-24 Thread Adarsh Sharma
Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when the table is existed before and we can specify like this to return create function a(integer) returns setof exist_table as $$ But it gives error when the table is also

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread Pavel Stehule
Hello you have to use a dynamic sql look on statement FOR r IN EXECUTE or RETURN QUERY EXECUTE Regards Pavel Stehule 2011/5/24 Adarsh Sharma adarsh.sha...@orkash.com: Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread Adarsh Sharma
Pavel Stehule wrote: Hello you have to use a dynamic sql look on statement FOR r IN EXECUTE or RETURN QUERY EXECUTE Can u explain in the example, I find it difficult to understand . I think we have to specify return type while creating procedures. Thanks Regards Pavel Stehule

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread Pavel Stehule
Hello 2011/5/24 Adarsh Sharma adarsh.sha...@orkash.com: Pavel Stehule wrote: Hello you have to use a dynamic sql look on statement FOR r IN EXECUTE or RETURN QUERY EXECUTE Can u explain in the example, I find it difficult to understand . I think we have to specify  return type

[GENERAL] Dumping schemas using pg_dump without extensions (9.1 Beta)

2011-05-24 Thread Adrian Schreyer
I am trying to backup a single schema only, without any other database objects such as extensions. pg_dump however always includes extensions, even with the --schema=schema option specified (see below for example). Is there a workaround for this? Cheers, Adrian -- -- TOC entry 20 (class 3079

Re: [GENERAL] Trapping errors

2011-05-24 Thread Alban Hertroys
On 23 May 2011, at 22:08, Shane W wrote: Hello list, I have a table with double precision columns and update queries which multiply and divide these values. I am wondering if it's possible to catch overflow and underflow errors to set the column to 0 in the case of an underflow and a

Re: [GENERAL] strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow

2011-05-24 Thread Alban Hertroys
On 23 May 2011, at 22:53, rudi wrote: On 20 Mai, 22:55, rudi rudi.stras...@gmail.com wrote: Hi all, I feel like I hit a bug in postgres 9.0.2 with a query like this (there's actually a quite complicated view hidden behind), however note the 'IN' selection contains two identical keys.

Re: [GENERAL] disable seqscan

2011-05-24 Thread Alban Hertroys
On 24 May 2011, at 8:22, Nick Raj wrote: One think i am not able to understand is, if i use ndpoint_overlap method it is going for seq. scan every time but if i use operator it is using index scan. Why it is so? Why these is happening? Tom already explained that, but in short: Because a

Re: [GENERAL] Postgres questions

2011-05-24 Thread Trenta sis
Hi Craig, First of all, thanks for you answer. That I need is to connect to another databse (Cache Intersystems) to use select from Postgres. I have tried to configure dbilink but is not working with this database, with sql server seems to work but with poor peroformance. About second question

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread Alban Hertroys
On 24 May 2011, at 10:08, Adarsh Sharma wrote: Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when the table is existed before and we can specify like this to return create function a(integer) returns setof exist_table

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-24 Thread jun yang
2011/5/24 Craig Ringer cr...@postnewspapers.com.au: On 24/05/11 12:46, jun yang wrote: thanks for the info,i am just not have such deep learn of pg internal, i am on user level,not hacker,so the mail is in pgsql-general,not hacker list. Then you really, really, REALLY don't want to start a

Re: [GENERAL] Postgres questions

2011-05-24 Thread Craig Ringer
On 05/24/2011 05:15 PM, Trenta sis wrote: That I need is to connect to another databse (Cache Intersystems) to use select from Postgres. I have tried to configure dbilink but is not working with this database, with sql server seems to work but with poor peroformance. You really need to be

[GENERAL] PostgreSQL 9.01 error database help

2011-05-24 Thread tuanhoanganh
I am running PostgreSQL 9.01 on windows 2008, RAID 10 with 4 disk. Yesterday, one of 4 disks RAID 10 error and I copy data directory to USB. Today, When I start postgresql i have error log 2011-05-24 17:20:01 ICT LOG: database system was shut down at 2011-05-24 02:40:49 ICT 2011-05-24 17:20:01

[GENERAL] postgres crash - illegal instruction

2011-05-24 Thread Jiří Pavlovský
Hi, I'v run into the following today: 2893LOG: server process (PID 24519) was terminated by signal 4: Illegal instruction Is this an error in postgres? I'm running 8.4.2 - yes, I should update. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] postgres crash - illegal instruction

2011-05-24 Thread Pavel Stehule
Hello Dne 24. května 2011 12:21 Jiří Pavlovský j...@getnet.cz napsal(a): Hi, I'v run into the following today:  2893LOG:  server process (PID 24519) was terminated by signal 4: Illegal instruction Is this an error in postgres? I'm running 8.4.2 - yes, I should update. what is

Re: [GENERAL] postgres crash - illegal instruction

2011-05-24 Thread Jiří Pavlovský
On 24.5.2011 12:40, Pavel Stehule wrote: Hello Dne 24. května 2011 12:21 Jiří Pavlovskýj...@getnet.cz napsal(a): Hi, I'v run into the following today: 2893LOG: server process (PID 24519) was terminated by signal 4: Illegal instruction Is this an error in postgres? I'm running 8.4.2 -

Re: [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Emanuel Calvo
2011/5/21 Devrim GÜNDÜZ dev...@gunduz.org: On Sat, 2011-05-21 at 02:50 +0100, Kohei Kaigai wrote: As documentation said, it needs libselinux 2.0.93 or higher. This version supports selabel_lookup(3) for database object classes. AFAICS, we are not checking it during configure. It might be

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread David Johnston
Create function a(int) Returns TABLE(col1 text) As $$ ... $$ Language 'plpgsql' On May 24, 2011, at 4:08, Adarsh Sharma adarsh.sha...@orkash.com wrote: Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when the table is

Re: [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Kohei Kaigai
2011/5/21 Devrim GÜNDÜZ dev...@gunduz.org: On Sat, 2011-05-21 at 02:50 +0100, Kohei Kaigai wrote: As documentation said, it needs libselinux 2.0.93 or higher. This version supports selabel_lookup(3) for database object classes. AFAICS, we are not checking it during configure. It might

Re: [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Kohei Kaigai
I noticed that selinux_sepgsql_context_path(3) was also got merged at libselinux-2.0.83. So, we could check correctness of library versions using existence of this function. Does this patch expectedly abort the configure script on older libselinux installation? I'm not available to setup

Re: [GENERAL] postgres crash - illegal instruction

2011-05-24 Thread Vick Khera
2011/5/24 Jiří Pavlovský j...@getnet.cz: I'v run into the following today:  2893LOG:  server process (PID 24519) was terminated by signal 4: Illegal instruction Is this an error in postgres? I'll tend to suspect hardware error, specifically memory corruption, or on-disk corruption of the

[GENERAL] Views permision -- please help and suggestion

2011-05-24 Thread salah jubeh
I have two views A and B such that A depend on B. Both of them has the same permissions. when I excute SELECT * FROM A; ERROR: permission denied for relation B ** Error ** ERROR: permission denied for relation B SQL state: 42501 However, I can do SELECT * FROM B;

Re: [GENERAL] PostgreSQL 9.01 error database help

2011-05-24 Thread Tom Lane
tuanhoanganh hatua...@gmail.com writes: I am running PostgreSQL 9.01 on windows 2008, RAID 10 with 4 disk. Yesterday, one of 4 disks RAID 10 error and I copy data directory to USB. Today, When I start postgresql i have error log 2011-05-24 17:20:01 ICT LOG: database system was shut down at

Re: [GENERAL] Views permision -- please help and suggestion

2011-05-24 Thread Adrian Klaver
On Tuesday, May 24, 2011 6:50:38 am salah jubeh wrote: I have two views A and B such that A depend on B. Both of them has the same permissions. What are the permissions? when I excute SELECT * FROM A; Who are you executing the above as? ERROR: permission denied for relation B

[GENERAL] Postgresql CBT

2011-05-24 Thread sade_in
Hi, Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? Sent from my iPhone -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Scott Marlowe
On Tue, May 24, 2011 at 12:05 AM, sade...@yahoo.com wrote: Hi, Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? CBT? Please define. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Markus Wanner
On 05/24/2011 08:05 AM, sade...@yahoo.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? And CBT is? (First hit on Google reads Cognitive behavioral therapy, but I somehow doubt that's what you are interested in...)

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Vick Khera
On Tue, May 24, 2011 at 10:33 AM, Scott Marlowe scott.marl...@gmail.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? CBT?  Please define. my guess is computer based training. -- Sent via pgsql-general mailing

Re: [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Emanuel Calvo
2011/5/24 Kohei Kaigai kohei.kai...@emea.nec.com: I noticed that selinux_sepgsql_context_path(3) was also got merged at libselinux-2.0.83. So, we could check correctness of library versions using existence of this function. Does this patch expectedly abort the configure script on older

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Adrian Klaver
On Tuesday, May 24, 2011 7:35:02 am Markus Wanner wrote: On 05/24/2011 08:05 AM, sade...@yahoo.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? And CBT is? (First hit on Google reads Cognitive behavioral

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Scott Marlowe
On Tue, May 24, 2011 at 8:36 AM, Vick Khera vi...@khera.org wrote: On Tue, May 24, 2011 at 10:33 AM, Scott Marlowe scott.marl...@gmail.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Could someone help pls? CBT?  Please define. my

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Reid Thompson
On 05/24/2011 10:49 AM, Scott Marlowe wrote: Oh good. My first response from google, with safe search turned off, was much more distressing... in other news, google trends for cbt just jumped -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread sade_in
Hi, Yes. Computer based training. Thanks Sent from my iPhone On 25/05/2011, at 0:38, Adrian Klaver adrian.kla...@gmail.com wrote: On Tuesday, May 24, 2011 7:35:02 am Markus Wanner wrote: On 05/24/2011 08:05 AM, sade...@yahoo.com wrote: Id like to familiarize with postgresql and looking

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread fork
sade_in at yahoo.com writes: Hi, Yes. Computer based training. A psql prompt and the excellent postgresql documentation? (Sorry to be flip, but typing in examples and fixing mistakes and tweaking input was how I learned... Hopefully one of the consulting guys on the list will come back

Re: [GENERAL] Views permision -- please help and suggestion

2011-05-24 Thread salah jubeh
Hello Adrian, I have changed the permission of one table where view B depend on and my problem is over. Still; the whole issue is confusing me. Regards From: Adrian Klaver adrian.kla...@gmail.com To: pgsql-general@postgresql.org Cc: salah jubeh

Re: [GENERAL] Views permision -- please help and suggestion

2011-05-24 Thread Adrian Klaver
On 05/24/2011 10:04 AM, salah jubeh wrote: Hello Adrian, I have changed the permission of one table where view B depend on and my problem is over. Still; the whole issue is confusing me. See here for explanation: http://www.postgresql.org/docs/9.0/interactive/sql-createview.html Access to

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Reid Thompson
On 05/24/2011 01:02 PM, fork wrote: A psql prompt and the excellent postgresql documentation? if you're concerned about mucking something up, download a postgresql livecd -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Kohei Kaigai
The attached patch enables to abort configure script when we run it with '--with-selinux' option, but libselinux is older than minimum requirement to SE-PostgreSQL. As the documentation said, it needs libselinux-2.0.93 at least, because this or later version support selabel_lookup(3) for

Re: [HACKERS] [GENERAL] Error compiling sepgsql in PG9.1

2011-05-24 Thread Robert Haas
2011/5/24 Kohei Kaigai kohei.kai...@emea.nec.com: The attached patch enables to abort configure script when we run it with '--with-selinux' option, but libselinux is older than minimum requirement to SE-PostgreSQL. As the documentation said, it needs libselinux-2.0.93 at least, because this

[GENERAL] Postgres Triggers instead of requiring a field - fire when field not included

2011-05-24 Thread Kevin Traster
Hello, In Postgres 9.0, trying to prevent a recursive trigger by adding a column notrigger. Psuedo code: create trigger before_update_holdings_table BEFORE UPDATE ON holdings FOR EACH ROW when (new.notrigger is not given) EXECUTE PROCEDURE before_update_holdings(); I see in the docs, I can do

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed (hstore)

2011-05-24 Thread Tom Lane
Stefan Keller sfkel...@gmail.com writes: Hi Tom, hi all Thanks, Tom, for your tipps. You answered 2011/5/1: (...), and there's no point in having the index column contents be the entire tags value (which is what's leading to the failure). Consider create index planet_osm_point_amenity on

[GENERAL] Preventing OOM kills

2011-05-24 Thread Yang Zhang
PG tends to be picked on by the Linux OOM killer, so lately we've been forcing the OOM killer to kill other processes first with this script: while true; do for i in `pgrep postgres`; do echo -17 /proc/$i/oom_adj done sleep 60 done Is there a Better Way? Thanks in advance. -- Sent

Re: [GENERAL] Preventing OOM kills

2011-05-24 Thread Andrej
On 25 May 2011 12:32, Yang Zhang yanghates...@gmail.com wrote: PG tends to be picked on by the Linux OOM killer, so lately we've been forcing the OOM killer to kill other processes first with this script: while true; do  for i in `pgrep postgres`; do    echo -17 /proc/$i/oom_adj  done  

Re: [GENERAL] Preventing OOM kills

2011-05-24 Thread Scott Marlowe
On Tue, May 24, 2011 at 6:50 PM, Andrej andrej.gro...@gmail.com wrote: On 25 May 2011 12:32, Yang Zhang yanghates...@gmail.com wrote: PG tends to be picked on by the Linux OOM killer, so lately we've been forcing the OOM killer to kill other processes first with this script: while true; do  

Re: [GENERAL] Preventing OOM kills

2011-05-24 Thread Devrim GÜNDÜZ
On Tue, 2011-05-24 at 17:32 -0700, Yang Zhang wrote: PG tends to be picked on by the Linux OOM killer, so lately we've been forcing the OOM killer to kill other processes first with this script: while true; do for i in `pgrep postgres`; do echo -17 /proc/$i/oom_adj done sleep

Re: [GENERAL] Preventing OOM kills

2011-05-24 Thread John R Pierce
On 05/24/11 5:50 PM, Andrej wrote: Add more RAM? Look at tunables for other processes on the machine? At the end of the day making the kernel shoot anything out of despair shouldn't be the done thing. somehow, 'real' unix has neither a OOMkiller nor does it flat out die under heavy loads,

[GENERAL] unable to restore. pg_restore: implied data-only restore

2011-05-24 Thread Tim Uckun
I am trying to backup one database and restore it into a new schema in another database. Database1 has the tables in the public schema database2 has some tables in the public schema but their names will clash so the database needs to be stored in a different schema. I back up like this.

Re: [GENERAL] Preventing OOM kills

2011-05-24 Thread Scott Marlowe
On Tue, May 24, 2011 at 7:01 PM, John R Pierce pie...@hogranch.com wrote: On 05/24/11 5:50 PM, Andrej wrote: Add more RAM?  Look at tunables for other processes on the machine?  At the end of the day making the kernel shoot anything out of despair shouldn't be the done thing. somehow,

Re: [GENERAL] unable to restore. pg_restore: implied data-only restore

2011-05-24 Thread Tom Lane
Tim Uckun timuc...@gmail.com writes: I am trying to backup one database and restore it into a new schema in another database. Database1 has the tables in the public schema database2 has some tables in the public schema but their names will clash so the database needs to be stored in a

Re: [GENERAL] unable to restore. pg_restore: implied data-only restore

2011-05-24 Thread Tim Uckun
There is no support for that built into pg_dump.  You could try: That's too bad. * dumping to a text script and doing search-and-replace for the schema name on the script file. I did a dump without privileges or owners so I was thinking I could just replace the SET search_path = public,

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Greg Smith
On 05/24/2011 10:49 AM, Scott Marlowe wrote: On Tue, May 24, 2011 at 8:36 AM, Vick Kheravi...@khera.org wrote: On Tue, May 24, 2011 at 10:33 AM, Scott Marlowescott.marl...@gmail.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it.

Re: [GENERAL] unable to restore. pg_restore: implied data-only restore

2011-05-24 Thread Tom Lane
Tim Uckun timuc...@gmail.com writes: There is no support for that built into pg_dump. You could try: * dumping to a text script and doing search-and-replace for the schema name on the script file. I did a dump without privileges or owners so I was thinking I could just replace the SET

Re: [GENERAL] Postgresql CBT

2011-05-24 Thread Greg Smith
On 05/24/2011 02:05 AM, sade...@yahoo.com wrote: Id like to familiarize with postgresql and looking for a decent CBT but not able to find it. Most PostgreSQL training happens in one of the following ways: -Self-learning using the manual or one of the PostgreSQL books -In-person training at