Re: [SQL] Data Entry and Query forms

2006-06-30 Thread Jure Kodzoman
> > Before continuing our Plans, I need to know how can I do with > PostgreSQL in order to have Data Entry and Query Forms on clients side > (How can I design Data Entry and Query Forms). > Hy. You could try using BOND framework which works for both linux and win32. It is rather bad documented

Re: [SQL] Using In Clause For a Large Text Matching Query

2006-06-30 Thread Jason Farmer
Ah, I do think that sounds about like what I want! Let me play with this one some, thanks so much!! Richard Broersma Jr wrote: Well, there is also: href="http://www.postgresql.org/docs/8.1/interactive/functions-comparisons.html#AEN13377";> /expression/ /operator/ ANY (/array expression/). So,

[SQL] Views and query planner

2006-06-30 Thread Mario Splivalo
Let's say I have a view like this: CREATE VIEW v_small AS SELECT c1, c2 FROM t1 JOIN t2 ON t1.c1 = t2.c2 and then I have another view CREATE VIEW v_big AS SELECT c1 FROM v_small WHERE c2 > 5 Now, when I do this: SELECT * FROM v_big WHERE c1 < 1500 Is postgres going to make one query plan, or

Re: [SQL] Views and query planner

2006-06-30 Thread Michael Glaesemann
On Jun 30, 2006, at 21:35 , Mario Splivalo wrote: Is postgres going to make one query plan, or each view has it own query plan? Have you taken a look at the EXPLAIN ANALYZE output of the queries? You can see exactly which plan PostgreSQL will use. Michael Glaesemann grzm seespotcode net

Re: [SQL] Views and query planner

2006-06-30 Thread Mario Splivalo
On Fri, 2006-06-30 at 21:47 +0900, Michael Glaesemann wrote: > On Jun 30, 2006, at 21:35 , Mario Splivalo wrote: > > > Is postgres going to make one query plan, or each view has it own > > query > > plan? > > Have you taken a look at the EXPLAIN ANALYZE output of the queries? > You can see ex

Re: [SQL] Views and query planner

2006-06-30 Thread Markus Schaber
Hi, Mario, Mario Splivalo wrote: >>> Is postgres going to make one query plan, or each view has it own >>> query >>> plan? >> Have you taken a look at the EXPLAIN ANALYZE output of the queries? >> You can see exactly which plan PostgreSQL will use. > > So, the performance will be the same if

[SQL] Alternative to Select in table check constraint

2006-06-30 Thread Richard Broersma Jr
I am practicing with SQL examples comming from the book: JOE CELKO'S SQL PUZZLES & ANSWERS The following codes doesn't work on PostgreSQL 8.1.4 but according to the book does conform to SQL-92. Is there any other solutions that would result in the same effect? Or is this an example of a contr

Re: [SQL] How To Exclude True Values

2006-06-30 Thread Richard Broersma Jr
> Also, I produced a second query using PostgreSQL: > select a.id_i, a.ir_id, a.test, a.stamp > from test a > join > ( > select max(stamp) as mstamp, id_i > from test > group by id_i > ) b > on a.stamp = b.mstamp > where a.test = false > ; > -- result > id_i | ir_id | test |stamp > --

Re: [SQL] Alternative to Select in table check constraint

2006-06-30 Thread Michael Glaesemann
On Jul 1, 2006, at 6:55 , Richard Broersma Jr wrote: CHECK ( 1 = ALL ( SELECT COUNT(STATUS) FROM BADGES WHERE STATUS = 'A' GROUP BY EMPNO)) From the PostgreSQL docs (http://www.postgr

Re: [SQL] Alternative to Select in table check constraint

2006-06-30 Thread Richard Broersma Jr
> > CHECK ( 1 = ALL ( SELECT COUNT(STATUS) > > FROM BADGES > > WHERE STATUS = 'A' > > GROUP BY EMPNO)) > > From the PostgreSQL docs (http://www.postgresql.org/docs/8.1/ > interactive/sql

Re: [SQL] Alternative to Select in table check constraint

2006-06-30 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: > The following codes doesn't work on PostgreSQL 8.1.4 but according to > the book does conform to SQL-92. > CHECK ( 1 = ALL ( SELECT COUNT(STATUS) > FROM BADGES > WHERE ST

Re: [SQL] Alternative to Select in table check constraint

2006-06-30 Thread Richard Broersma Jr
> > The following codes doesn't work on PostgreSQL 8.1.4 but according to > > the book does conform to SQL-92. > > > CHECK ( 1 = ALL ( SELECT COUNT(STATUS) > > FROM BADGES > > WHERE STATUS = 'A' > >