[SQL] maintaining nested views

2009-10-11 Thread Maximilian Tyrtania
Quite often i find myself reluctant to nest views, because of the maintenance issues this usually involves. As you know, you can't easily alter the "lower level" views, because the higher level ones depend on them. So, to add a field to a lower level view one has to: drop view vw_lowlevel CASCADE;

Re: [SQL] Distinct oddity

2009-05-13 Thread Maximilian Tyrtania
x27;t think there is some gremlin business going on. Actually I'm interested in but in no way dependant on what's going on here, I just thought as a good pg-citizen I should report whatever might be wrong. Best, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Distinct oddity

2009-05-12 Thread Maximilian Tyrtania
t; LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL="C" > What platform are you using anyway? Mac OS 10.4.11 Best, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Distinct oddity

2009-05-12 Thread Maximilian Tyrtania
AKDB-#OWNER=postgres; ERROR: encoding LATIN9 does not match server's locale de_DE DETAIL: The server's LC_CTYPE setting requires encoding UTF8. FAKDB=# Now i'm deeply confused...So do i have to re-initdb? Best, Maximilian Tyrtania -- Sent via pgsql-sql mailing list

Re: [SQL] Distinct oddity

2009-05-10 Thread Maximilian Tyrtania
am 10.05.2009 4:58 Uhr schrieb Alvaro Herrera unter alvhe...@commandprompt.com: >>> and what locale are you running in? >> >> lc_collate | de_DE >> | Shows the collation order locale. >> lc_ctype| de_DE >> | Shows the character classification and cas

Re: [SQL] Distinct oddity

2009-05-09 Thread Maximilian Tyrtania
untime: 1669.998 ms (7 rows) > and what locale are you > running in? lc_collate | de_DE | Shows the collation order locale. lc_ctype| de_DE | Shows the character classification and case conversion locale. The encoding is UTF-8. Best, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Distinct oddity

2009-05-08 Thread Maximilian Tyrtania
am 07.05.2009 20:54 Uhr schrieb Scott Marlowe unter scott.marl...@gmail.com: > On Thu, May 7, 2009 at 2:21 AM, Maximilian Tyrtania > wrote: >> Hi there, >> >> does this look right? >> >> FAKDB=# select count(distinct(f.land)) from firmen f where

[SQL] Distinct oddity

2009-05-07 Thread Maximilian Tyrtania
6-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370) (1 row) Why would the 2 queries give different results? No inserts occurred in the meantime. tia, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

[SQL] Cloning hierarchical data

2008-07-24 Thread Maximilian Tyrtania
- root2 | 7 | root2sub1 | 8 | 7 root2sub2 | 9 | 7 Any pointers? thanks! Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Select default values

2008-07-23 Thread Maximilian Tyrtania
Pavel, fantastic, that's exactly what I wanted, thank you very much! Maximilian Tyrtania > Von: Pavel Stehule <[EMAIL PROTECTED]> >> Okay, here is one final (i hope) obstacle. My db has >200 tables and I'd >> love to be able to write some function that would j

Re: [SQL] Select default values

2008-07-23 Thread Maximilian Tyrtania
plpgsql function). With your way (insert into f(a,b) values(default, default) returning *) i need to know everything about the given table. Hmm. Any ideas? Best, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Select default values

2008-07-23 Thread Maximilian Tyrtania
Hi, > am Wed, dem 23.07.2008, um 10:32:58 +0200 mailte Maximilian Tyrtania > folgendes: >> Hi there, just a quickie: Is there a way to select all default values of a >> given table? Something like "Select Default values from sometable" ? > > test=# create tab

Re: [SQL] Select default values

2008-07-23 Thread Maximilian Tyrtania
t I don't actually want to insert the record just yet. I just want to hand the default values over to my app. Well, of course my app could still delete the record later on, but still that seems cumbersome.. Thanks a lot and best wishes from Berlin, Maximilian Tyrtania -- Sent via pg

[SQL] Select default values

2008-07-23 Thread Maximilian Tyrtania
them in one go would be handy... tia, Maximilian Tyrtania -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql