Re: [SQL] cannot create sequence

2001-02-14 Thread Olaf Zanger

hi there,

trouble means:

it doesn't show ver_id_seq, nor own_id_seq when doing a \ds
but it brings up an error "cannot create sequence) if i want to 
create table ver (id serial, ...);

this happend after i mistakenly did 
create table cng (id serial, ver_id int4 constraint ver_id_cst reference ver (id));

without having 
create table ver (id serial, ...);

this happend twice. the cli and ver now are nono's for my database.

thanks for help

olaf

Peter Eisentraut schrieb:
> 
> Olaf Marc Zanger writes:
> 
> > as it seems postgresql 7.0 has trouble to create
> >
> > ver_id_seq
> 
> Define "trouble".
> 
> --
> Peter Eisentraut  [EMAIL PROTECTED]   http://yi.org/peter-e/

-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com



Re: [SQL] cannot create sequence

2001-02-15 Thread Olaf Zanger

hi there,

good guess, they are still there.

can i just delete them?

olaf

Tom Lane schrieb:
> 
> Olaf Zanger <[EMAIL PROTECTED]> writes:
> > it doesn't show ver_id_seq, nor own_id_seq when doing a \ds
> > but it brings up an error "cannot create sequence) if i want to
> > create table ver (id serial, ...);
> 
> What is the *exact* text of the error message?  (That ain't it.)
> 
> I am guessing that a Unix file matching the desired sequence name got
> left around in your database directory, and that removing this file
> would allow you to create the sequence.  However, I can't duplicate
> any such problem by following the procedure you describe in 7.0.2...
> 
> regards, tom lane

-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com



Re: [SQL] cannot create sequence

2001-02-15 Thread Olaf Zanger

um, sorry,
forgot to ask

then this is a bug eh :-¦ ?

olaf

Tom Lane schrieb:
> 
> Olaf Zanger <[EMAIL PROTECTED]> writes:
> > it doesn't show ver_id_seq, nor own_id_seq when doing a \ds
> > but it brings up an error "cannot create sequence) if i want to
> > create table ver (id serial, ...);
> 
> What is the *exact* text of the error message?  (That ain't it.)
> 
> I am guessing that a Unix file matching the desired sequence name got
> left around in your database directory, and that removing this file
> would allow you to create the sequence.  However, I can't duplicate
> any such problem by following the procedure you describe in 7.0.2...
> 
> regards, tom lane

-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com



[SQL] sum(bool)?

2001-02-23 Thread Olaf Zanger

hi there

i'd like to add up the "true" values of a comparison like

sum(a>b)

it just doesn't work like this

any workaround

postgres 7.0 on linux

thanks

olaf
-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com



Re: [SQL] sum(bool)?

2001-02-23 Thread Olaf Zanger

hi there,

s cool, 
this works streight away and took 5 min. waiting for a answer :-)

thanks very much to you tod personal and the mailing list for existence.

Olaf

Tod McQuillin schrieb:
> 
> On Fri, 23 Feb 2001, Olaf Zanger wrote:
> 
> > i'd like to add up the "true" values of a comparison like
> >
> > sum(a>b)
> >
> > it just doesn't work like this
> 
> Try
> 
>  sum(case when a>b then 1 else 0 end)
> --
> Tod McQuillin

-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com