Re: [GENERAL] Temporal Units

2007-04-28 Thread Tom Lane
Rich Shepard <[EMAIL PROTECTED]> writes: >If the requirements were in days, weeks, and months I could probably find > a time unit that worked -- including the PostgreSQL-specific solution. What gives you the idea that type INTERVAL is Postgres-specific? It's in the SQL standard.

Re: [GENERAL] CONSTRAINT name With Domain As Check

2007-04-28 Thread Tom Lane
Rich Shepard <[EMAIL PROTECTED]> writes: >I define a table, Permits, that includes a column for type. >Permit_Type is a domain with permissible names: > CREATE DOMAIN Permit_Type >as TEXT >CHECK (value in ('Environmental', 'Health', 'Safety', 'Occupancy')); >Can I name that do

Re: [GENERAL] DRI in Docs?

2007-04-28 Thread Alexander Staubo
On 4/29/07, Rich Shepard <[EMAIL PROTECTED]> wrote: I cannot find a discussion of the meaning and use of Declarative Referential Integrity (DRI) in the on-line docs ToC or Index. Please tell me in which chapter/section this is covered. The closest counterpart to MS SQL Server's DRI is the "r

[GENERAL] DRI in Docs?

2007-04-28 Thread Rich Shepard
I cannot find a discussion of the meaning and use of Declarative Referential Integrity (DRI) in the on-line docs ToC or Index. Please tell me in which chapter/section this is covered. Thanks, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem S

Re: [GENERAL] Temporal Units

2007-04-28 Thread Rich Shepard
On Sun, 29 Apr 2007, Alexander Staubo wrote: This is a common enough problem. Three factors come to mind: (1) Can all your intervals be expressed in absolute time units, such as number of days? "Work shift" is a human concept whose length is defined by context. Alexander, If the requiremen

Re: [GENERAL] Indirect access to data, given table name as a string

2007-04-28 Thread David Lee Lambert
On Sat, 2007-04-21 at 18:31 -0700, Arthaey Angosii wrote: > I want to allow "notes" on any row in any table in my database. A > table row may have multiple notes. Say my tables are "foo," "bar," and > "qux." I want to avoid having a lookup table for each of them > ("foo_notes," "bar_notes," and "qu

Re: [GENERAL] Temporal Units

2007-04-28 Thread Alexander Staubo
On 4/28/07, Rich Shepard <[EMAIL PROTECTED]> wrote: I would like to store a temporal frequency as NUMERIC, without units, and have the application's front end (or middleware) transform the number to the appropriate interval name. I'm having difficulties figuring out how to do this. This is a

[GENERAL] Temporal Units

2007-04-28 Thread Rich Shepard
I would like to store a temporal frequency as NUMERIC, without units, and have the application's front end (or middleware) transform the number to the appropriate interval name. I'm having difficulties figuring out how to do this. For example, an event might occur once per work shift, day, we

Re: [GENERAL] "Protocol error. Session setup failed" (PostgreSQL 8.3devel/postgresql-8.3dev-600.jdbc3)

2007-04-28 Thread Kris Jurka
On Sat, 28 Apr 2007, Marcelo de Moraes Serpa wrote: I've built PostgreSQL 8.3 devel with VC++ 2005, done all the db When I tried to run my web java application, I received the following PSQLException: ""Protocol error. Session setup failed" This is a known bug in the server in CVS. A rece

[GENERAL] tsearch2 and english locale on Debian - english.0 english.1

2007-04-28 Thread chrisj
Hi, the tsearch2 intro has instructions for creating a US_en locale, here is a snippet: .. it can be created from the /languages/english directory with the following command: sort -u -t/ +0f -1 +0 -T /usr/tmp -o english.med english.0 english.1 The problem is that the files english.0 and

[GENERAL] CONSTRAINT name With Domain As Check

2007-04-28 Thread Rich Shepard
I define a table, Permits, that includes a column for type. Permit_Type is a domain with permissible names: CREATE DOMAIN Permit_Type as TEXT CHECK (value in ('Environmental', 'Health', 'Safety', 'Occupancy')); Can I name that domain check within the Permits table as follows? CREATE

Re: [GENERAL] Processing a work queue

2007-04-28 Thread Andrew - Supernews
On 2007-04-26, Steve Crawford <[EMAIL PROTECTED]> wrote: > Anyone have any ideas on how to handle a work queue? Advisory locks (userlocks in pre-8.2). -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)

Re: [GENERAL] Query in function not using index...

2007-04-28 Thread Tom Lane
Listmail <[EMAIL PROTECTED]> writes: >> We were looking at the explain results and noticed that it was >> converting >> the 'wynn%' into fname >= 'wynn' and fname < 'wyno' > Does this also work if the last character is a unicode character ? In C locale it does, though you have to be caref

[GENERAL] "Protocol error. Session setup failed" (PostgreSQL 8.3devel/postgresql-8.3dev-600.jdbc3)

2007-04-28 Thread Marcelo de Moraes Serpa
Hello, I've built PostgreSQL 8.3 devel with VC++ 2005, done all the db initialization process (creating the data dir using initdb, registering it as a service using pg_ctl, etc) and tested by connecting to it through pgAdmin III, I even built a C extension and ran it as a SP in the pgAdmin SQL co

Re: [GENERAL] Some problem with warm standby server

2007-04-28 Thread Simon Riggs
On Fri, 2007-04-27 at 12:31 +0200, Nico Sabbi wrote: > I have some doubts regarding the settings and the access procedure of > warm standby servers: > - can autovacuum be safely enabled on the replicator? Not a relevant question. The standby isn't "up", so no SQL can be executed on the standby,

Re: [GENERAL] Processing a work queue

2007-04-28 Thread Lexington Luthor
Steve Crawford wrote: begin; select item-id, item-info from the-queue where available order by priority limit 1 for update; update the-queue set status = 'assigned' where item-id = previously-selected-item-id; commit; I do something similar in one of my apps: BEGIN; up

Re: [GENERAL] Query in function not using index...

2007-04-28 Thread Listmail
Tom, We were looking at the explain results and noticed that it was converting the 'wynn%' into fname >= 'wynn' and fname < 'wyno' Does this also work if the last character is a unicode character ? ---(end of broadcast)--- TIP 1: if