Re: [GENERAL] How to handle bogus nulls from ActiveRecord

2011-05-12 Thread James B. Byrne
. +Infinity was chosen as a default to avoid the complexities of dealing with NULL logic in SELECTS. I suppose that the simplest solution is to go with a date of -12-31 and treat that value like infinity. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] How to handle bogus nulls from ActiveRecord

2011-05-12 Thread James B. Byrne
. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3

[GENERAL] Passing infinity as a timestamp value in Ruby

2011-03-30 Thread James B. Byrne
to anyone here then I would like to learn of it. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario

[GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread James B. Byrne
, weight_mass_net_uom character varying(3) DEFAULT ' '::character varying NOT NULL, . . . ); My question is: Why am I getting a NULL exception? Should I only specify DEFAULT and drop the NOT NULL constraint? -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] NULL value vs. DEFAULT value.

2011-03-08 Thread James B. Byrne
On Tue, March 8, 2011 10:09, Scott Ribe wrote: On Mar 8, 2011, at 7:54 AM, James B. Byrne wrote: My question is: Why am I getting a NULL exception? Because you're trying to insert NULL explicitly? Yes, that is the problem. Evidently RoR's ActiveRecord helpfully converts a string

Re: [GENERAL] Screencasts for PostgreSQL

2011-03-04 Thread James B. Byrne
-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general

[GENERAL] How to approach dynamic status reporting

2011-03-02 Thread James B. Byrne
up elsewhere and, if so, how is it handled? Sincerely, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario

[GENERAL] Screencasts for PostgreSQL

2011-03-01 Thread James B. Byrne
channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql

[GENERAL] Getting a sample data set.

2011-01-18 Thread James B. Byrne
person to require this sort of thing of SQL so if anyone can point me to a reference that explicitly sets out how to accomplish this I would greatly appreciate it. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne

Re: [GENERAL] Getting a sample data set.

2011-01-18 Thread James B. Byrne
like DISTINCT ON. I take it that this syntax is peculiar to PostgreSQL?: -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241

Re: [GENERAL] Getting a sample data set.

2011-01-18 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] Ad hoc report writer

2011-01-17 Thread James B. Byrne
with PostgreSQL? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E

[GENERAL] Set new owner on cloned database

2010-12-08 Thread James B. Byrne
whatever, remains owned by the original owner. Is there no way to change the owner everywhere in the cloned database using cretedb? Or am I constrained to do a dump all and restore? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte

Re: [GENERAL] Set new owner on cloned database

2010-12-08 Thread James B. Byrne
it it did seem a bit convoluted. The REASSIGN OWNED BY seems the more sensible approach. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905

[GENERAL] PG84 and SSL on CentOS-5.5 was PG84 and SELinux

2010-12-07 Thread James B. Byrne
installed Might there be a problem between the server being compiled for i386 and openssl for i686? I cannot for the life of me determine what configuration problem causes this error. On Fri, December 3, 2010 16:04, James B. Byrne wrote: When I try to start the server with ssl

Re: [GENERAL] PG84 and SSL on CentOS-5.5 was PG84 and SELinux

2010-12-07 Thread James B. Byrne
presently get makes no sense at all to me. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax

Re: [GENERAL] PG84 and SSL on CentOS-5.5 was PG84 and SELinux

2010-12-07 Thread James B. Byrne
with ssl enabled. Many thanks for the hints and suggestions. They did in fact eventually point me in the right direction. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9

Re: [GENERAL] PG84 and SELinux

2010-12-06 Thread James B. Byrne
the server no longer causes any error. Than you all for the help. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton

Re: [GENERAL] PG84 and SELinux

2010-12-06 Thread James B. Byrne
On Mon, December 6, 2010 13:29, James B. Byrne wrote: The problem was an expired pki certificate. When we first used ssl for pg we did not have our private CA set up. So we generated a self-signed certificate. That certificate expired this past July and I infer that while 8.1 did

Re: [GENERAL] PG84 and SELinux

2010-12-04 Thread James B. Byrne
On Sat, December 4, 2010 01:11, Tom Lane wrote: James B. Byrne byrn...@harte-lyne.ca writes: I wrote too soon. What I did was uncomment the ssl option. I neglected to change the setting from off to on. When I try to start the server with ssl=on it fails with this error: Auto

