Re: [SQL] Invalid message format Exception

2010-05-13 Thread Rob Sargent
On 05/13/2010 01:04 AM, Gnanakumar wrote: > Hi Rob, > >> I'm sure most will urge you to move to UTF-8 encoding asap. > Did you mean the database encoding to changed from SQL_ASCII to UTF-8? > Yes. That's pretty much the standard now. I think it's Postgres' default installation now (but don't

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread Justin Graf
On 5/13/2010 3:43 AM, Louis-David Mitterrand wrote: **snip*** > >> What do you mean by quite slow?? >> > Like several seconds. I have to cache the results. > Well then i suggest posting the queries to Performance or here and let us take a look them don't forget to include the explain/an

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread Justin Graf
On 5/13/2010 4:41 AM, silly sad wrote: > >>> First u count(*) the rows and select a requested page >>> returning to a client the count result bundled "with a page of rows" >>> >>> (1) client renders the acquired rows >>> (2)__memorize__ what part of the data he just got >>> (3) and stores the count

Re: [SQL] Greetings folks, dumb question maybe?

2010-05-13 Thread Joshua Tolley
On Thu, May 13, 2010 at 10:09:51AM +, Jasen Betts wrote: > On 2010-05-12, Josh wrote: > don't need a function for that one. > > INSERT INTO unpart_tbl_test > SELECT GENERATE_SERIES(0,999), > 'teststring data', > date '1995-01-01' +(floor(random()*36520)::int % 3652); ...and

Re: [SQL] [Trigger] Help needed with NEW.* and TG_TABLE_NAME

2010-05-13 Thread Jasen Betts
On 2010-05-11, Torsten Zühlsdorff wrote: > Hello, > > i have a problem with a trigger written in pl/pgsql. > > It looks like this: > > CREATE OR REPLACE FUNCTION versionize() > RETURNS TRIGGER > AS $$ > BEGIN > >NEW.revision := addContentRevision (OLD.content_id, OLD.revision); > >/* not w

Re: [SQL] Greetings folks, dumb question maybe?

2010-05-13 Thread Jasen Betts
On 2010-05-12, Josh wrote: > Hello, I'm a little new at this so please bear with me. > > I am trying to create a function that loads 100M test records into a > database, however I am having a hard time building the function that > does so. > > I'm trying to do this in PGAdmin III for Ubuntu. I

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread silly sad
First u count(*) the rows and select a requested page returning to a client the count result bundled "with a page of rows" (1) client renders the acquired rows (2)__memorize__ what part of the data he just got (3) and stores the count result to calculate "the pager div" all the subsequent clic

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread Louis-David Mitterrand
On Thu, May 13, 2010 at 11:36:53AM +0400, silly sad wrote: > On 05/12/10 09:41, Louis-David Mitterrand wrote: > >Hi, > > > >I have a large dataset (page 1 at http://www.cruisefish.net/stat.md) and > >am in the process of developping a pager to let users leaf through it > >(30K rows). > > > >Ideally

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread Louis-David Mitterrand
On Wed, May 12, 2010 at 12:26:17PM -0400, Justin Graf wrote: > oops typos > On 5/12/2010 1:41 AM, Louis-David Mitterrand wrote: > > Hi, > > > > I have a large dataset (page 1 at http://www.cruisefish.net/stat.md) and > > am in the process of developping a pager to let users leaf through it > > (30K

Re: [SQL] best paging strategies for large datasets?

2010-05-13 Thread silly sad
On 05/12/10 09:41, Louis-David Mitterrand wrote: Hi, I have a large dataset (page 1 at http://www.cruisefish.net/stat.md) and am in the process of developping a pager to let users leaf through it (30K rows). Ideally I'd like to know when requesting any 'page' of data where I am within the datas

Re: [SQL] Invalid message format Exception

2010-05-13 Thread Gnanakumar
Hi Rob, > I'm sure most will urge you to move to UTF-8 encoding asap. Did you mean the database encoding to changed from SQL_ASCII to UTF-8? > Have you tracked down the "offending" insert statement? Perhaps it's a > trigger trying to generate a log message? No, I don't have any trigger on this t