Ragnar Hafstað escreveu:
[how to solve the get next 100 records problem]
I tried that. It does not work in the generic case: 6 MegaRec, telephone
listing, alphabetical order.
lets say pkey is your primary key and skey is your sort key, and
there exists an index on (skey,pkey)
your first select
On Wed, 2005-05-18 at 00:13 +0200, PFC wrote:
> > your subsequent selects are
> > select ... from tab WHERE skey>skey_last
> >OR (skey=skey_last AND pkey>pkey_last)
> > ORDER BY skey,pkey
> > LIMIT 100 OFFSET 100;
>
> why offset
your subsequent selects are
select ... from tab WHERE skey>skey_last
OR (skey=skey_last AND pkey>pkey_last)
ORDER BY skey,pkey
LIMIT 100 OFFSET 100;
why offset ?
you should be able to use the skey, pkey values of the last row on the
On Tue, 2005-05-17 at 15:43 -0300, Alain wrote:
> [how to solve the get next 100 records problem]
I am assuming this is for a web like interface, in other words that
cursors are not applicable
> > [me]
> > if you are ordering by a unique key, you can use the key value
> > in a WHERE clause.
> >
On Tue, May 17, 2005 at 03:43:32PM -0300, Alain wrote:
>
> I tried using both the name and the primary key (with a combined index),
> to get faster to the record I want, but I was not sucessfull in building
> a where clause.
>
> I would appreciate any help, in fact this is my primary reason for
No. What is the purpose of your query? You could use ORDER BY and
LIMIT..OFFSET to do what you want. I think.
The problem is probably speed. I have done a lot of tests, and when
OFFSET gets to a few thousands on a multimega-recs database, it gets
very very slow...
is there not a similar loss
On Tue, 2005-05-17 at 13:15, Postgres Admin wrote:
> Hi
>
> I'm trying to insert encrypted data into the database and I'm noticing
> error dealing with quotes. Below is the error print out...
>
> suggestions and/or at least point me in the direction to find a solution,
>
> Thanks,
> J
>
>
>
Scott Marlowe wrote:
Use a bytea field and use pg_escape_bytea() to prepare the data for
insertion.
Thanks Scott, I will try it now.
J
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-noma
On 05/17/2005 01:07 PM, Bricklen Anderson wrote:
How about LISTEN and NOTIFY, would they work for this?
Yes, that is precisely what I need... and what I have somehow overlooked
during at least a dozen passes through the docs. Sigh.
Thanks for your help,
-jbp
--
Jay Parker - UALR Computing Serv
On Tue, 2005-05-17 at 14:48 -0300, Alain wrote:
>
> Andrew Sullivan escreveu:
> > On Thu, May 12, 2005 at 01:07:00PM -0600, [EMAIL PROTECTED] wrote:
> >
> >>Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If
> >>so, we can write the following query:
> >
> >
> > No. What is the
Hi
I'm trying to insert encrypted data into the database and I'm noticing
error dealing with quotes. Below is the error print out...
suggestions and/or at least point me in the direction to find a solution,
Thanks,
J
INSERT INTO sample.users (user_name, first_name) VALUES
('jokers', '=ïµiF!¶6
Jay Parker wrote:
I am trying to find the best way for a database trigger to signal a
client process to take an action.
Specifically, I am working on the classic problem of creating and
modifying system accounts based on the updates to a "person registry"
database.
The basic model I'm working
>I am trying to find the best way for a database trigger to signal a
>client process to take an action.
>
>Specifically, I am working on the classic problem of creating and
>modifying system accounts based on the updates to a "person registry"
>database.
>
>The basic model I'm working with has t
I am trying to find the best way for a database trigger to signal a
client process to take an action.
Specifically, I am working on the classic problem of creating and
modifying system accounts based on the updates to a "person registry"
database.
The basic model I'm working with has triggers
I'm just curious - what's the 'OFFSET 0' for?
Trick to fool postgres into thinking it can't rewrite out your subquery
and eliminate it ...
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Andrew Sullivan escreveu:
On Thu, May 12, 2005 at 01:07:00PM -0600, [EMAIL PROTECTED] wrote:
Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If
so, we can write the following query:
No. What is the purpose of your query? You could use ORDER BY and
LIMIT..OFFSET to do what you w
On Thu, May 12, 2005 at 13:07:00 -0600,
[EMAIL PROTECTED] wrote:
> Hi:
>
> Oracle has a pseudo-column "ROWNUM" to return the sequence number in which a
> row was returned when selected from a table. The first row ROWNUM is 1, the
> second is 2, and so on.
>
> Does Postgresql have a similar ps
On Thu, 2005-05-12 at 14:07, [EMAIL PROTECTED] wrote:
> Hi:
>
> Oracle has a pseudo-column "ROWNUM" to return the sequence number in which a
> row was returned when selected from a table. The first row ROWNUM is 1, the
> second is 2, and so on.
>
> Does Postgresql have a similar pseudo-column "
On Thu, May 12, 2005 at 01:07:00PM -0600, [EMAIL PROTECTED] wrote:
>
> Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If
> so, we can write the following query:
No. What is the purpose of your query? You could use ORDER BY and
LIMIT..OFFSET to do what you want. I think.
A
--
Hi,
The issue is due to records in Account_message is still exists for the
records which are going to be deleted from the Message table. Please check the
sequence of deleting the records.
When I tried to delete a record using your example, the following exception is
raised.
ERROR: update o
Hi:
Oracle has a pseudo-column "ROWNUM" to return the sequence number in which a
row was returned when selected from a table. The first row ROWNUM is 1, the
second is 2, and so on.
Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If so, we can
write the following query:
select
Anybody know how to return a setof from a plpython function?
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
You can select "for update", so you ensure that the rows are locked for
your current transaction's use exclusively. If the rows in question had
been modified by another ongoing transaction, then the select will get
blocked until the other transaction is finished.
Cheers,
Ezequiel Tolnay
[EMAIL
> SELECT your_concat( memo_text ) FROM
> (SELECT memo_id, sequence, memo_text FROM table ORDER BY memo_id,
sequence
> OFFSET 0) AS foo
> GROUP BY memo_id
I'm just curious - what's the 'OFFSET 0' for?
Dmitri
---(end of broadcast)---
TIP 5: Have yo
On Mon, May 16, 2005 at 17:36:21 -0400,
Joel Fradkin <[EMAIL PROTECTED]> wrote:
> I was using SET TRANSACTION ISOLATION LEVEL SERIALIZABLE in MSSQL.
>
>
>
> Is there something similar in postgres to ensure its not in the middle of
> being updated?
Postgres also has SET TRANSACTION ISOLATION
I actually had the same thought (a counter table, I might be able to add
fields to the location table, but we have several applications case is just
an example). I agree that is probably the safest way and it also fixes
another issue I have been having when a user wants to transfer a case to
anothe
Joel Fradkin wrote:
I was using SET TRANSACTION ISOLATION LEVEL SERIALIZABLE in MSSQL.
Is there something similar in postgres to ensure its not in the middle of
being updated?
Yep - see the SQL COMMANDS reference section under SET TRANSACTION ...
You could use LOCK TABLE too.
See Chapter 12 - Concu
27 matches
Mail list logo