Re: [SQL] FW: view derived from view doesn't use indexes

2012-07-27 Thread Russell Keane
@postgresql.org Subject: Re: [SQL] FW: view derived from view doesn't use indexes Russell Keane writes: > Using PG 9.0 and given the following definitions: > CREATE OR REPLACE FUNCTION status_to_flag(status character) RETURNS > integer AS $BODY$ ... > $BODY$ > LANGUAGE plpgsql >

Re: [SQL] FW: view derived from view doesn't use indexes

2012-07-26 Thread Tom Lane
Russell Keane writes: > Using PG 9.0 and given the following definitions: > CREATE OR REPLACE FUNCTION status_to_flag(status character) > RETURNS integer AS > $BODY$ > ... > $BODY$ > LANGUAGE plpgsql > CREATE OR REPLACE VIEW test_view1 AS > SELECT status_to_flag(test_table.status) AS flag, > tes

Re: [SQL] FW: Hi

2011-09-11 Thread Craig Ringer
On 11/09/2011 5:22 AM, Mandana Mokhtary wrote: *From:* Mandana Mokhtary *Sent:* 10 September 2011 23:21 *To:* pgsql-sql-ow...@postgresql.org *Subject:* Hi Hi All I tried to import shapfile into postgres using this comand:

Re: [SQL] FW: Hi

2011-09-10 Thread Adrian Klaver
On Saturday, September 10, 2011 2:22:32 pm Mandana Mokhtary wrote: > > From: Mandana Mokhtary > Sent: 10 September 2011 23:21 > To: pgsql-sql-ow...@postgresql.org > Subject: Hi > > Hi All > I tried to import shapfile into postgres using this comand: > > pgsql -c -

Re: [SQL] FW: simple? query

2009-08-18 Thread Tim Landscheidt
Jan Verheyden wrote: > Thanks for the suggestion, the only problem is, if primary key is used then > each row should be unique what is not true; since I have a column > 'registered' what only can be 1 or 0... > [...] I have no idea what you are trying to say. Tim -- Sent via pgsql-sql mail

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread Tom Lane
writes: > the data is insert once, read many so we should be fine on that side. It's not only the insert side where you pay for so many partial indexes. On every query of the table, the planner is going to examine every one of those indexes and determine whether the index is potentially usable. W

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread jacob
09, 2009 11:29 AM To: Jacob Bresciani Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] FW: Query length limitation in postgres server > 8.2.9 writes: > leaf_category_1 Ah. So you are wishing it would use this index: "search_site1_2009_03_13_leaf_category_1" btree (

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread Tom Lane
writes: > leaf_category_1 Ah. So you are wishing it would use this index: "search_site1_2009_03_13_leaf_category_1" btree (leaf_category_1, site_id) WHERE leaf_category_1 IS NOT NULL If I were you I'd drop the WHERE clause, which is eliminating no index entries whatsoever (since the c

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread jacob
Being just the server admin I'll forward this thought on to the dev's for consideration. -Original Message- From: Hartman, Matthew [mailto:matthew.hart...@krcc.on.ca] Sent: Thursday, July 09, 2009 10:58 AM To: Jacob Bresciani; pgsql-sql@postgresql.org Subject: RE: [SQL] FW: Qu

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread jacob
Good think I obfuscated it in one place eh :) leaf_category_1 -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thursday, July 09, 2009 11:14 AM To: Jacob Bresciani Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] FW: Query length limitation in postgres server

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread Tom Lane
writes: > \d search_site1_2009_03_13 And "MyColumn1" is really which column? regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread jacob
tree (leaf_category_1, site_id) WHERE leaf_category_1 IS NOT NULL "search_site1_2009_03_13_seller_user_id" btree (seller_user_id, site_id) WHERE seller_user_id IS NOT NULL "search_site1_2009_03_13_upc_code" btree (upc_code, site_id) WHERE upc_code IS NOT NULL -Origi

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread Tom Lane
writes: > I've simplified the query to make it easier to look at. We need to see the table/index declarations. The query by itself is just about useless. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscriptio

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread Hartman, Matthew
> From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of ja...@aers.ca > Sent: Thursday, July 09, 2009 1:53 PM > > I've simplified the query to make it easier to look at. > > This one doesn't use the index's and therefore takes about 11713ms to > return. Hav

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-09 Thread jacob
I've simplified the query to make it easier to look at. This one doesn't use the index's and therefore takes about 11713ms to return. EXPLAIN ANALYZE SELECT * FROM MyTable1 where (MyColumn1 IN (4305,112798,112799,112800,112801,112802,112803,112804,112770,112771,112772,112773,112774,112775, 112776

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-07 Thread Tom Lane
Greg Stark writes: > On Tue, Jul 7, 2009 at 11:33 PM, wrote: >> After some investigation it seems that the new server is refusing to use the >> index's but if I >> limit the number of arguments in the latter part of the statement to 100 >> then it works as >> expected in the expected amount of

