[SQL] Mysterious column "name"

2011-08-09 Thread Nikolay
, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit PostgreSQL 9.0.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit Is it a feature or a bug? I didn't found information in documentation about this. Best regards. Nikol

[SQL] fetching rows

2000-10-30 Thread Nikolay Mijaylov
Let say we have a select that returns 100 rows. I can fetch first 25 with simple sql: BEGIN WORK; DECLARE liahona CURSOR FOR SELECT * FROM films; FETCH [FORWARD] 25 IN liahona; CLOSE liahona; COMMIT WORK; but how I can fetch rows from 26 to 50? I mean withou fetching first 25. Or can I skip fir

[SQL] SELECT: retrieve only 2 rows next to known row

2005-09-09 Thread Nikolay Samokhvalov
make only one query? (at least with one row in result set - e.g., with the row _following_ after my one) I'd appreciate any help. -- Best regards, Nikolay ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Export to XML

2005-11-19 Thread Nikolay Samokhvalov
- > TIP 6: explain analyze is your friend > -- Best regards, Nikolay ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [SQL] Sequential scan where Index scan expected.

2006-03-04 Thread Nikolay Samokhvalov
> Seq Scan on xx_thing_event (cost=0.00..5842.48 rows=1 width=110) >Filter: (thing_event_id = 1) > (2 rows) > > > > ---(end of broadcast)--- > TIP 5: d

Re: [SQL] Check/unique constraint question

2006-03-05 Thread Nikolay Samokhvalov
a > check constraint for this type of situation, or do I need to create a function > to eval a check constraint? > > -- > Jeff Frost, Owner <[EMAIL PROTECTED]> > Frost Consulting, LLC http://www.frostconsultingllc.com/ > Phone: 650-780-7908 FAX: 650-649-1954 > >

Re: [SQL] Check/unique constraint question

2006-03-05 Thread Nikolay Samokhvalov
TRUE; END IF; END $BODY$ LANGUAGE plpgsql; ALTER TABLE foo ADD CONSTRAINT C_foo_iniq_if_true CHECK (active = FALSE OR id_is_valid(id)); On 3/5/06, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote: > Unfortunately, at the moment Postgres doesn't support subqueries in > CHECK con