Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-15 Thread Igor Neyman
, statecode FROM WildLife WHERE state_pt = ' || statecode INTO ...; See: http://www.postgresql.org/docs/8.4/interactive/plpgsql-statements.html Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] How do you change the size of the WAL files?

2011-03-14 Thread Igor Neyman
out of topic, but a small correction here: Oracle's analog of WAL files is RedoLog files, and they rollback segments (or newer UNDO tablespace) is separate from RedoLog files. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] sort mem: size in RAM vs size on Disk

2011-03-11 Thread Igor Neyman
memory area called temp_buffers, try to play with this configuration parameter. And, yes there is a 1GB files size limit (not only for temp files), that's why you see .1, .2, ... In the file names. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Why count(*) doest use index?

2011-03-08 Thread Igor Neyman
Indexes don't maintain counts, indexes maintain pointers to the table records. What you need is materialized view storing aggregates. And it looks like you already have it with your triggers. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] why is there no TRIGGER ON SELECT ?

2011-02-22 Thread Igor Neyman
... Which PG creates automatically (behind the scene), when view is created. Is there a way, or did anyone try to modify this Rule? It is after all DO INSTEAD Rule. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Crosstab query on huge amount of values

2011-01-17 Thread Igor Neyman
report. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Concatenating several rows with a semicolon

2010-12-28 Thread Igor Neyman
for any hints Alex Based on your PG version there are different solutions to your problem. Not to re-invent the wheel, check this article: http://www.postgresonline.com/journal/archives/191-String-Aggregation-in -PostgreSQL%2C-SQL-Server%2C-and-MySQL.html%23extended Regards, Igor Neyman -- Sent

Re: [GENERAL] How to obtain the maximum value of a date, between 3 tables...

2010-12-08 Thread Igor Neyman
, ha.last_refresh_date as d3 from tbl1 a join tbl2 ae on a.id_anuncio_externo = ae.id_anuncio_externo join tbl3 ha on a.id_anuncio_externo = ha.id_anuncio_externo) q; should do it. Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] REINDEX requirement?

2010-11-09 Thread Igor Neyman
. It's part of pgstattupple contrib module - read it up in the docs. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Return key from query

2010-11-03 Thread Igor Neyman
given a solution: INSERT with RETURNING clause. Check PG documentation regarding this clause. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] how to write an optimized sql with two same subsql?

2010-10-15 Thread Igor Neyman
FROM gr_counts C, gr_counts D WHERE D.groupid C.groupid AND D.count C.count; This will execute: SELECT groupid, COUNT(*) AS CNT FROM A GROUP BY groupid only once. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] problem with PG install script on Windows

2010-10-13 Thread Igor Neyman
From: Ashesh Vashi [mailto:ashesh.va...@enterprisedb.com] Sent: Wednesday, October 13, 2010 1:32 AM To: Igor Neyman Cc: pgsql-general@postgresql.org; Dave Page Subject: Re: [GENERAL] problem with PG install script

Re: [GENERAL] are there any method that Update command not affect other unrelated indices?

2010-10-13 Thread Igor Neyman
indices need to be updated, because Postgres does not do upgrade in place, like some other databases do. When any column is updated, new version of the row created and the old one marked as deleted. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] problem with PG install script on Windows

2010-10-12 Thread Igor Neyman
, so please correct me if my code modification is wrong. Regards, Igor Neyman

Re: [GENERAL] 8.1 Table partition and getting error

2010-10-07 Thread Igor Neyman
(NEW.*); DELETE FROM crm_active WHERE crmid = NEW.crmid; RETURN NULL; -- so that that trigger doesn't proceed with UPDATE on crm_active table ELSE RETURN (NEW.*); END IF; END; $$ LANGUAGE plpgsql; Regards, Igor Neyman -- Sent via pgsql-general mailing list

Re: [GENERAL] Prepared statements and unknown types

2010-09-30 Thread Igor Neyman
IRC (freenode): dark_ixion Registered Linux user: #516935 Sorry, for being late to this conversation. Possibly it works for SQL Server, because SS has SQL_VARIANT data type (kind of anytype). Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Scaling PostgreSQL-9

2010-09-28 Thread Igor Neyman
only Stand by slave to remove overhead caused by slony due to triggers (also the slave was always lagging in case of bulkloads on master) in the hope of speeding up the process. Any help would be much appriciated ... With Regards sandy Regards, Igor Neyman -- Sent via pgsql

Re: [GENERAL] Preserving order through an inner join

2010-09-27 Thread Igor Neyman
table1 GROUP BY field1, field2 ORDER BY field1) AS q1 INNER JOIN table2 ON ( ... ) Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Table update problem works on MySQL but not Postgres