Re: [GENERAL] PG84 and SELinux

2010-12-03 Thread James B. Byrne
On Thu, December 2, 2010 15:32, James B. Byrne wrote: On Thu, December 2, 2010 15:23, Devrim GÜNDÜZ wrote: On Wed, 2010-12-01 at 16:54 -0500, Tom Lane wrote: AFAIK, the Red Hat RPMs work out-of-the-box with SELinux; They should -- we are using the same routines for initdb'ing. I will do

Re: [GENERAL] PG84 and SELinux

2010-12-03 Thread James B. Byrne
On Wed, December 1, 2010 16:54, Tom Lane wrote: James B. Byrne byrn...@harte-lyne.ca writes: Earlier today I attempted to upgrade a production server from 8.1 to 8.4 using the pgdg-84-centos.repo. I say attempted because I could never get it to support ssl connections

Re: [GENERAL] PG84 and SELinux

2010-12-02 Thread James B. Byrne
again. If there was just something odd about the SELinux contexts on that particular host then that should clear it up. I will report whichever way it goes thereafter. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte

[GENERAL] Dumping a table from one database and adding it to another

2010-12-02 Thread James B. Byrne
and column layouts in the new database. Is there a way to load the data dumped from a single table in one database into a new, possibly differently named, table in a different database, using PG utilities? -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] Dumping a table from one database and adding it to another

2010-12-02 Thread James B. Byrne
channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql

[GENERAL] PG84 and SELinux

2010-12-01 Thread James B. Byrne
== allow postgresql_t var_lib_t:dir rmdir; allow postgresql_t var_lib_t:file { write getattr link read unlink append }; Is this to be expected? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited

[GENERAL] PG_ERROR 42501 permissions error

2010-12-01 Thread James B. Byrne
I am doing wrong? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757

Re: [GENERAL] PG84 and SELinux

2010-12-01 Thread James B. Byrne
? regards, tom lane I tried a restorecon as suggested by sealert at the first error. It had no effect insofar as I could determine. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http

Re: [GENERAL] PG84 and SELinux

2010-12-01 Thread James B. Byrne
On Wed, December 1, 2010 16:54, Tom Lane wrote: James B. Byrne byrn...@harte-lyne.ca writes: Earlier today I attempted to upgrade a production server from 8.1 to 8.4 using the pgdg-84-centos.repo. I say attempted because I could never get it to support ssl connections

[GENERAL] PGError: ERROR: missing FROM-clause entry for table

2010-11-25 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] PGError: ERROR: missing FROM-clause entry for table

