Re: [GENERAL] Search for lists

2011-06-19 Thread Gavin Flower
[...] I need to search a table to find sets of rows that have a column matching itself for the whole set and another column matching row for row with a list I am going to supply. The result I should receive should be value of the column that matches itself. [...] How about: DROP TABLE

Re: [GENERAL] unique across two tables

2011-06-22 Thread Gavin Flower
), is_aliasboolean DEFAULT true NOT NULL, name character varying(50) NOT NULL, UNIQUE (country_region_fk, name) ); Cheers, Gavin Flower

Re: [GENERAL] An amusing MySQL weakness--not!

2011-06-26 Thread Gavin Flower
On 26/06/11 16:44, Michael Nolan wrote: Earlier today I was working on a MySQL database (not by choice, I assure you), and I typed a statement like this: Update tablexyz set field1 = '15' where field2 - 20; The '-' was supposed to be an equal sign, but MySQL executed it anyway. (Field2 is

Re: [GENERAL] unique across two tables

2011-06-26 Thread Gavin Flower
On 23/06/11 23:28, Tarlika Elisabeth Schmitz wrote: Hello Gavin, On Wed, 22 Jun 2011 20:53:19 +1200 Gavin Flowergavinflo...@archidevsys.co.nz wrote: [...] This design ensures that: names of towns are unique within a given country andregion. Note you will still need business logic, in a

Re: [GENERAL] Finding latest record for a number of groups in an INSERT-only table

2011-07-05 Thread Gavin Flower
On 05/07/11 11:48, Daniel Farina wrote: This is basically exactly the same as http://archives.postgresql.org/pgsql-sql/2008-10/msg9.php; I'm just asking again, to see if thinking on the problem has changed: The basic problem, restated, is one has a relation with tuples like this: (key,

Re: [HACKERS] [GENERAL] Creating temp tables inside read only transactions

2011-07-08 Thread Gavin Flower
On 08/07/11 18:21, Darren Duncan wrote: Jeff Davis wrote: On Thu, 2011-07-07 at 20:56 -0700, Darren Duncan wrote: When you create a temporary table, PostgreSQL needs to add rows in pg_class, pg_attribute, and probably other system catalogs. So there are writes, which aren't possible in a

Re: [GENERAL] Programmer ( Postgres), Milwaukee - offsite-Remote - onsite

2011-07-19 Thread Gavin Flower
On 19/07/11 09:58, MS Rao wrote: *Programmer ( Postgres), Milwaukee -- offsite-Remote - onsite* We are looking for Postgres skilled programmer with the following skills: Skills: Strong in Postgres SQl , Set up of database, Linux RDBMS expert and strong in design Possible to work onsite

Re: [GENERAL] Book

2011-07-20 Thread Gavin Flower
On 21/07/11 10:45, Andrej wrote: Thanks all - book ordered :} I wonder how much Greg has spent in bribes??? :-) More seriously: I intend going through my copy in depth to get a better unbderstanding of pg. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] replacing a subquery with an outer join?

2011-07-21 Thread Gavin Flower
On 22/07/11 13:20, Chris Curvey wrote: in an earlier thread, the following query was submitted: SELECT COUNT(*) FROM q WHERE NOT EXISTS (SELECT 1 FROM t AS t WHERE t.mid = q.mid); and as part of his answer, David Johnson

Re: [GENERAL] Implementing thick/fat databases

2011-07-23 Thread Gavin Flower
On 23/07/11 12:05, John R Pierce wrote: On 07/22/11 4:11 PM, Darren Duncan wrote: Karl Nack wrote: I've been following a few blogs (http://database-programmer.blogspot.com/, http://thehelsinkideclaration.blogspot.com/) that make a very compelling argument, in my opinion, to move as much

Re: [GENERAL] Implementing thick/fat databases

2011-07-24 Thread Gavin Flower
On 24/07/11 17:51, Chris Travers wrote: I was thinking similar thoughts, but you not only beat me to it, you made some good points I had not thought of! The only thing I can think of adding: is that it would be good to lock down the database so that only the middleware can access it, everything

Re: [GENERAL] Finding referecing and referenced tables, adaptation from David Fetter's solution