2010-09-01 Thread Igor Neyman
of fixing it. However, I wanted to share this little tidbit with the PostgreSQL community. Raymond What you need for your update to work is deferred unique constraints. I think, this feature appears in 9.0. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Windows 2003 server installation issue

2010-08-18 Thread Igor Neyman
of Administrators group. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Nodes and trees...

2010-08-03 Thread Igor Neyman
across the most popular SQL databases. I also explicitly don't want to create an extra tree ID or something like that, because it only mitigates the problem of anomalies, but does not solve it. Thanks in advance, Jason. Look up connectby() in tablefuncs contrib module. Regards, Igor

[GENERAL] 8.4 backpatching

2010-08-02 Thread Igor Neyman
backpatching 8.4, when 9.0 Beta3 was released. So, backpatched to 8.4 - does it mean that we can expect new 8.4 release (8.4.5) that will include these patches in near future? And if yes, then - when? Will it coinside with 9.0 release? Thank you in advance, Igor Neyman

Re: [GENERAL] Create table if not exists ... how ??

2010-07-19 Thread Igor Neyman
different from what OP asked. Jen wants to avoid getting error on CREATE TABLE in case her table already exists (but proceed with CREATE TABLE, if it doesn't). What you suggest, will drop the table (IF EXISTS), and then create it anew - what if there is already data in the table? Regards, Igor Neyman

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-08 Thread Igor Neyman
'postgres', instead of the PostgreSQL-specific application data folder (f.e., C:\PostgreSQL\8.4\data). It results in some unexpected bugs. Could you please be more specific in describing what problems are you seeing on Win7? Regards, Igor Neyman What files are being created

Re: [GENERAL] Problems with Vista and Windows 7

2010-07-07 Thread Igor Neyman
\PostgreSQL\Installations\postgresql-8.4 folder? Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgres user password: Log on failure

2010-06-29 Thread Igor Neyman
-Original Message- From: dario@libero.it [mailto:dario@libero.it] Sent: Tuesday, June 29, 2010 3:38 AM To: vibhor.ku...@enterprisedb.com; Igor Neyman Cc: pgsql-general@postgresql.org Subject: R: Re: [GENERAL] postgres user password: Log on failure Hi guys, Thanks

Re: [GENERAL] postgres user password: Log on failure

2010-06-28 Thread Igor Neyman
it... I spent quite some time to find out out to fix this log on failure). Dario Does this XP has a policy set up, that requires every login to change it's password every so often (say 30 days, or whatever)? If so, exclude postgres account from this policy. Regards, Igor Neyman -- Sent via

Re: [GENERAL] default ordering of query result - are they always guarantee

2010-05-20 Thread Igor Neyman
-Original Message- From: Scott Marlowe [mailto:scott.marl...@gmail.com] Sent: Wednesday, May 19, 2010 4:15 AM To: A. Kretschmer Cc: pgsql-general@postgresql.org Subject: Re: default ordering of query result - are they always guarantee ...

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Igor Neyman
. drop original table 4. rename intermediate table to original name 5. re-created required indexes (and any other objects dependent on this table) Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Igor Neyman
Will 9.0 also have 64-bit ODBC driver? Igor Neyman -Original Message- From: Dave Page [mailto:dp...@pgadmin.org] Sent: Wednesday, May 12, 2010 11:34 AM To: Igor Neyman Cc: Luis Guillermo Dangel; pgsql-general@postgresql.org Subject: Re: Question about Beta for Windows 64 bits

Re: [GENERAL] can function arguments have the type tablename.columnname%TYPE?

2010-05-12 Thread Igor Neyman
(arg1 table.column%TYPE ... Which, AFAICT, is not possible. It is definetily possible, i.e: CREATE OR REPLACE FUNCTION myMaxCycle(i_n_Cell_id GP_CELL.cell_id%TYPE) RETURNS GP_CYCLE.cycle_date_time%TYPE AS $$... Works in my 8.2 PG. Regards, Igor Neyman -- Sent via pgsql-general mailing list

Re: [GENERAL] Weird unique constraint

2010-05-12 Thread Igor Neyman
not violate uniqueness of your constraint. Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-12 Thread Igor Neyman
on. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company Dave, Are there any plans to build 8.4... As 64 bit for Windows? Regards, Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] join two tables without a key

2010-04-05 Thread Igor Neyman
entity/rule you are trying to implement here, it'll be easier to help you. Igor Neyman -Original Message- From: Dino Vliet [mailto:dino_vl...@yahoo.com] Sent: Saturday, April 03, 2010 7:32 AM To: r...@iol.ie Cc: pgsql-general@postgresql.org Subject: Re: join two tables without a key

Re: [GENERAL] 1-Click installer problems

