Re: [SQL] LOG: logger shutting down

2006-10-02 Thread Tom Lane
Bryce Nesbitt <[EMAIL PROTECTED]> writes: > My postmaster won't start. This is on a Fedora Core fc5 box, new and clean. > It's postgres 8.1.4. All I get is "LOG: logger shutting down" in the > pgstartup.log. My first instinct is to think selinux issue. Are you up2date on selinux policy patches

[SQL] LOG: logger shutting down

2006-10-02 Thread Bryce Nesbitt
My postmaster won't start. This is on a Fedora Core fc5 box, new and clean. It's postgres 8.1.4. All I get is "LOG: logger shutting down" in the pgstartup.log. I've checked for permission errors. At the relevant moment I get: # sh -x /etc/init.d/postgresql start ... ++ cat /var/lib/pgsql/data/

[SQL] Assigning a timestamp without timezone to a timestamp with timezone

2006-10-02 Thread chrisj
Hi Does any one have any ideas for the following problem? Two tables both the have open and close columns that are timestamp or timestamp with time zone. One row in first table represents the corporate office default open and close times for all stores relative to the store?s own time zone for a

Re: [SQL] How to FindNearest

2006-10-02 Thread Bruno Wolff III
On Sat, Sep 30, 2006 at 11:43:40 +0300, Alexander Ilyin <[EMAIL PROTECTED]> wrote: > > Suppose we have huge table. On the screen we need to show contents of that > table in the Grid and under that Grid user can input in TextBox some letters. > OnChange of this TextBox we need to make current r

Re: [SQL] Time interval sums

2006-10-02 Thread Tom Lane
"A. R. Van Hook" <[EMAIL PROTECTED]> writes: > How does one sum interval sums? > the following does not work: > select sum(stop-start::interval) as total from startstop Define "does not work"? What did you get, what were you hoping for? Personally I'd drop the unnecessary cast, but AFAICS there

[SQL] Time interval sums

2006-10-02 Thread A. R. Van Hook
How does one sum interval sums? the following does not work: select sum(stop-start::interval) as total from startstop where sid= 545 and 2006 = date_part('year', day) and 9 = date_part('month', day) however se

Re: [SQL] SEQUENCES

2006-10-02 Thread Thomas Kellerer
Rodrigo Sakai wrote on 02.10.2006 18:39: Hi all, I need to get all sequences and their respective current values! Is there any catalog table or any other away to get this??? Quote from the manual at: http://www.postgresql.org/docs/8.1/static/catalog-pg-class.html "The catalog pg_cl

Re: [SQL] SEQUENCES

2006-10-02 Thread Andrew Sullivan
On Mon, Oct 02, 2006 at 01:39:38PM -0300, Rodrigo Sakai wrote: > > I need to get all sequences and their respective current values! Is there > any catalog table or any other away to get this??? Here's a quick way to do it in a shell script, although it'd be sort of inefficient: for name in `ps

[SQL] SEQUENCES

2006-10-02 Thread Rodrigo Sakai
  Hi all,     I need to get all sequences and their respective current values! Is there any catalog table or any other away to get this???     Thanks in advance.

[SQL] Doubt with Joins

2006-10-02 Thread Ezequias Rodrigues da Rocha
Hi list,I have the following query:select distinct cli.id as id, cli.nome as Nome, c.numero as cardpass, cli.documento as Documento, cli.endereco as Endereco,cli.complemento as Complemento, cli.bairro as Bairro, cli.cidade as Cidade, cli.estado as UF, cli.cep as CEP, cli.telefone as Telefone, cli.

Re: [SQL] regexp_replace usage

2006-10-02 Thread chester c young
Thanks !Michael Fuhr <[EMAIL PROTECTED]> wrote:Offhand I can't think of a way to do what you want with regexp_replace()but you could use PL/Perl. Something like this should work:CREATE FUNCTION mcfix(text) RETURNS text AS $$ $_[0] =~ s/\bMc([a-z])/Mc\u$1/g; return $_[0];$$ LANGUAGE plperl IMMUTA