2010-11-25 Thread James B. Byrne
On Thu, November 25, 2010 21:58, Robert Treat wrote: On Thu, Nov 25, 2010 at 9:21 PM, James B. Byrne byrn...@harte-lyne.cawrote: Looks to me like the problem is you are trying to ORDER BY columns in ca_customs_entry, but there is no such table for that (don't confuse

[GENERAL] Removing duplicates from multiple self left joins

2010-11-21 Thread James Moriarty
I am dynamically generating a query like below that creates different combinations of rules by left joining (any number of times) on itself and avoiding rules with some of the same attributes as part of the joins conditions e.g. SELECT count(*) FROM rules AS t1 LEFT JOIN rules AS t2

[GENERAL] Compiling openssl

2010-09-22 Thread Awodipe James
Good day, Is it possible to use any of your products to compile openssl-1.0.0a.tar.gz form http://www.openssl.org/source/ for Win32 environment, how? OR can you help complile it with this adjustment to the makefile: To build, I needed to modify the first lines of the example code's Makefile as

[GENERAL] Postgres standard versus Postgres Plus Advanced Server

2010-02-11 Thread Robert James
Hi. I'm setting up a new workstation (Win7 64bit Quad Core 4GB) with Postgres, for development work, and trying to pick which version I should install. Most of the time, Postgres is dormant - I'm not using it all - but when I do use it, the load can be high, and I want maximum performance. Is

[GENERAL] Verifying a PITR

2009-09-04 Thread james bardin
What would be the best way to verify that a PITR came up with *all* the expected data? This is mostly for a controlled failover, where I manually bring down the primary server, and shouldn't ever lose a transaction. If I need to use something like txid_current(), how do I ensure that it's the

Re: [GENERAL] warm standby and reciprocating failover

2009-08-25 Thread james bardin
On Mon, Aug 24, 2009 at 12:45 PM, james bardinjbar...@bu.edu wrote: I tried recovery_target_timeline='X' on the standby, where X is the new timeline created after recovery on the new master. This fails, with some unexpected timeline ID lines and a PANIC:  could not locate a valid checkpoint

[GENERAL] warm standby and reciprocating failover

2009-08-24 Thread james bardin
I wasn't sure which list is better suited, so this is cross posted from pgsql-admin. -Thanks On Fri, Aug 21, 2009 at 10:46 AM, james bardinjbar...@bu.edu wrote: I have a working warm standby system, running 8.4 (thanks for urging me to upgrade from the rehdat provided release). One of the new

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
Many wrote that the functional programming 'fold' is a good model for relational aggregate functions. I have a few difficulties with this: 1. fold doesn't offer any type of GROUP BY, which is an essential component of aggregation. 2. I don't believe fold can handle things like AVG() or STDDEV().

Re: [GENERAL] Clients disconnect but query still runs

2009-07-28 Thread Robert James
this would be a major boon to high volume servers, at least in the usage patterns I've worked with. On Mon, Jul 27, 2009 at 9:49 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert James srobertja...@gmail.com writes: Hi. I noticed that when clients (both psql and pgAdmin) disconnect or cancel

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
Thanks! SQL and Relational Theory: How to Write Accurate SQL Code looks like the best pick of the bunch. On Tue, Jul 28, 2009 at 10:08 AM, Michael Glaesemann g...@seespotcode.netwrote: On Jul 27, 2009, at 21:05 , Robert James wrote: 2) Database in Depth: Relational Theory for Practitioners

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-28 Thread Robert James
On Tue, Jul 28, 2009 at 9:47 AM, Sam Mason s...@samason.me.uk wrote: On Tue, Jul 28, 2009 at 09:14:38AM -0400, Robert James wrote: Many wrote that the functional programming 'fold' is a good model for relational aggregate functions. I have a few difficulties with this: 1. fold doesn't

[GENERAL] Clients disconnect but query still runs

2009-07-27 Thread Robert James
Hi. I noticed that when clients (both psql and pgAdmin) disconnect or cancel, queries are often still running on the server. A few questions: 1) Is there a way to reconnect and get the results? 2) Is there a way to tell postgres to automatically stop all queries when the client who queried them

Re: [GENERAL] Relational Algebra and Aggregate Functions

2009-07-27 Thread Robert James
, but not if the first is better. One thing I'm not interested in is polemics against SQL and lamentations on how ignorant all practitioners are. On Mon, Jul 27, 2009 at 2:45 PM, Jeff Davis pg...@j-davis.com wrote: On Sun, 2009-07-26 at 15:36 -0400, Robert James wrote: I'm working on improving my

[GENERAL] Transitive Closure and CONNECT BY

2009-07-26 Thread Robert James
Is there a transitive closure (or equivalent) operator in Postgres (or extension)? Anything like CONNECT BY? Or any recommended way of querying hiearchial data?

[GENERAL] Relational Algebra and Aggregate Functions

2009-07-26 Thread Robert James
I'm working on improving my background database theory, to aid in practice. I've found learning relational algebra to be very helpful. One thing which relational algebra doesn't cover is aggregate functions. Can anyone recommend any papers or web pages which provide some good theoretical

[GENERAL] Ruuning two instances of Postgres on the same machine

2009-07-26 Thread Robert James
I'm currently running Postgres 8.2 on Windows XP. I would like to use some 8.4 features, but I don't want to migrate my 8.2. Is there any way to run both instances together? Are there any problems with that? Alternatively, is the procedure to move from 8.2 to 8.4 without data or function loss

[GENERAL] Can LIKE under utf8 use INDEXes?

2009-07-22 Thread Robert James
Hi. I'm confused about the behavior of LIKE under utf8 locale. Accoding to the docs ( http://www.postgresql.org/docs/8.2/interactive/locale.html - excerpted below), it seems that LIKE ignores locale and hence can't use indexes. Yet, EXPLAIN clearly shows it using indexes. The docs suggest a

Re: [GENERAL] Documentation Improvement suggestions

