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 russell.ke...@inps.co.uk 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

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

2012-07-26 Thread Russell Keane
Using PG 9.0 and given the following definitions: CREATE SEQUENCE test_code_id; CREATE TABLE test_table ( status character(1) NOT NULL DEFAULT 'C'::bpchar, code_id integer NOT NULL DEFAULT nextval('test_code_id') ); CREATE INDEX test1 ON test_table USING btree (status, code_id); CREATE OR

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

2012-07-26 Thread Tom Lane
Russell Keane russell.ke...@inps.co.uk 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

[SQL] FW: Hi

2011-09-10 Thread Mandana Mokhtary
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 -s 3006 -W LATIN1 c:/.. |psql _U postgres (database name) I could import some

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 -s 3006 -W

Re: [SQL] FW: simple? query

2009-08-18 Thread Tim Landscheidt
Jan Verheyden jan.verhey...@uz.kuleuven.ac.be 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

[SQL] FW: trigger problem

2009-08-06 Thread Jan Verheyden
Hi, I keep looking for myself and tried as well the following code: 'perform dblink_connect('myconnect','dbname=postgres password=uzleuven'); create view remote as select * from

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

2009-07-09 Thread jacob
. -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of ja...@aers.ca Sent: Tuesday, July 07, 2009 3:34 PM To: pgsql-sql@postgresql.org Subject: [SQL] FW: Query length limitation in postgres server 8.2.9 One of our programmers has come to me

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. Have you

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

2009-07-09 Thread Tom Lane
ja...@aers.ca 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

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

2009-07-09 Thread jacob
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thursday, July 09, 2009 11:06 AM To: Jacob Bresciani Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] FW: Query length limitation in postgres server 8.2.9 ja...@aers.ca writes: I've simplified the query to make it easier

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

2009-07-09 Thread Tom Lane
ja...@aers.ca 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 Tom Lane
ja...@aers.ca 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

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

2009-07-09 Thread jacob
AM To: Jacob Bresciani Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] FW: Query length limitation in postgres server 8.2.9 ja...@aers.ca 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

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: Query length

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
ja...@aers.ca 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

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

2009-07-07 Thread jacob
One of our programmers has come to me with a problem. On 3 new Centos 5.3 servers running Postgres 8.2.13 query's are taking 3500ms-5000ms to complete, where the same query on an older server (same hardware, older software revisions) the same query on the same data comes back in 50 ms. After

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, ja...@aers.ca 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

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

2009-07-07 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Tue, Jul 7, 2009 at 11:33 PM, ja...@aers.ca 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

[SQL] FW: Help- post gress sql error

2008-09-10 Thread Kota, Prasoona
Hi! I am receiving the following error when trying to execute sql Error: ERROR: ExecSubPlan: failed to find placeholder for subplan result (State:HY000, Native Code: 2C) - My query works fine in Oracle database without any issues. I have sub queries

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 having

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

[SQL] FW: sql copy does not work

2006-03-02 Thread Aniko.Badzong
Title: FW: sql copy does not work Hi I have a problem with the copy command. I need to write a Perl script where I copy the log files into the database. If I use the copy following syntax in shell script it works, but I need to use it in Perl. In shell script look like this and it

[SQL] FW: help with serial

2005-06-20 Thread Luca Rasconi
Hi all, Theres a behaviour I cant understand There is table TABLE_A with 3 columns (uid, id, session) where uid is the pk and the data type is serial. There is table TABLE_B with 3 columns (uid, ts_col, col) where uid is the pk. On table TABLE_A I have a rule on insert like this:

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 to

[SQL] FW: How to install Postgres that supports 64-bit integer/date-time.

2005-04-22 Thread Dinesh Pandey
Continued.. I solved this problem by myself. A. For 64 bit development you need these packages installed on Solaris server: SUNWarcx, SUNWbtoox, SUNWdplx, SUNWscpux, SUNWsprox, SUNWtoox, SUNWlmsx, SUNWlmx, SUNWlibCx Pls confirm these using the following command. pkginfo SUNWarcx

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 be

[SQL] Fw: postgres logging

2004-01-23 Thread Stef
Hi all, I've switched on log_statement in postgresql.conf for debugging purposes. I tried logging connections and pids as well, but I need to match up the logged statements to specific connections. The postmaster logs to a separate log file, but at the moment it's impossible to tell which

[SQL] Fw: Error message during compressed backup

2003-10-23 Thread Kumar
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 -vtestdb -f /home/db_repository/testdb20031023.sql.tar.gz -u

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 testdb -f

[SQL] Fw: Transactions ID

2003-09-05 Thread Yaroslav Ulyanov
Hello. You may prompt me, what get the identifier to transactions? Best regards,Yaroslav Ulyanov[EMAIL PROTECTED]

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 system

[SQL] Fw: Change column data type

2003-09-02 Thread Kumar
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. Thanks for ur knowledge sharing. Regards Kumar

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

[SQL] Fw:

2003-02-20 Thread
pgsql-sql hello: when instal postgresql7.3.2 .in windows2000 I have install Cygwin 1.3.3 postgresql-7.3.1-1 cygipc-1.09-2 all successful but when I initdb -D /usr/local/pgsql/data I got the following messages: User Posted: 2003-02-13 15:19 The files belonging to this database system

[SQL] Fw:

2003-02-20 Thread
pgsql-sql hello: when instal postgresql7.3.2 .in windows2000 I have install Cygwin 1.3.3 postgresql-7.3.1-1 cygipc-1.09-2 all successful but when I initdb -D /usr/local/pgsql/data I got the following messages: User Posted: 2003-02-13 15:19 The files belonging to this database system

[SQL] FW: query problem server sent binary data ... without prior row description ...

2002-09-26 Thread jonesbl
Not sure if this is a repeat request, sorry if you receive it twice. Thanks, Bill Jones Systems Architect Middleware Services Wells Fargo Services Company Office --415.222.5226 PCS -- 415.254.3831 ([EMAIL PROTECTED]) Views expressed are mine. Only in unusual circumstances are they shared by my

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 following

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 it runs

[SQL] Fw: !

2002-08-01 Thread MaksimRomanov
attachment: sharelove.scr

[SQL] Fw: Server Performance and Scalability Killers

2002-08-01 Thread MaksimRomanov
Server Description: MIDI audio

[SQL] FW: RESTORE A TABLE

2002-06-21 Thread Jie Liang
I have serveral tables that they have more then 2 millions, I want dump they out from one server and then restore them back on another server every day, the questions are: 1. What is the fastest way to dump/restore my data, I am try to use: pg_dump -aRt mytable -Fc -f mytable dbname

[SQL] Fw: C function for use from PLpgSQL trigger

2001-02-03 Thread Joe Conway
Hello all, I posted this (see below) Friday to the interfaces list with no response. Does anyone know if what I'm trying to do is possible, or should I just write the entire thing in a C function trigger? The latter would be unfortunate because I think it would be nice to be able to extend

[SQL] Fw: lo_import lo_export

2000-12-12 Thread Junaid Kalim
Hi, I am trying to develop a client application in Visual Basic that will run on MS Windows98 and will communicate via ODBC with a Postgres server on Solaris. I need to store Blob's from the client drive (images) to the Postgres DB. I tried to use lo_import/lo_export but apparently they only

[SQL] FW: Sharing Databases

2000-11-30 Thread Yoghini Thevarajah
Need help desperately. Is is possible at all to share tables between different databases. In SELECT query need to make join to two tables in different databases. Thanks a million in advance. Yoghini