2011-07-30 Thread Gavin Flower
On 30/07/11 10:45, bricklen wrote: [...] CREATE OR REPLACE VIEW table_dependencies AS ( WITH RECURSIVE t AS ( SELECT c.oid AS origin_id, c.oid::regclass::text AS origin_table, c.oid AS referencing_id, c.oid::regclass::text AS referencing_table,

Re: [GENERAL] Finding referecing and referenced tables, adaptation from David Fetter's solution

2011-07-30 Thread Gavin Flower
On 30/07/11 10:45, bricklen wrote: A coworker of mine* was looking for a way to quickly and easily be able to tell which tables were referencing particular table(s) she wanted to load (for unit testing). Using the examples from David Fetter**, she submitted a revised version that seems to work

Re: [GENERAL] Finding referecing and referenced tables, adaptation from David Fetter's solution

2011-07-30 Thread Gavin Flower
On 30/07/11 10:45, bricklen wrote: A coworker of mine* was looking for a way to quickly and easily be able to tell which tables were referencing particular table(s) she wanted to load (for unit testing). Using the examples from David Fetter**, she submitted a revised version that seems to work

Re: [GENERAL] Finding referecing and referenced tables, adaptation from David Fetter's solution

2011-07-31 Thread Gavin Flower
On 31/07/11 21:42, Alban Hertroys wrote: On 30 Jul 2011, at 12:17, Gavin Flower wrote: CREATE OR REPLACE VIEW table_dependencies AS ( WITH RECURSIVE t AS ( SELECT c.oid AS origin_id, c.oid::regclass::text AS origin_table, c.oid AS referencing_id, c.oid

Re: [GENERAL] Finding referecing and referenced tables, adaptation from David Fetter's solution

2011-07-31 Thread Gavin Flower
On 31/07/11 21:36, Alban Hertroys wrote: On 30 Jul 2011, at 13:49, Gavin Flower wrote: On 30/07/11 10:45, bricklen wrote: [...] CREATE OR REPLACE VIEW table_dependencies AS ( WITH RECURSIVE t AS ( SELECT c.oid AS origin_id, c.oid::regclass::text AS origin_table

Re: [GENERAL] Using Postgresql as application server

2011-08-14 Thread Gavin Flower
On 14/08/11 05:12, David Johnston wrote: On Aug 13, 2011, at 11:57, c kshreeseva.learn...@gmail.com wrote: Dear Postgres users, from last few months I am reading and searching for can postgresql used as application server? As postgresql supports many languages like pl/perl, pl/python etc,

Re: [GENERAL] Has Pg 9.1.0 been released today?

2011-09-12 Thread Gavin Flower
On 12/09/11 20:44, Magnus Hagander wrote: On Mon, Sep 12, 2011 at 10:40, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 12/09/11 20:31, Magnus Hagander wrote: On Mon, Sep 12, 2011 at 10:10, Toby Corkindale toby.corkind...@strategicdata.com.auwrote: http://www.postgresql.org/docs

Re: [GENERAL] Has Pg 9.1.0 been released today?

2011-09-12 Thread Gavin Flower
On 12/09/11 20:31, Magnus Hagander wrote: On Mon, Sep 12, 2011 at 10:10, Toby Corkindale toby.corkind...@strategicdata.com.au wrote: http://www.postgresql.org/docs/9.1/static/release-9-1.html contains the line: Release Date: 2011-09-12 *bounces excitedly* Has the release candidate gone final

Re: [GENERAL] Has Pg 9.1.0 been released today?

2011-09-12 Thread Gavin Flower
On 13/09/11 01:58, Devrim GÜNDÜZ wrote: On Mon, 2011-09-12 at 20:40 +1200, Gavin Flower wrote: Not yet. But we are planning to put it out, and we need to load the website documentation ahead of time. Then how come was put on the download page over 24 hours ago? I already have it installed

Re: [GENERAL] ts_rank error/result of '1e-020'

2011-10-06 Thread Gavin Flower
On 07/10/11 10:56, Henry Drexler wrote: On Thu, Oct 6, 2011 at 4:37 PM, Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz wrote: On 07/10/11 01:40, Henry Drexler wrote: I have a workaround to the error/result, but am wondering what

Re: [GENERAL] Selecting All Columns Associated With Maximum Value of One Column

2011-10-06 Thread Gavin Flower
On 07/10/11 03:03, Rich Shepard wrote: On Thu, 6 Oct 2011, David Johnston wrote: Missing the FROM before chemistry D'oh! Obviously not yet sufficiently cafinated this morning. [...] You just infringed my patent on making unprovoked stupid mistakes in posts to the Pg mailing lists! I

Re: [GENERAL] how to find primary key field name?

2011-10-12 Thread Gavin Flower
On 12/10/11 11:54, J.V. wrote: If I have a table name, I know how to find the primary key constraint name, but see no way to find the primary key field name. select constraint_name from information_schema.tabale_constraints where table_name = table_name and constraint_type = 'PRIMARY KEY';

Re: [GENERAL] how to find primary key field name?

2011-10-12 Thread Gavin Flower
On 12/10/11 11:54, J.V. wrote: If I have a table name, I know how to find the primary key constraint name, but see no way to find the primary key field name. select constraint_name from information_schema.tabale_constraints where table_name = table_name and constraint_type = 'PRIMARY KEY';

Re: [GENERAL] Dynamic sql real examples

2011-10-13 Thread Gavin Flower
On 13/10/11 18:44, Gabriel Filipiak wrote: 2011/10/13 Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz On 13/10/11 18:35, Gabriel Filipiak wrote: Thx Gavin, any other suggestions from others? Gabe 2011/10/13 Gavin Flower gavinflo

Re: [GENERAL] Dynamic sql real examples

2011-10-13 Thread Gavin Flower
On 13/10/11 17:55, Gabriel Filipiak wrote: Hi all, I have lately learned what is dynamic sql and one of the most interesting features of it to me is that we can use dynamic columns names and tables. But I cannot think about useful real life examples. The only one that came into my mind is

Re: [GENERAL] Saving score of 3 players into a table

2011-10-26 Thread Gavin Flower
On 26/10/11 08:32, Alexander Farber wrote: Hello, I'm trying to save results of card game with 3 players into a table. It is bad enough, that I had to introduce 3 columns for user ids: id0, id1, id2 and 3 columns for their scores: money0, money1, money2 - create table pref_results (

Re: [GENERAL] Saving score of 3 players into a table

2011-10-26 Thread Gavin Flower
On 26/10/11 08:32, Alexander Farber wrote: Hello, I'm trying to save results of card game with 3 players into a table. It is bad enough, that I had to introduce 3 columns for user ids: id0, id1, id2 and 3 columns for their scores: money0, money1, money2 - create table pref_results (

Re: [GENERAL] All and ANY

2011-10-26 Thread Gavin Flower
On 27/10/11 02:38, salah jubeh wrote: Can someone please direct me where I can find documentation about ALL and ANY functions. I searched postgresql documentation but I did not find the appropriate pages Thanks in advance Read the reference URLs provided by the other replies, as I quote

Re: [GENERAL] nextval skips values between consecutive calls

2011-10-29 Thread Gavin Flower
On 29/10/11 05:59, Merlin Moncure wrote: On Fri, Oct 28, 2011 at 11:32 AM,depst...@alliedtesting.com wrote: -Original Message- From: Merlin Moncure [mailto:mmonc...@gmail.com] Sent: Friday, October 28, 2011 8:29 PM To: Dmitry Epstein Cc: t...@sss.pgh.pa.us;

Re: [GENERAL] partitioning a dataset + employing hysteresis condition

2011-11-15 Thread Gavin Flower
On 14/11/11 18:35, Amit Dor-Shifer wrote: On Mon, Nov 14, 2011 at 4:29 PM, Amit Dor-Shifer amit.dor.shi...@gmail.com mailto:amit.dor.shi...@gmail.com wrote: Hi, I've got this table: create table phone_calls ( start_time timestamp, device_id integer,

Re: [GENERAL] partitioning a dataset + employing hysteresis condition

2011-11-15 Thread Gavin Flower
On 14/11/11 18:35, Amit Dor-Shifer wrote: On Mon, Nov 14, 2011 at 4:29 PM, Amit Dor-Shifer amit.dor.shi...@gmail.com mailto:amit.dor.shi...@gmail.com wrote: Hi, I've got this table: create table phone_calls ( start_time timestamp, device_id integer,

Re: [GENERAL] Is it ever necessary to vacuum a table that only gets inserts/updates?

2011-11-18 Thread Gavin Flower
On 18/11/11 04:59, Tom Lane wrote: Craig Ringerring...@ringerc.id.au writes: On Nov 17, 2011 1:32 PM, Tom Lanet...@sss.pgh.pa.us wrote: If it's purely an insert-only table, such as a logging table, then in principle you only need periodic ANALYZEs and not any VACUUMs. Won't a VACUUM FREEZE

Re: [GENERAL] Is it ever necessary to vacuum a table that only gets inserts/updates?

2011-11-19 Thread Gavin Flower
On 19/11/11 11:32, Adam Cornett wrote: On Fri, Nov 18, 2011 at 2:56 PM, Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz wrote: On 18/11/11 04:59, Tom Lane wrote: Craig Ringerring...@ringerc.id.au mailto:ring...@ringerc.id.au writes

Re: [GENERAL] Table Design question for gurus (without going to NoSQL)...

2011-11-20 Thread Gavin Flower
On 21/11/11 02:33, Phoenix Kiula wrote: Hi. Want to start another thread, loosely related to the performance problems thread I have going. Need some DB design guidance from the gurus here. My big table now has about 70 million rows, with the following columns: alias | character

Re: [GENERAL] Is it ever necessary to vacuum a table that only gets inserts/updates?

2011-11-20 Thread Gavin Flower
On 20/11/11 11:57, Scott Marlowe wrote: On Sat, Nov 19, 2011 at 12:53 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 19/11/11 11:32, Adam Cornett wrote: On Fri, Nov 18, 2011 at 2:56 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 18/11/11 04:59, Tom Lane wrote: Craig

Re: [GENERAL] Table Design question for gurus (without going to NoSQL)...

2011-11-20 Thread Gavin Flower
On 21/11/11 14:50, Phoenix Kiula wrote: On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: How about having 2 indexes: one on each of ip url_md5? Pg will combine the indexes as required, or will just use one if that is best. Thanks Gavin. Question: what

Re: [GENERAL] How to write a own parser for full text search

2011-11-21 Thread Gavin Flower
On 21/11/11 22:51, Antonio Franzoso wrote: Hi all, I have installed PostgreSQL server on a Windows Server 2008 server and I need to write a more complex parser than the default one in PostgreSQL. Searching on internet i found this example:

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-23 Thread Gavin Flower
On 21/12/11 04:07, Joe Miller wrote: Thanks so much to everybody who voted. I really can't express my gratitude. I'd love to head to the pub and buy everybody a drink, but I think that might cost more than the flight. Joe On Tue, Dec 20, 2011 at 10:04 AM, Alban Hertroysharam...@gmail.com

Re: [GENERAL] MS Access easier with PostgreSQL or MySQL?

2012-01-30 Thread Gavin Flower
On 30/01/12 11:27, gvim wrote: I want to use MS Access 2007 as a front end to a more robust/FOSS database. Which is more compatible - MySQL or PostgreSQL? Unbiased answers please :-). gvim Well I have done searches on the Net 3 times since I first came across PostgresSQL in 2001, and each

Re: [GENERAL] Stability in Windows?

2012-02-25 Thread Gavin Flower
On 25/02/12 04:39, Durumdara wrote: Hi! We planned to port some very old DBASE db into PGSQL. But somebody said in a developer list that he tried with PGSQL (8.x) and it was very unstable in Windows (and it have problem when many users use it). Another people also said that they used PGSQL

Re: [GENERAL] what Linux to run

2012-03-03 Thread Gavin Flower
On 02/03/12 01:25, Ivan Voras wrote: On 28/02/2012 18:17, Rich Shepard wrote: On Tue, 28 Feb 2012, mgo...@isstrucksoftware.net wrote: If we move to Linux, what is the preferred Linux for running Postgres on. This machine would be dedicated to the database only. Michael, There is no

Re: [GENERAL] what Linux to run

2012-03-03 Thread Gavin Flower
On 03/03/12 23:33, Leif Biberg Kristensen wrote: Lørdag 3. mars 2012 01.43.29 skrev Gavin Flower : I think if you are going to select a member of the Debian family, I would strongly recommend Debian itself. I have the impression that the Debian community is more serious about quality than

Re: [GENERAL] what Linux to run

2012-03-04 Thread Gavin Flower
On 04/03/12 09:49, John R Pierce wrote: On 03/03/12 2:55 AM, Gavin Flower wrote: My knowledge of Debian is via friend's (an extremely competent and experienced Unix guy who got me into Linux who still runs Debian) comments and what I've noticed on the web. For a Desktop development

Re: [GENERAL] what Linux to run

2012-03-06 Thread Gavin Flower
Hmm... I also use 64 bit Fedora 16, on an AMD quad core at home, and on a dual Xeon quad cores at work. For a desktop environment, I would recommend xfce for serious work over GNOME 3. However, GNOME 3 is fine if you prefer fashion over functionality. I have 25 virtual desktops, and make

Re: [GENERAL] Question on datatypes returned for select oid, typname from pg_type

2012-03-09 Thread Gavin Flower
On 10/03/12 09:15, Tom Lane wrote: Alexander Reichstadtl...@mac.com writes: to find out what datatypes exist. When checking on a certain field, it returned 17 as a type, thus being a bytea. That's actually the question now, because, is it always that bytea gets oid 17 or are these assignments

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-11 Thread Gavin Flower
On 11/04/12 19:15, Sidney Cadot wrote: Dear all, As a hobby project, I am toying around with a database containing about 5 million chess games. On average, these games have about 80 positions (~ 40 moves by both black and white), which means there are about 400 million chess positions in there.

Fwd: Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-12 Thread Gavin Flower
Original Message Subject:Re: [GENERAL] Searchable chess positions in a Postgress DB Date: Fri, 13 Apr 2012 00:33:17 +1200 From: Gavin Flower gavinflo...@archidevsys.co.nz Organisation: ArchiDevSys To: Sidney Cadot sid...@jigsaw.nl On 12/04/12 01:14, Sidney

Re: [GENERAL] Searchable chess positions in a Postgress DB

2012-04-12 Thread Gavin Flower
On 11/04/12 21:24, Gavin Flower wrote: On 11/04/12 19:15, Sidney Cadot wrote: Dear all, As a hobby project, I am toying around with a database containing about 5 million chess games. On average, these games have about 80 positions (~ 40 moves by both black and white), which means

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 - 9.1

2012-05-23 Thread Gavin Flower
On 24/05/12 05:09, Lonni J Friedman wrote: On Wed, May 23, 2012 at 9:37 AM, Tom Lanet...@sss.pgh.pa.us wrote: Lonni J Friedmannetll...@gmail.com writes: After banging my head on the wall for a long time, I happened to notice that khugepaged was consuming 100% CPU every time autovacuum was

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 - 9.1

2012-05-23 Thread Gavin Flower
On 24/05/12 08:18, Lonni J Friedman wrote: On Wed, May 23, 2012 at 12:36 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 24/05/12 05:09, Lonni J Friedman wrote: On Wed, May 23, 2012 at 9:37 AM, Tom Lanet...@sss.pgh.pa.us wrote: Lonni J Friedmannetll...@gmail.com writes: After

Re: [GENERAL] Feature discussion: Should syntax errors abort a transaction?

2012-06-19 Thread Gavin Flower
On 20/06/12 01:35, Rafal Pietrak wrote: On Tue, 2012-06-19 at 19:06 +0800, Craig Ringer wrote: On 06/19/2012 02:20 PM, Tom Lane wrote: So you're suggesting that SELECT 1/0; should terminate a transaction, but SELECT 1//0; should not? How about ROLBACK;? It gets pretty squishy pretty fast

Re: [GENERAL] Smaller data types use same disk space

2012-07-25 Thread Gavin Flower
On 26/07/12 04:09, McGehee, Robert wrote: Very interesting points. Thanks for the documentation link and the point about alignment. As a test of Tom's suggestion to group smallints together to avoid alignment problems, I changed the column order from smallint, date, smallint, integer, real TO

Re: Messy data models (Re: [GENERAL] Visualize database schema)

2012-08-18 Thread Gavin Flower
On 18/08/12 04:33, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Wolfgang Keller Sent: Friday, August 17, 2012 9:08 AM To: pgsql-general@postgresql.org Subject: Messy data models (Re: [GENERAL]

Re: [GENERAL] Schemas vs partitioning vs multiple databases for archiving

2012-08-18 Thread Gavin Flower
On 18/08/12 20:05, Bartel Viljoen wrote: [...] I'm in the design faze of a new GUI and DB layout, what are my options. [...] I think you meant phase! (Spell checkers can be quite stupid!) Cheers, Gavin

Re: [GENERAL] Schemas vs partitioning vs multiple databases for archiving

2012-08-20 Thread Gavin Flower
On 19/08/12 17:50, Chris Travers wrote: On Sat, Aug 18, 2012 at 9:30 PM, Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz wrote: On 18/08/12 20:05, Bartel Viljoen wrote: [...] I’m in the design faze of a new GUI and DB layout, what are my

Re: [GENERAL] At what point does a big table start becoming too big?

2012-08-24 Thread Gavin Flower
On 23/08/12 11:06, Nick wrote: I have a table with 40 million rows and haven't had any performance issues yet. Are there any rules of thumb as to when a table starts getting too big? For example, maybe if the index size is 6x the amount of ram, if the table is 10% of total disk space, etc?

Re: [GENERAL] Which postgresql should i choose to migrate from 8.3 ? 8.4 or 9.1?

2012-08-28 Thread Gavin Flower
On 29/08/12 04:52, Ing.Edmundo.Robles.Lopez wrote: Hi! We are using postgresql 8.3 in my work, and the need to migrate to a newer version became urgent :) I've been reading the release notes for versions 8.4 and 9.1, but is not clear to me which problems I can have with version 8.4 or 9.1

Re: [GENERAL] Need some information about postgresql products and community

2012-08-28 Thread Gavin Flower
On 29/08/12 02:29, mithun wrote: Dear Sir, We are gathering information regarding PostgreSQL open source product quality and its community. Can you kindly help me to find following data. 1.Number of releases happened since last 12 months along with its version numbers. 2.Number of Bugs

Re: [GENERAL] Too far out of the mainstream

2012-09-03 Thread Gavin Flower
On 04/09/12 10:38, Geert Mak wrote: I have been looking into heroku lately, they run on PostgreSQL - https://postgres.heroku.com/postgres PostgreSQL is the database of choice for reliable web-applications. Is what they say on that page, not mincing words are they? Cheers, Gavin -- Sent

Re: [GENERAL] Too far out of the mainstream

2012-09-04 Thread Gavin Flower
On 05/09/12 05:35, Scott Marlowe wrote: On Tue, Sep 4, 2012 at 11:28 AM, Mike Christensen m...@kitchenpc.com wrote: On Mon, Sep 3, 2012 at 3:38 PM, Geert Mak po...@verysmall.org wrote: I have been looking into heroku lately, they run on PostgreSQL - https://postgres.heroku.com/postgres Went

Re: [GENERAL] Too far out of the mainstream

2012-09-04 Thread Gavin Flower
On 05/09/12 08:38, Scott Marlowe wrote: On Tue, Sep 4, 2012 at 2:03 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 05/09/12 05:35, Scott Marlowe wrote: I have read to emails to one of the postgresql lists, where people in companies with 1000's of databases had power failures and only

Re: [GENERAL] Does it make sense to break a large query into separate functions?

2013-05-08 Thread Gavin Flower
On 09/05/13 02:47, Merlin Moncure wrote: On Wed, May 8, 2013 at 9:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: Seref Arikan serefari...@kurumsalteknoloji.com writes: I've just noticed that some parts of the autogenerated queries can be functions on their own. Would moving these parts to their own

Re: [GENERAL] Does it make sense to break a large query into separate functions?

2013-05-08 Thread Gavin Flower
On 09/05/13 09:35, Merlin Moncure wrote: [...] More oddness -- when I wrap, say, random() with stable function, I get unique value per returned row, but same value across the set when wrapped with immutable. [..] That part I think I know (but, I'm often wrong!). By saying it is immutable,

Re: [GENERAL] LONG delete with LOTS of FK's

2013-05-17 Thread Gavin Flower
On 18/05/13 03:06, Larry Rosenman wrote: On 2013-05-16 18:35, David Kerr wrote: - I'll take a look tomorrow, but we WERE seeing Seq Scan's against - multi-million - row tables, so I suspect Tom is right on with the replanning that's in - 9.2 fixing - it, and I'm in the process of validating

Re: [GENERAL] Authorization,Authentication issues trying basic commands.

2013-05-21 Thread Gavin Flower
On 22/05/13 14:15, luis redondo wrote: It's my first time using PostgreSQL and I need to do basic things as establishing a new user,create a new database,access psql command line client etc. I tried : su - postgres to access the server but I don't have a valid password,I don't know if the

Re: [GENERAL] PostgresQL 9.2 table query - underscores

2013-07-16 Thread Gavin Flower
On 17/07/13 10:04, Victoria S. wrote: Hello: My first post; a Postgres newbie ... I am teaching myself PostgresQL using a trial database, and I am having trouble with underscores: IN the following example, development=# SELECT created_at, username FROM tweets; created_at

Re: [GENERAL] How get column-wise table info from an arbitrary query?

2013-07-30 Thread Gavin Flower
I use 'id' for the primary key, and [tablename]_id for each foreign key, I always qualify my column references in SQL, but I would never use SELECT * when selecting from more than one table. Cheers, Gavin On 30/07/13 21:41, sidthegeek wrote: I really dislike ambiguous column names across

Re: [GENERAL] How get column-wise table info from an arbitrary query?

2013-07-30 Thread Gavin Flower
On 31/07/13 09:57, David Johnston wrote: Gavin Flower-2 wrote I use 'id' for the primary key, and [tablename]_id for each foreign key, I always qualify my column references in SQL, but I would never use SELECT * when selecting from more than one table. Cheers, Gavin On 30/07/13 21:41

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-08-01 Thread Gavin Flower
On 02/08/13 08:24, Kevin Grittner wrote: [...] When working as a consultant, one client was doing everything client-side and engaged me to fix some performance problems. In one case a frequently run query was taking two minutes. As a stored procedure the correct results were returned in two

Re: [GENERAL] Replication Postgre Oracle

2013-08-07 Thread Gavin Flower
On 07/08/13 20:24, BOUVARD Aurélien wrote: Hi all, My compagny would like to configure replication between PostgreSQL 9.2.4 and Oracle Database (11g and maybe 12c soon). We saw that/Postgres Plus Database Replication /could be a good solution for us.// // We also thank to develop a

Re: [GENERAL] SORT and Merge Join via Index

2013-08-13 Thread Gavin Flower
On 14/08/13 12:02, Robert James wrote: I noticed that when I have an index on (a,b) of table t, and I do an SELECT * FROM t ORDER BY a ASC, it doesn't use the index. When I create a new index of only a, it does use the index. Why is that? And, more importantly, when I do a query involving a

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-04 Thread Gavin Flower
On 04/09/13 22:47, Eduardo Morras wrote: On Wed, 04 Sep 2013 00:08:52 +0200 Andreas 'ads' Scherbaum adsm...@wars-nicht.de wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue

Re: [pgeu-general] [GENERAL] Call for design: PostgreSQL mugs

2013-09-04 Thread Gavin Flower
On 05/09/13 08:40, patrick keshishian wrote: On 9/4/13, Andreas 'ads' Scherbaum adsm...@wars-nicht.de wrote: On 09/04/2013 10:17 PM, Stefan Kaltenbrunner wrote: On 09/04/2013 10:13 PM, Marc Balmer wrote: Am 04.09.13 22:02, schrieb Gavin Flower: On 04/09/13 22:47, Eduardo Morras wrote

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-08 Thread Gavin Flower
On 09/09/13 01:27, Andreas 'ads' Scherbaum wrote: On 09/04/2013 12:08 AM, Andreas 'ads' Scherbaum wrote: PostgreSQL folks! We are looking for the next big thing. Actually, it's a bit smaller: a new design for mugs. So far we had big blue elephants, small blue elephants, frosty elephants,

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread Gavin Flower
On 10/09/13 13:21, John R Pierce wrote: On 9/9/2013 5:39 PM, Sam Hahn wrote: How about * Postgres -the Linux of Data (or) * The Linux of DBs ugh no.if anything, Mysql is the Linux of data. PostgreSQL is more like the BSD of Data. -- john r pierce

Re: [GENERAL] Forms for entering data into postgresql

2013-10-11 Thread Gavin Flower
On 12/10/13 05:06, Steve Atkins wrote: On Oct 11, 2013, at 8:57 AM, Bret Stern bret_st...@machinemanagement.com wrote: My interpretation of Forms these days are written in HTML means most interfaces are web front ends to the cloud. Not a GUI framework. Yup. But embedding an HTML renderer

Re: [GENERAL] Preserving the source code of views

2013-10-19 Thread Gavin Flower
On 20/10/13 16:38, Brian Crowell wrote: Hello! I'm evaluating PostgreSQL as a replacement for SQL Server in our in-house systems. I've been really impressed with it so far, and I'm eager to try it with our data sets. I've run across one thing that would make a transfer difficult. Postgres

Re: [GENERAL] Connection pooling

2013-10-30 Thread Gavin Flower
On 31/10/13 03:13, si24 wrote: I have geoserver connected to a postgres database and so far I have been reading that I would need some sort of connection pooling but how do I go about doing that when it seems most of the connection pooling aplications/programs seem to only run on linux. I have a

Re: [GENERAL] Connection pooling

2013-10-31 Thread Gavin Flower
On 01/11/13 00:10, Rémi Cura wrote: Hey, I might be completly wrong, but when you say get the connections to close if they are not being used, I'd say that it is a bad client design to not close a connection when it doesn't need it anymore. The client should retrieve the data or close when

Re: [GENERAL] new line in psotgres

2013-11-09 Thread Gavin Flower
On 10/11/13 02:38, Alban Hertroys wrote: On Nov 9, 2013, at 12:08, abdullatheeflatheefvkp...@gmail.com wrote: you can include newline in postgre using literal E create table table (text varchar(50)); insert into Table (text) values (E'This is the first part \\n And this is the second'); Or

Re: [GENERAL] new line in psotgres

2013-11-09 Thread Gavin Flower
On 10/11/13 09:18, Gavin Flower wrote: On 10/11/13 02:38, Alban Hertroys wrote: On Nov 9, 2013, at 12:08, abdullatheeflatheefvkp...@gmail.com wrote: you can include newline in postgre using literal E create table table (text varchar(50)); insert into Table (text) values (E'This is the first

Re: [GENERAL] Postgres as In-Memory Database?

2013-11-17 Thread Gavin Flower
On 18/11/13 12:53, Stefan Keller wrote: Hi Martijn 2013/11/17 Martijn van Oosterhout klep...@svana.org mailto:klep...@svana.org wrote: If your dataset fits in memory then the problem is trivial: any decent programming language provides you with all the necessary tools to deal with data

Re: [GENERAL] to_json(now()) result doesn't have 'T' separator

2013-12-20 Thread Gavin Flower
On 21/12/13 15:27, Joe Van Dyk wrote: On Fri, Dec 20, 2013 at 4:24 PM, Joe Van Dyk j...@tanga.com mailto:j...@tanga.com wrote: On Fri, Dec 20, 2013 at 4:18 PM, Joe Van Dyk j...@tanga.com mailto:j...@tanga.com wrote: # select to_json(now()); to_json

Re: [GENERAL] Why is wal_writer_delay limited to 10s?

2013-12-27 Thread Gavin Flower
On 28/12/13 02:01, Clemens Eisserer wrote: Hi, Just to be curious, why is wal_writer_delay limited to 10s? I am using postgresql in an embedded environment where every 10s sensor values are logged and even with synchronous_commit = off and wal_writer_delay=1 this burns quite a lot of nand

Re: [GENERAL] help interpreting pg_stat_user_index view values

2014-01-05 Thread Gavin Flower
On 06/01/14 11:08, Sergey Konoplev wrote: [...] An index might be considered as useless when there were no idx scans for the significantly long period. However it might be non-trivial to define this period. Eg. one have a query building an annual report that uses this index and the period here

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-16 Thread Gavin Flower
Please see the comment at the bottom of this post. On 16/01/14 22:52, itishree sukla wrote: Thanks for your reply, i am totally new to Postgis. At least you've got into it, I keep meaning do do so myself. we have Database, but not ready for Geocode use. what i understood from different

Re: [GENERAL] Transparent exchange BDE from Oracle to PostgreSQL

2014-02-02 Thread Gavin Flower
On 03/02/14 01:18, Edson Richter wrote: Em 02/02/2014 04:24, John R Pierce escreveu: On 2/1/2014 4:26 PM, Adrian Klaver wrote: On 02/01/2014 03:26 PM, John R Pierce wrote: On 2/1/2014 3:18 PM, Edson Richter wrote: It is possible to put a PostgreSQL database in substitution of a Oracle

Re: [GENERAL] Ordering Results by a Supplied Order

2014-02-06 Thread Gavin Flower
On 07/02/14 05:43, Michael Sacket wrote: On Feb 6, 2014, at 2:23 AM, Vik Fearing wrote: On 02/06/2014 04:16 AM, Michael Sacket wrote: Often times I find it necessary to work with table rows in a specific, generally user-supplied order. It could be anything really that requires an ordering

Re: [GENERAL] Add a check an a array column

2012-09-09 Thread Gavin Flower
On 09/09/12 23:12, vdg wrote: Thanks for your help. Before posting, I had tried something like check ((ALL(i) = 0) AND (ALL(i) = 1024 ))); but i got syntax errors. It seems the first ALL() was not recognized. Could someone give me documentation hints on this behaviour ? vdg On Saturday,

Re: [GENERAL] log_destination = csvlog

2012-09-17 Thread Gavin Flower
On 18/09/12 08:45, Edson Richter wrote: Em 17/09/2012 16:32, Ryan Kelly escreveu: On Mon, Sep 17, 2012 at 04:20:14PM -0300, Edson Richter wrote: Dear all, I've started collecting log information in CSV format, but I need a way to customize it. Problem is that I'm collecting slow statements,

Re: [GENERAL] Change key primary for key foreign

2012-09-19 Thread Gavin Flower
On 19/09/12 19:40, Albe Laurenz wrote: Guilherme Rodrigues wrote: I created one table so: CREATE TABLE clima ( city char(80), cprc int, ); And have other table so: CREATE TABLE city ( namechar(80), other_thing int, ); These SQL statements have

Re: [GENERAL] Difference between ON and WHERE in JOINs

2012-09-19 Thread Gavin Flower
On 20/09/12 03:08, Merlin Moncure wrote: On Tue, Sep 18, 2012 at 7:47 PM, David Johnstonpol...@yahoo.com wrote: On Sep 18, 2012, at 20:21, Jean-Christophe Boggiopostgre...@thefreecat.org wrote: I'm looking for an article that explains the difference between these constructs IN POSTGRESQL

Re: [GENERAL] PostgreSQL, OLAP, and Large Clusters

2012-09-26 Thread Gavin Flower
On 26/09/12 23:50, Ryan Kelly wrote: Hi: The size of our database is growing rather rapidly. We're concerned about how well Postgres will scale for OLAP-style queries over terabytes of data. Googling around doesn't yield great results for vanilla Postgres in this application, but generally

Re: [GENERAL] Help estimating database and WAL size

2012-10-08 Thread Gavin Flower
On 09/10/12 09:39, Daniel Serodio (lists) wrote: We are preparing a PostgreSQL database for production usage and we need to estimate the storage size for this database. We're a team of developers with low expertise on database administration, so we are doing research, reading manuals and using

Re: [GENERAL] Index only scan

2012-10-10 Thread Gavin Flower
On 11/10/12 01:03, Lars Helge Øverland wrote: Hi all, first of all thanks for the great new index only scan feature in 9.2. We have managed to adapt our app (dhis2.org) to take advantage of it and it really speeds up several queries significantly. We are now in the process of designing a new

Re: [GENERAL] Index only scan

2012-10-10 Thread Gavin Flower
On 11/10/12 12:41, Tom Lane wrote: Gavin Flower gavinflo...@archidevsys.co.nz writes: On 11/10/12 01:03, Lars Helge Øverland wrote: My question is: Would it be feasible and/or possible to implement index only scans in a way that it could take advantage of several, single-column indexes

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Gavin Flower
On 12/10/12 04:39, Merlin Moncure wrote: On Thu, Oct 11, 2012 at 4:44 AM, Vineet Deodhar vineet.deod...@gmail.com wrote: Thanks all for your replies. This is my first experience with postgres mailing list. Hats Off to the active community of pgsql. This has definitely raised my confidence level

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-11 Thread Gavin Flower
On 12/10/12 15:15, Vishalakshi Navaneethakrishnan wrote: Hi Friends, We have our production environment database server in Postgres 8.3 version. we have planned to upgrade to lastest version 9.1. Dump from 8.3 and restore in Postgres 9.1 takes more than 5 hours. Any other quick method to

Re: [GENERAL] PostgresQL intallation error

2012-10-27 Thread Gavin Flower
On 27/10/12 23:30, Raul Feliu wrote: I have windows vista. I tried to run the installer in admin mode and I disabled UAC. Still having the same problem. Any other help will be wellcome :) Thanks again, and thanks Xiong He.

  1   2   3   >