[SQL] Column limits in table/ views

2003-06-07 Thread A.M.
I have 560 columns of NUMERIC(10,14). To not run up against max column restraints, I split the information into two tables. Does the column limit on tables imply the same limit for views or selects or could I potentially select a row across both tables and make a view that hides the split? -

[SQL] EXTERN JOIN with WHEN query

2003-06-07 Thread javier garcia - CEBAS
Hi all; This is a query that I guess is not very dificult, but I'm a newbie; I've got a lot of tables, each of them with two columns: SELECT * FROM precal; -> (date) (real) fecha| precipitacion +--- 1996-01-01 | 0.6 1996-02-01 | 0.7 ..

Re: [SQL] simulating partial fkeys.. [ATTN Developers please]

2003-06-07 Thread Stephan Szabo
On Fri, 6 Jun 2003, Richard Huxton wrote: > On Thursday 05 Jun 2003 3:55 pm, [EMAIL PROTECTED] wrote: > > hi , > > > > Is there any way to enforce fkeys only on subset of > > the table something on the lines of unique partial indexes > > I'm afraid not (AFAIK). What might be a solution in your ca

[SQL] "Join" on delimeter aggregate query

2003-06-07 Thread Michael A Nachbaur
Hello everyone, I've set up PostgreSQL as the authentication / configuration database for my mail server (Postfix + Courier-IMAP), and though it works beautifully, I need some help on my aliases query. You see, define aliases in a database table as rows in a column in the form of "Source" and

[SQL] Elegant SQL solution:

2003-06-07 Thread Chris Gamache
There are so many (bad) ways to skin this cat... I'm looking for a more elegant solution. If I SELECT date_part('month',rowdate) as month, count(*) as rows FROM mytable GROUP BY month; It might only return month | rows ---+-- 1 | 234 3 | 998 4 | 403 5 | 252 10|

[SQL] (long) What's the problem?

2003-06-07 Thread David Olbersen
Anybody have any ideas about a problem with this query? urldb2=> EXPLAIN urldb2-> SELECT urldb2-> id, urldb2-> source, urldb2-> insertedby, urldb2-> insertedon, urldb2-> priority urldb2-> FROM urldb2-> indexscan urldb2-> WHERE urldb2-> lower( urldb2-> substring( urldb2-> ur

Re: [SQL] simulating partial fkeys..

2003-06-07 Thread Josh Berkus
Mallah, > Is there any way to enforce fkeys only on subset of > the table something on the lines of unique partial indexes > > or any work around ? (on update or insert trigger is the only thing i can > think of) so, why don't you ask me these questions? Nu? If you mean what I believe that yo

Re: [SQL] To ListAdms: Is pgsql-sql operating?

2003-06-07 Thread Chad Thompson
I see your post. But no others since Monday. Thanks Chad - Original Message - From: "Achilleus Mantzios" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 5:39 AM Subject: [SQL] To ListAdms: Is pgsql-sql operating? > > Is there any problem with [EMAIL PROTECTED

[SQL] (long) What's the problem?

2003-06-07 Thread David Olbersen
Anybody have any ideas about a problem with this query? urldb2=> EXPLAIN urldb2-> SELECT urldb2-> id, urldb2-> source, urldb2-> insertedby, urldb2-> insertedon, urldb2-> priority urldb2-> FROM urldb2-> indexscan urldb2-> WHERE urldb2-> lower( urldb2-> substring( urldb2-> ur

[SQL] Domains and Joins

2003-06-07 Thread chester c young
-- standard setup: create table t1( c1 int primary key, data text ); create domain dom_c1 int references t1 on delete cascade; create table t2( c2 int primary key, c1 dom_c1, moredata text ); -- will not work with "using" create view v1 as select t1.*, t2.moredata from t1 join t2 using( c1 ); --