2010-04-02 Thread Igor Neyman
See attached attached OneClick_PG_Installer notes. Igor Neyman -Original Message- From: John Gage [mailto:jsmg...@numericable.fr] Sent: Friday, April 02, 2010 3:44 AM To: sachin.srivast...@enterprisedb.com Cc: pgsql-general@postgresql.org Subject: Re: 1-Click installer problems

Re: [GENERAL] Auto VACUUM

2010-03-03 Thread Igor Neyman
What's the complete error message? Vacuum is using maintenance_work_mem. What is your setting maintenance_work_mem compared to your RAM size. Igor Neyman -Original Message- From: akp geek [mailto:akpg...@gmail.com] Sent: Wednesday, March 03, 2010 1:10 PM To: Joao Ferreira gmail

[GENERAL] Threads limit for postmaster

2010-02-26 Thread Igor Neyman
reference to this fix beeing backported into 8.2. So, was it or was it not backported into 8.2.5? Magnus, sorry for sending this message to you directly (as well as to the list), but it's a really hot issue for me. Regards, Igor Neyman

Re: [GENERAL] select t.name from tbl t (where name is not a column name)

2010-02-24 Thread Igor Neyman
Joe, What PG version are running? 8.2 here complains when running your example: ERROR: column foo.name does not exist LINE 6: select foo.name from foo; ^ ** Error ** ERROR: column foo.name does not exist SQL state: 42703 Igor Neyman -Original Message

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Igor Neyman
When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare apples and oranges? Igor Neyman -Original Message- From: Yang Zhang [mailto:yanghates...@gmail.com] Sent: Monday, February 22, 2010 1:37 PM To: Richard

Re: [GENERAL] help with SQL join

2010-02-12 Thread Igor Neyman
sales as s WHERE s.modelnumber LIKE 'GH77%') AS results JOIN customers as c ON (results.customerid = c.customerid) GROUP BY results.customerid, c.customername Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Postgres Triggers issue

2010-02-11 Thread Igor Neyman
return NEW, not NULL (OLD - for on delete trigger): CREATE OR REPLACE FUNCTION r.m_t() RETURNS trigger AS $BODY$ BEGIN INSERT INTO temp_m_t VALUES (NEW.*,1+1); RETURN NEW; END; $BODY$ LANGUAGE 'plpgsql'; Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Igor Neyman
IT. ** Original poster asked for the sql that will touch inventory table only once. Your statement (with 3 subqueries) will do it 3 times. Igor Neyman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] relation between records in main and toast tables

2010-01-27 Thread Igor Neyman
Hello, Let's say TableA has toastable column, the contents of this column is stored in let's say pg_toast_1234. Is there a query to find which records (chunk_id, chunk_seq) in pg_toast_1234 store data for specific record in TableA (i.e. with PK column value eq. '567')? Igor Neyman

[GENERAL] excluding tables from VACUUM ANALYZE

2008-10-30 Thread Igor Neyman
This question didn't get any traction on admin list, so I'll try here: I want to analyze the entire database with the exception of several tables. When I run VACUUM ANALYZE (or vacuumdb -z) on the database, how can I exclude specific tables from being analyzed? Is there any place in system

Re: [GENERAL] That was easy

2008-10-02 Thread Igor Neyman
objective. Igor Neyman -Original Message- From: Gauthier, Dave [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2008 11:14 PM To: pgsql-general@postgresql.org Subject: That was easy I just ported my whole DB instance, 4 db's inside with roles, triggers, stored procedures, etc... from

Re: [GENERAL] Strange query plan

2008-08-14 Thread Igor Neyman
-Original Message- From: Dmitry Teslenko [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 6:57 AM To: pgsql-general@postgresql.org Subject: Strange query plan Hello! I have following table: CREATE TABLE table1 ( field1 INTEGER NOT NULL, field2 INTEGER NOT

Re: [GENERAL] Create Table Dinamic

2008-08-07 Thread Igor Neyman
Read about dynamic sql in Postgres documentation (EXECUTE statement): http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html Igor -Original Message- From: Anderson dos Santos Donda [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 9:10 PM To:

Re: [GENERAL] A plpgsql unidentifiable problem.

2008-06-20 Thread Igor Neyman
Easy: you've got 3 Ifs without END IF: IF uppergt = 'BOD' THEN RETURN 0 ; IF uppergt = 'MOD' THEN RETURN 86400/2 ; IF uppergt = 'EOD' THEN RETURN 86399 ; Igor -Original Message- From: Ralph Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 3:19 PM To:

Re: [GENERAL] [ADMIN] Postgres VS Oracle

2007-06-18 Thread Igor Neyman
This document: http://www-css.fnal.gov/dsg/external/freeware/mysql-vs-pgsql.html could answer some of your questions. Igor From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Tokmatchi Sent: Monday, June 18, 2007 11:55 AM To: [EMAIL

<    1   2   3