Re: [SQL] FW: Query length limitation in postgres server > 8.2.9

2009-07-07 Thread Greg Stark
On Tue, Jul 7, 2009 at 11:33 PM, wrote: > After some investigation it seems that the new server is refusing to use the > index's but if I > limit the number of arguments in the latter part of the statement to 100 then > it works as > expected in the expected amount of time using the indexs. Ugh

Re: [SQL] FW: Help- post gress sql error

2008-09-10 Thread Tom Lane
"Kota, Prasoona" <[EMAIL PROTECTED]> writes: > I am receiving the following error when trying to execute sql > Error: ERROR: ExecSubPlan: failed to find placeholder for subplan What Postgres version is that? If it's not a current minor release, please try updating, because I seem to remember hav

Re: [SQL] Fw: How to FindNearest

2006-10-03 Thread Bruno Wolff III
On Tue, Oct 03, 2006 at 17:35:55 +, [EMAIL PROTECTED] wrote: > > My function will take all the above info about the hole and down_hole_survey > tables, and sample.hole_id and sample.depth_meters and will calculate the > coordinates. I need to put these coordinates into sample.x , sample.y

Re: [SQL] FW: help with serial

2005-06-20 Thread Richard Huxton
Luca Rasconi wrote: CREATE OR REPLACE RULE r1 AS ON INSERT TO TABLE_A DO INSERT INTO TABLE_B (uid) VALUES ((new.uid)); how is it possible, why in a table 37 and in the other 37 + 1? This is almost certainly the "nextval() evaluated twice" issue that catches everyone out from time t

Re: [SQL] FW: Working with XML.

2005-02-22 Thread Mirko Zeibig
Theo Galanakis wrote: Hi, I have copied all the files manually from http ://developer.postgresql.org/docs/pgsql/contrib/ for the xml2 contribution. However I have the following issue when I attempt to compile with gmake: gcc -I/usr/includ

Re: [SQL] FW: "=" operator vs. "IS"

2004-07-01 Thread Jeff Boes
I'm just curious - why is it not possible to use the "=" operator to compare values with NULL? I suspect that the SQL standard specified it that way, but I can't see any ambiguity in an expression like "AND foo.bar = NULL". Is it because NULL does not "equal" any value, and the expression should b

Re: [SQL] Fw: postgres logging [SOLVED]

2004-01-23 Thread Stef
Stef mentioned : => The postmaster logs to a separate log file, but at the moment => it's impossible to tell which sql comes from which connection. => Is there an easy way to accomplish this? Erm... sorry , It appears my postgresql.conf is not an original. It didn't have the log_pid option in. :)

Re: [SQL] Fw: Error message during compressed backup

2003-10-23 Thread Richard Huxton
On Thursday 23 October 2003 10:57, Kumar wrote: > Dear Friends, > > While doing compressed backup for one of the database running at Postgres > Server 7.3.4 on RH Linux 7.2, I got the following error., but it backup > other items > > --Command to backup > $ $ pg_dump -h 192.xxx.x.xxx -p 5432 -v tes

Re: [SQL] Fw: Transactions ID

2003-09-05 Thread Richard Huxton
On Friday 05 September 2003 08:10, Yaroslav Ulyanov wrote: > Hello. > > You may prompt me, what get the identifier to transactions? Not entirely sure what you're after, but does chapter 2.2 of the manuals - "System Columns" help you? -- Richard Huxton Archonet Ltd -

Re: [SQL] Fw: Change column data type

2003-09-04 Thread scott.marlowe
On Tue, 2 Sep 2003, Kumar wrote: > > Dear Friends, > > Using Postgres 7.3.4 over the linux server 7.3. > > Is it possible to alter/change the data type of a existing table's > column, with out dropping and recreating a column of same name. Only for certain types, and only by hacking the syst

Re: [SQL] Fw:

2003-02-21 Thread Daniel Schuchardt
Your ipc-daemon-version is to old. Download the newest version first. (1.13) Daniel ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] FW: query problem "server sent binary data ... without

2002-09-26 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Thu, 26 Sep 2002 [EMAIL PROTECTED] wrote: >> the query runs for 10 minutes or so, then outputs: > How much data is that sending? The client library is going to try to > buffer the entire result set. And, in fact, this is the typical behavior when i

Re: [SQL] FW: query problem "server sent binary data ... without

2002-09-26 Thread Stephan Szabo
On Thu, 26 Sep 2002 [EMAIL PROTECTED] wrote: > I'm having a problem with postgres on HPUX. My version is: > > VERSION = 'PostgreSQL 7.2.2 on hppa2.0w-hp-hpux11.11, > compiled by aCC -Ae' > > I'm trying to do a query and it consistently gives the > followi