2009-07-22 Thread Robert James
On Mon, Jul 20, 2009 at 11:37 AM, Martijn van Oosterhout klep...@svana.orgwrote: I know it's not easy, but a nice option to me would be if the 8.1 docs page linked to the equivalent page in the other versions. That would avoid the need to manually edit the URL after a google search. Oh, and

Re: [GENERAL] Can LIKE under utf8 use INDEXes?

2009-07-22 Thread Robert James
...@sss.pgh.pa.us wrote: Robert James srobertja...@gmail.com writes: Hi. I'm confused about the behavior of LIKE under utf8 locale. UTF8 is not a locale, it's an encoding. If you're using C locale then LIKE can use indexes, regardless of the encoding. If you're using some other locale then you need

Re: [GENERAL] Can LIKE under utf8 use INDEXes?

2009-07-22 Thread Robert James
Thanks - I don't show any locale: rbt_development= \l List of databases Name | Owner | Encoding +-+-- rbt_development | rbt | UTF8 ... On Wed, Jul 22, 2009 at 6:45 PM, Andreas Wenk a.w...@netzmeister-st-pauli.de wrote: Robert James

[GENERAL] Help using SELECT INTO to make schema

2009-07-22 Thread Robert James
I'd like to SELECT INTO one table into another one. However, I'd like to do two things that I don't know how to do using SELECT INTO: 1. Copy over the indexes and constraints of the first table into the second 2. Do SELECT INTO even if the second table already exists. Is there anyway to do

Re: [GENERAL] Understanding sequential versus index scans.

2009-07-20 Thread Robert James
Yes, I had done UNION. UNION ALL achives the expected plan and speed! Thank you! BTW, this is interesting, because there are only about 5 or 6 rows max returned from both queries - but I guess the planner expects more and hence changes the plan to remove duplicates. On Sun, Jul 19, 2009 at 9:05

[GENERAL] Documentation Improvement suggestions

2009-07-20 Thread Robert James
Two small suggestions that might make it easier for newcomers to take advantage of the wonderful database: 1. Googling Postgres docs produces links for all different versions. This is because incoming links are to different versions. Besides being confusing, it pushes the pages lower in Google,

[GENERAL] Understanding INNER JOIN versus IN subquery

2009-07-20 Thread Robert James
I have two queries which should be equivalent. The Planner plans them differently, although they are both about the same time. Can someone explain why? select word from dict where word in (select substr('moon', 0, generate_series(3,length('moon' select * from dict inner join (select

[GENERAL] PG handling of date expressions

2009-07-19 Thread James B. Byrne
to a numeric expression such as the one above? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario

[GENERAL] Understanding sequential versus index scans.

2009-07-19 Thread Robert James
Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I do WHERE x OR y, it doesn't. Why is this so? And how can I shut this off? select * from dict where word in (select substr('moon', 0, generate_series(3,length('moon' -- this

Re: [GENERAL] Understanding sequential versus index scans.

2009-07-19 Thread Robert James
PS Running PostgreSQL 8.2.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) On Sun, Jul 19, 2009 at 6:58 PM, Robert James srobertja...@gmail.comwrote: Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I

[GENERAL] Should I CLUSTER on PRIMARY KEY

2009-07-19 Thread Robert James
I would like to CLUSTER a table on its PRIMARY KEY. Now, I haven't explicitly defined and named an index for this table - but the primary key defines one. How can I tell Postgres to CLUSTER on it? Also: If I define an index on a PK, will Postgres make a second one, or realize its redundnant?

Re: [GENERAL] Understanding sequential versus index scans.

2009-07-19 Thread Robert James
UNION was better, but still 5 times as slow as either query done individually. set enable_seqscan=off didn't help at all - it was totally ignored Is there anything else I can do? On Sun, Jul 19, 2009 at 7:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert James srobertja...@gmail.com writes: Hi

Re: [GENERAL] Should I CLUSTER on PRIMARY KEY

2009-07-19 Thread Robert James
Thanks, Chris. Is there a way to do this deterministically, or at least programatically? I have code to create the tables and cluster them automatically? On Sun, Jul 19, 2009 at 8:21 PM, Chris dmag...@gmail.com wrote: Robert James wrote: I would like to CLUSTER a table on its PRIMARY KEY

Re: [GENERAL] Understanding sequential versus index scans.

2009-07-19 Thread Robert James
:10 PM, Robert James srobertja...@gmail.comwrote: UNION was better, but still 5 times as slow as either query done individually. set enable_seqscan=off didn't help at all - it was totally ignored Is there anything else I can do? On Sun, Jul 19, 2009 at 7:47 PM, Tom Lane t...@sss.pgh.pa.us wrote

[GENERAL] How to trace client sql requests?

2009-07-10 Thread James B. Byrne
= notice #log_min_messages = notice #log_min_duration_statement = -1 ... #log_duration = off Which of these, if any, should I alter; and to what? Am I constrained to system wide logging or can this be enabled by database? Regards, -- *** E-Mail is NOT a SECURE channel *** James

Re: [GENERAL] How to trace client sql requests?

2009-07-10 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

[Fwd: Re: [GENERAL] How to trace client sql requests?]

2009-07-10 Thread James B. Byrne
is going on. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3

[GENERAL] BR/

2009-07-10 Thread James B. Byrne
this result reports that there are no rows returned. So where did they go? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241

Re: [GENERAL] Inserted data is disappearing

2009-07-10 Thread James B. Byrne
log, which seems congruent with the one ROLLBACK just before the very end. Evidently, all this test processing takes place within a single, never completed, transaction. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte

Re: [GENERAL] BR/

2009-07-10 Thread James B. Byrne
On Fri, July 10, 2009 18:48, Scott Marlowe wrote: On Fri, Jul 10, 2009 at 2:13 PM, James B. Byrnebyrn...@harte-lyne.ca wrote: 2009-07-10 15:59:17 EDT hll_theheart_test 216.185.71.24(49133) hll_theheart_db_admin : LOCATION:  exec_simple_query, postgres.c:1105 2009-07-10 15:59:17 EDT

Re: [GENERAL] BR/

2009-07-10 Thread James B. Byrne
necessary to clarify that LOCATION lines correspond to the LOG/NOTICE/WARNING/ERROR line immediately _above_ it, not the one below. So noted, with thanks. Regards, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne

[GENERAL] PG_DUMP/RESTORE Would like an explanation of these (non-critical) errors

2009-07-02 Thread James B. Byrne
a nudge in the right direction. This issue at least has no overlong dates. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561

[GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread James B. Byrne
effective_from timestamp without time zone; ALTER TABLE currency_exchange_rates ALTER COLUMN effective_from SET STORAGE PLAIN; ALTER TABLE currency_exchange_rates ALTER COLUMN effective_from SET NOT NULL; -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] BETWEEN not matching on timestamp value]

2009-06-30 Thread James B. Byrne
On Tue, June 30, 2009 14:07, Tom Lane wrote: It's the eight-digit year field that it's unhappy with ... Duuuh! I suppose that it would... Thanks, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited

Re: [GENERAL] cygwin and postgresql

2009-06-15 Thread James B. Byrne
out from that initial point. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561

Re: [GENERAL] cygwin and postgresql

2009-06-15 Thread James B. Byrne
to recollect, the owner of the development and test databases had dbcreate privileges. If the problem persists under the cygwin environment then I will revisit the native pg installation for testing. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn

[GENERAL] cygwin and postgresql

2009-06-14 Thread James B. Byrne
: pg_config.exe, pg_dump.exe and pg_dumpall.exe but no initdb.exe anywhere. Is there something about initdb that I do not understand or some reason why it would not form part of the cygwin installation? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn

Re: [GENERAL] cygwin and postgresql

2009-06-14 Thread James B. Byrne
in it. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent

Re: [GENERAL] cygwin and postgresql

2009-06-14 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] cygwin and postgresql

2009-06-14 Thread James B. Byrne
Found it. The cygwin executables for postgres are installed under /usr/sbin, which is NOT in the PATH thus the problem, and the obvious solution. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited

Re: [GENERAL] search for partial dates

2009-06-12 Thread James B. Byrne
-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql

[GENERAL] search for partial dates

2009-06-11 Thread James B. Byrne
Given a datetime column, not null, is there a single syntax that permits searching for all dates in a given year, year+month, and year+month+day such that a single parameterised query can handle all three circumstances? -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-21 Thread James B. Byrne
was doing something out of ignorance that was notoriously wrong, it seemed best to ask. Regards, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive

Re: [GENERAL] Help with join syntax sought

2009-05-20 Thread James B. Byrne
-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-20 Thread James B. Byrne
On Wed, May 20, 2009 13:07, James B. Byrne wrote: This seems to be working. I had to take a different approach as I had misapprehended GROUP BY completely. SELECT * FROM currency_exchange_rates AS xchg1 WHERE id IN ( SELECT id FROM currency_exchange_rates as xchg2 WHERE

Re: [GENERAL] Help with join syntax sought

2009-05-20 Thread James B. Byrne
1.151300 CAD AUD 2009-05-16 20:40:00 CLSE 1.142100 CAD USD 2009-05-19 20:40:00 CLSE 0.843100 CAD USD 2009-05-19 16:15:00 NOON 0.864400 -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte

[GENERAL] Help with join syntax sought

2009-05-19 Thread James B. Byrne
to include it in the GROUP BY clause as well. Any help is welcomed. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton

Re: [GENERAL] Help with join syntax sought

2009-05-19 Thread James B. Byrne
that returns every distinct combination of base, quote, timestamp, and type, then what? Unless I am missing something then I still have too many rows for those currencies with more than one type. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn

Re: [GENERAL] Help with join syntax sought

2009-05-19 Thread James B. Byrne
is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general

[GENERAL] Would like an explanation of these error messages.

2009-05-14 Thread James B. Byrne
; pg_restore: [archiver (db)] could not execute query: ERROR: schema public already exists Command was: CREATE SCHEMA public; WARNING: errors ignored on restore: 2 --- -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte

[GENERAL] No return from trigger function

2009-04-08 Thread James B. Byrne
is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general

Re: [GENERAL] No return from trigger function

2009-04-08 Thread James B. Byrne
On Wed, April 8, 2009 16:05, hubert depesz lubaczewski wrote: On Wed, Apr 08, 2009 at 03:59:22PM -0400, James B. Byrne wrote: EXCEPTION WHEN unique_violation THEN -- NULL -- do nothing RETURN NULL; -- AFTER trigger results are ignored anyway END

Re: [GENERAL] No return from trigger function

2009-04-08 Thread James B. Byrne
On Wed, April 8, 2009 16:06, Tom Lane wrote: James B. Byrne byrn...@harte-lyne.ca writes: I just need another set of eyes to see whatever it is that I am overlooking. The RETURN is inside the EXCEPTION clause. You really need two BEGINs here, one for the outer function body and one

Re: [GENERAL] INSERT or UPDATE TRIGGER

2009-04-07 Thread James B. Byrne
-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql

Re: [GENERAL] INSERT or UPDATE TRIGGER

2009-04-07 Thread James B. Byrne
done something wrong. Is there some way of getting PG to tell me what it is doing? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905

Re: [GENERAL] INSERT or UPDATE TRIGGER

2009-04-07 Thread James B. Byrne
I am testing the trigger function that I wrote. Is there a way to increase the logging detail level for just a single database instance? The manual indicates not, but just in case I am misreading things I am asking here? -- *** E-Mail is NOT a SECURE channel *** James B

Re: [GENERAL] INSERT or UPDATE TRIGGER

2009-04-07 Thread James B. Byrne
On Tue, April 7, 2009 16:07, Tom Lane wrote: You might find it more useful to add some elog(LOG) statements to the trigger body. Thank you again. I will go through section 44.2 tonight. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn

[GENERAL] INSERT or UPDATE

2009-04-06 Thread James B. Byrne
in straight SQL? Should it be straight SQL if possible? What should the function return, if anything? Fairly basic stuff I am sure but somewhat mystifying for me at the moment. Any help would be appreciated. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne

Re: [GENERAL] INSERT or UPDATE

2009-04-06 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] INSERT or UPDATE

2009-04-06 Thread James B. Byrne
*** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] INSERT or UPDATE

2009-04-06 Thread James B. Byrne
if the function handles a failed insert then if the function occurs inside a transaction then that transaction fails and is rolled back regardless? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http

[GENERAL] Rule or Function and Trigger?

2009-04-03 Thread James B. Byrne
? If one looks at things from a code maintenance standpoint it appears the the function and trigger approach is preferable. Is it? Opinions? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http

<    1   2   3   4   5   6   >