Re: [GENERAL] 5 new entries for FAQ

2005-08-15 Thread Jim C. Nasby
On Wed, Aug 10, 2005 at 11:22:58PM +0200, Martijn van Oosterhout wrote: > On Wed, Aug 10, 2005 at 03:33:16PM -0400, Bruce Momjian wrote: > > For the batch job and single-CPU issues, they did not fit into existing > > FAQ entries, and I am not sure they are asked enough to be added as > > FAQs. I a

Re: [GENERAL] do separate databases have any impact each other?

2005-08-15 Thread Alvaro Herrera
On Mon, Aug 15, 2005 at 01:15:03PM -0700, TJ O'Donnell wrote: > While writing installation instructions for my new PostgreSQL product, I > found myself > writing the following sentence: > "For first time users, we recommend building the gnova database, > since it has no impact on other databases."

Re: [GENERAL] do separate databases have any impact each other?

2005-08-15 Thread Christopher Browne
> While writing installation instructions for my new PostgreSQL > product, I found myself writing the following sentence: "For first > time users, we recommend building the gnova database, since it has > no impact on other databases." > > Is this really true? Of course, my gnova database will take

Re: [GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread Christopher Browne
> I hope that you are well. Having read both books would your > recommendation be to go with Korry Douglas' book ? Two copies of the Douglas^2 book came in today at the office... I took a peruse of the chapter that everyone would expect I'd look at first, and was quite impressed. I haven't

Re: [GENERAL] converting curly apostrophes to standard apostrophes

2005-08-15 Thread CSN
--- Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Mon, Aug 15, 2005 at 01:48:00PM -0700, CSN wrote: > > db=>select ascii('’'); > > ascii > > --- > >226 > > > > db=>select id from news where body ilike '%’%'; > > (0 rows) > > > > db=>select id from news where body ilike '%' || > > chr(226

Re: [GENERAL] do separate databases have any impact each other?

2005-08-15 Thread Tom Lane
"TJ O'Donnell" <[EMAIL PROTECTED]> writes: > While writing installation instructions for my new PostgreSQL product, I > found myself > writing the following sentence: > "For first time users, we recommend building the gnova database, > since it has no impact on other databases." > Is this really

Re: [GENERAL] How to write jobs in postgresql

2005-08-15 Thread Jim C. Nasby
On Tue, Aug 09, 2005 at 03:26:27PM -0500, Guy Rouillier wrote: > chiranjeevi.i wrote: > > Hi Team Members, > > > > Is it possible to write jobs in postgresql & if possible how > > should I write .please help me. > > See pgjob in pgfoundry: http://pgfoundry.org/projects/pgjob/. It's in > the

Re: [GENERAL] Sorting by related tables

2005-08-15 Thread Bill Moseley
On Mon, Aug 15, 2005 at 11:30:32PM +0200, Andreas Seltenreich wrote: > > This would be one possibility. If you don't want your application to > deal with transactions being aborted because of non-serializable > transactions, you could alternatively use explicit locking (SELECT ... > FOR UPDATE) co

Re: [GENERAL] converting curly apostrophes to standard apostrophes

2005-08-15 Thread Michael Fuhr
On Mon, Aug 15, 2005 at 01:48:00PM -0700, CSN wrote: > db=>select ascii('’'); > ascii > --- >226 > > db=>select id from news where body ilike '%’%'; > (0 rows) > > db=>select id from news where body ilike '%' || > chr(226) || '%'; > db'> > db'>^C > db=> What's going on with the last que

Re: [GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread Aly Dharshi
Hello Richard, I hope that you are well. Having read both books would your recommendation be to go with Korry Douglas' book ? Cheers, Aly. WELTY, RICHARD wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Aly Dharshi does anybody have any recommendations

Re: [GENERAL] How to implement table caching

2005-08-15 Thread Thomas F. O'Connell
Andrus, You might consider something like materialized views: http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html Whether table caching is a good idea depends completely on the demands of your application. -- Thomas F. O'Connell Co-Founder, Information Architect Sitening,

Re: [GENERAL] Upgrading 8.0.2 to 8.0.3 on Windows XP

2005-08-15 Thread Giovanni M.
ok guys thanks for the help. I will follow this advice to upgrade my existing installation, I have already dumped by database as i keep backups of course, and Im sure I can figure it out. I was just hoping I didnt need to do much manual work, alas. gioOn 8/15/05, Magnus Hagander < [EMAIL PROTECTED

Re: [GENERAL] Sorting by related tables

2005-08-15 Thread Andreas Seltenreich
Bill Moseley schrob: > On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote: >> > 3) Oh, and I have also this for checking IF there are items in >> > "region" that are "above" the item in question -- to see IF an item >> > can or cannot be moved up in the sort order relative to othe

Re: [GENERAL] createlang

2005-08-15 Thread eoghan
On 15 Aug 2005, at 22:03, James Cradock wrote: Almost forgot: http://www.postgresql.org/docs/8.0/interactive/app-createlang.html I hope this and the prior reply help. On Aug 15, 2005, at 4:45 PM, eoghan wrote: Hi James Thanks! That got it... Exit psql prompt and ran createlang... Suppose s

Re: [GENERAL] createlang

2005-08-15 Thread Sean Davis
On 8/15/05 4:45 PM, "eoghan" <[EMAIL PROTECTED]> wrote: > Hello > Im trying to load plpgsql into my test db... Im wondering if theres a > way to check if its loaded... I do: > test-# createlang plpgsql test > test-# > When i try load an example function: > test-# \i test.sql > Im getting: > psql:t

Re: [GENERAL] createlang

2005-08-15 Thread eoghan
On 15 Aug 2005, at 21:58, Joshua D. Drake wrote: eoghan wrote: Hello Im trying to load plpgsql into my test db... Im wondering if theres a way to check if its loaded... I do: test-# createlang plpgsql test createlang is a command line client: bash# createlang -U postgres -P 5432 plpgsq

Re: [GENERAL] createlang

2005-08-15 Thread James Cradock
Almost forgot: http://www.postgresql.org/docs/8.0/interactive/app-createlang.html I hope this and the prior reply help. On Aug 15, 2005, at 4:45 PM, eoghan wrote: Hello Im trying to load plpgsql into my test db... Im wondering if theres a way to check if its loaded... I do: test-# createlan

Re: [GENERAL] createlang

2005-08-15 Thread James Cradock
Exit the psql prompt. Type the same command: createlang plpgsql test Then access your db: psql test And load your script: \i test.sql On Aug 15, 2005, at 4:45 PM, eoghan wrote: Hello Im trying to load plpgsql into my test db... Im wondering if theres a way to check if its loaded... I do:

Re: [GENERAL] createlang

2005-08-15 Thread Joshua D. Drake
eoghan wrote: Hello Im trying to load plpgsql into my test db... Im wondering if theres a way to check if its loaded... I do: test-# createlang plpgsql test createlang is a command line client: bash# createlang -U postgres -P 5432 plpgsql database What you are looking for is: CREATE LANGU

Re: [GENERAL] converting curly apostrophes to standard apostrophes

2005-08-15 Thread CSN
--- Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Mon, Aug 15, 2005 at 12:14:16PM -0700, CSN wrote: > > Is there a way to replace all curly apostrophes > with > > standard apostrophes (presumably with > replace(x,y,z))? > > My database is SQL_ASCII and I can't find a > character > > code for curly

[GENERAL] createlang

2005-08-15 Thread eoghan
Hello Im trying to load plpgsql into my test db... Im wondering if theres a way to check if its loaded... I do: test-# createlang plpgsql test test-# When i try load an example function: test-# \i test.sql Im getting: psql:test.sql:5: ERROR: language "plpgsql" does not exist HINT: You need to

[GENERAL] do separate databases have any impact each other?

2005-08-15 Thread TJ O'Donnell
While writing installation instructions for my new PostgreSQL product, I found myself writing the following sentence: "For first time users, we recommend building the gnova database, since it has no impact on other databases." Is this really true? Of course, my gnova database will take some dis

Re: [GENERAL] Inheritance vs. LIKE - need advice

2005-08-15 Thread Jeff Davis
William Bug wrote: > > > I'm not certain I understand what you mean here? Are you recommending > all application layer interaction with tables using INHERIT should be > done via a VIEW intermediary? If so, wouldn't the VIEW (built from a > "SELECT ... ONLY...") then be as dependent on the f

Re: [GENERAL] converting curly apostrophes to standard apostrophes

2005-08-15 Thread Michael Fuhr
On Mon, Aug 15, 2005 at 12:14:16PM -0700, CSN wrote: > Is there a way to replace all curly apostrophes with > standard apostrophes (presumably with replace(x,y,z))? > My database is SQL_ASCII and I can't find a character > code for curly apostrophes in ASCII here: > http://www.lookuptables.com, but

Re: [GENERAL] Apostrophe doesn't show up in command line

2005-08-15 Thread CSN
Ah, it's Western ISO-8859-1. Putty has the same setting. I tried changing putty's charset to UTF-8 and now curly apostrophes are displayed as a grey box in psql's output (e.g. "in today[box]s news..."). Thanks, CSN --- Richard Huxton wrote: > CSN wrote: > >>and check what > >>character set ph

Re: [GENERAL] Sorting by related tables

2005-08-15 Thread Bill Moseley
On Sat, Aug 13, 2005 at 06:44:09PM +0200, Andreas Seltenreich wrote: > > 3) Oh, and I have also this for checking IF there are items in > > "region" that are "above" the item in question -- to see IF an item > > can or cannot be moved up in the sort order relative to others. > > > > SELECT id F

Re: [GENERAL] Apostrophe doesn't show up in command line

2005-08-15 Thread Richard Huxton
CSN wrote: and check what character set phppgadmin is using (HINT: is it utf-8?) Hmm, how can you tell? I don't see character set specified anywhere in phppgadmin (including conf.inc.php). View > Character Encoding in firefox while you have a page open View > Encoding in IE -- Richard Hu

[GENERAL] converting curly apostrophes to standard apostrophes

2005-08-15 Thread CSN
Is there a way to replace all curly apostrophes with standard apostrophes (presumably with replace(x,y,z))? My database is SQL_ASCII and I can't find a character code for curly apostrophes in ASCII here: http://www.lookuptables.com, but nevertheless there appear to be curly apostrophes in the datab

Re: [GENERAL] Question about the NAME type used in pg_proc and pg_class

2005-08-15 Thread Michael Fuhr
On Mon, Aug 15, 2005 at 12:53:25PM -0400, Tom Lane wrote: > > regression=# select 1 > *** > 2; > server closed the connection unexpectedly > > with this in the log: > TRAP: FailedAssertion("!(keylen < 64)", File: "h

Re: [GENERAL] Linux Postgres authentication against active directory

2005-08-15 Thread Magnus Hagander
> > > Actually I try to authenticate my Linux Postgres installation > > > against Active Directory, I find 3 solution to use: > > > > > > 1) LDAP > > > 2) Pam and Kerberos > > > 3) Kerberos alone > > > > (3) is the one I've been using, and it works very well. I've been > > working on a HOWTO, b

Re: [despammed] Re: [GENERAL] ~/pgpass

2005-08-15 Thread Andreas Kretschmer
Oluwatope Akinniyi <[EMAIL PROTECTED]> schrieb: > Martijn van Oosterhout wrote: > > >> It's ~/.pgpass the dot is important. > > > > > > Thanks. Just a typo error in the mail. > > I did put the dot in the file name. The file on Fedora is ~/.pgpass and on > Windows it is in %APPDATA%/postgre

Re: [GENERAL] Apostrophe doesn't show up in command line

2005-08-15 Thread CSN
--- Richard Huxton wrote: > CSN wrote: > > In a field I have text like "in today's news..." > When > > I select that field in psql using putty (Latin-1), > > then apostrophe doesn't show up (shows up as > > "todays"), but it does show up in phppgadmin (and > > other php programs). Is this an issu

Re: [GENERAL] Encoding and Conversion Question(s)

2005-08-15 Thread Tom Lane
Dave Lazar <[EMAIL PROTECTED]> writes: > I have a database that was created with the encoding set to SQL_ASCII. > A lot of data comes with accented characters. You need to figure out what encoding that data is actually in (hint: it's not ASCII) and specify that encoding as the client_encoding in t

[GENERAL] Encoding and Conversion Question(s)

2005-08-15 Thread Dave Lazar
Hi, I have a database that was created with the encoding set to SQL_ASCII. A lot of data comes with accented characters. When reading this data with PHP, and using utf-8 as my broweser output charset, any accented characters are displayed as weird symbols. If I use the PHP function utf8_enco

Re: [GENERAL] error inserting big files in DB.

2005-08-15 Thread Joshua D. Drake
Marlos Corrêa wrote: Hi, Folks. I've a problem so i can use some help. I've trying to put a 5 MB file in my database, but i got an error. Anyone knows if "lo_import" or "lo" (type of bytea) has a limit of data transferred in one operation? Some people tell me that i can't transferr more than

Re: [GENERAL] ~/pgpass

2005-08-15 Thread Oluwatope Akinniyi
Martijn van Oosterhout wrote: >> It's ~/.pgpass the dot is important. > > Thanks. Just a typo error in the mail. I did put the dot in the file name. The file on Fedora is ~/.pgpass and on Windows it is in %APPDATA%/postgresql as pgpass.conf. It did not work in Windows and Fedora. Tope A

Re: [GENERAL] Question about the NAME type used in pg_proc and pg_class

2005-08-15 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > See "Identifiers and Key Words" in the "SQL Syntax" chapter: > "The system uses no more than NAMEDATALEN-1 characters of an identifier; > longer names can be written in commands, but they will be truncated. By > default, NAMEDATALEN is 64 so the maximum

Re: [GENERAL] error inserting big files in DB.

2005-08-15 Thread Richard Huxton
Marlos Corrêa wrote: Hi, Folks. I've a problem so i can use some help. I've trying to put a 5 MB file in my database, but i got an error. Anyone knows if "lo_import" or "lo" (type of bytea) has a limit of data transferred in one operation? There are two things here - large-objects (accesse

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Sven Willenberger
On Mon, 2005-08-15 at 11:48 -0400, Madison Kelly wrote: > Douglas McNaught wrote: > > Madison Kelly <[EMAIL PROTECTED]> writes: > > > > > >> I want to use a 'serial uniue' column in a table but there is > >> likely to be many, many inserts and deletes from this column. I was > >> wondering,

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Madison Kelly
Michael Fuhr wrote: On Mon, Aug 15, 2005 at 11:07:31AM -0400, Madison Kelly wrote: This might seem like an odd question but I couldn't find the answer in the docs (did I miss the obvious?). The serial type is a just convenient way to define an integer column that takes its default value fro

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Douglas McNaught
Madison Kelly <[EMAIL PROTECTED]> writes: > Douglas McNaught wrote: >> Madison Kelly <[EMAIL PROTECTED]> writes: >> >>> I want to use a 'serial uniue' column in a table but there is >>> likely to be many, many inserts and deletes from this column. I was >>> wondering, what happens when the

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Michael Fuhr
On Mon, Aug 15, 2005 at 11:07:31AM -0400, Madison Kelly wrote: > This might seem like an odd question but I couldn't find the answer > in the docs (did I miss the obvious?). The serial type is a just convenient way to define an integer column that takes its default value from a sequence, so loo

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Douglas McNaught
Madison Kelly <[EMAIL PROTECTED]> writes: >I want to use a 'serial uniue' column in a table but there is >likely to be many, many inserts and deletes from this column. I was >wondering, what happens when the serial value reaches >2,147,483,647'? Does it roll back over to '1' and ke

Re: [GENERAL] Serial Unique question

2005-08-15 Thread Madison Kelly
Douglas McNaught wrote: Madison Kelly <[EMAIL PROTECTED]> writes: I want to use a 'serial uniue' column in a table but there is likely to be many, many inserts and deletes from this column. I was wondering, what happens when the serial value reaches 2,147,483,647'? Does it roll back ov

Re: [GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread David Fetter
On Mon, Aug 15, 2005 at 11:19:29AM -0400, WELTY, RICHARD wrote: > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Aly Dharshi > > > does anybody have any recommendations which one to get ? > > > 1) PostgreSQL by Korry Douglas (SAMS) > > http://www.samspublishing.com/title/06

Re: [GENERAL] Question about the NAME type used in pg_proc and pg_class

2005-08-15 Thread Michael Fuhr
On Mon, Aug 15, 2005 at 10:02:01AM -0500, Tony Caduto wrote: > Just had a quick question about the name type used by pg_proc and > pg_class etc to return the name of a function,table,seq,view etc. > > Is this type limited to 64 bytes? ( could not find it in the docs) See the "Character Types"

Re: [GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread WELTY, RICHARD
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Aly Dharshi > does anybody have any recommendations which one to get ? > 1) PostgreSQL by Korry Douglas (SAMS) > http://www.samspublishing.com/title/0672327562 i like the first edition of Douglas very much, i presume that this se

Re: [GENERAL] Question about the NAME type used in pg_proc and pg_class

2005-08-15 Thread Tony Caduto
Never mind, I found it. I just did not scroll down on the page to see the "Special Char" types. Thanks, Tony Hi, Just had a quick question about the name type used by pg_proc and pg_class etc to return the name of a function,table,seq,view etc. Is this type limited to 64 bytes? ( could no

[GENERAL] error inserting big files in DB.

2005-08-15 Thread Marlos Corrêa
Hi, Folks. I've a problem so i can use some help. I've trying to put a 5 MB file in my database, but i got an error. Anyone knows if "lo_import" or "lo" (type of bytea) has a limit of data transferred in one operation? Some people tell me that i can't transferr more than 1 MB a time to Postgres

Re: [GENERAL] Authenticating using Windows XP login

2005-08-15 Thread Richard Sydney-Smith
Thanks Magnus, I was specifically trying to avoid the "log into everything" approach. Figured that if the user has logged into the computer that should be sufficient to establish their identity. Magnus Hagander wrote: Was looking to see if I could get pgAdmin to log into postgresql

[GENERAL] Serial Unique question

2005-08-15 Thread Madison Kelly
Hi all, This might seem like an odd question but I couldn't find the answer in the docs (did I miss the obvious?). I want to use a 'serial uniue' column in a table but there is likely to be many, many inserts and deletes from this column. I was wondering, what happens when the serial val

[GENERAL] Question about the NAME type used in pg_proc and pg_class

2005-08-15 Thread Tony Caduto
Hi, Just had a quick question about the name type used by pg_proc and pg_class etc to return the name of a function,table,seq,view etc. Is this type limited to 64 bytes? ( could not find it in the docs) Must function/table names be limited to 64 characters in length? Thanks, Tony ---

Re: [GENERAL] libpy and ENABLE_THREAD_SAFETY=1

2005-08-15 Thread Magnus Hagander
> >>Is the standard libpq.dll distributed by PostgreSQL8.0 for windows > >>thread safe by default ? > >> > >> > > > >No. > >It is safe as long as you use each PGconn on a separate > thread but you > >cannot share the same PGconn between threads. > > > >//Magnus > > > > > > > > > But what i

Re: [GENERAL] Authenticating using Windows XP login

2005-08-15 Thread Magnus Hagander
> Was looking to see if I could get pgAdmin to log into > postgresql 8.0.3 on Windows XP using the current windows > login information. Tried using the ident functionality on > pg_hba.conf to no avail. > > Can someone post a link to a how to on this subject please? > > Also can anyone tell m

Re: [GENERAL] Optimizing query

2005-08-15 Thread Poul Møller Hansen
You're not there yet: you want what Richard said, namely I realized that it wasn't optimal for all nodes, namely those with a lot of rows. So you are absolutely right, I followed the suggestion of Richard and it works perfect. Thank you all, I learned a lesson of indexes today... Poul

[GENERAL] Postgresql Books: Which one ?

2005-08-15 Thread Aly Dharshi
Hello All, I hope that you are well. I noticed that Chapters (in Canada atleast) has these books for sale, does anybody have any recommendations which one to get ? 1) PostgreSQL by Korry Douglas (SAMS) http://www.samspublishing.com/title/0672327562 2) beginning Databases With Postgresql: F

Re: [GENERAL] hash-join forgets tuples

2005-08-15 Thread Sebastian Freundt
Tom Lane <[EMAIL PROTECTED]> writes: > Sebastian Freundt <[EMAIL PROTECTED]> writes: >> using a highly surjective left (or inner) join to a table reveals data >> loss if the hash join method is used. > > In which PG version? Given that you appear to be playing with 8.1devel > code, you might be

Re: [GENERAL] Optimizing query

2005-08-15 Thread Tom Lane
=?ISO-8859-1?Q?Poul_M=F8ller_Hansen?= <[EMAIL PROTECTED]> writes: > explain analyze SELECT * FROM my.table WHERE node = '10' ORDER BY node, > id DESC LIMIT 1 > QUERY > PLAN

Re: [GENERAL] hash-join forgets tuples

2005-08-15 Thread Tom Lane
Sebastian Freundt <[EMAIL PROTECTED]> writes: > using a highly surjective left (or inner) join to a table reveals data > loss if the hash join method is used. In which PG version? Given that you appear to be playing with 8.1devel code, you might be needing this bug fix: 2005-07-23 22:25 tgl

Re: [GENERAL] vacuum error "left link changed unexpectedly"

2005-08-15 Thread Tom Lane
Ulrich Wisser <[EMAIL PROTECTED]> writes: > INFO: vacuuming "public.userclick" > INFO: index "userclick_i01" now contains 13715747 row versions in 60640 > pages > DETAIL: 0 index row versions were removed. > 14209 index pages have been deleted, 14209 are currently reusable. > CPU 2.46s/6.06u se

[GENERAL] hash-join forgets tuples

2005-08-15 Thread Sebastian Freundt
Hello, using a highly surjective left (or inner) join to a table reveals data loss if the hash join method is used. Here, highly surjective means I have a table with about 1.4 million tuples which map to a table with about 4 tuples. Now here's the explanation: qaos=# explain select anfs.an

[GENERAL] libpq.dll - how to check if field is nullable

2005-08-15 Thread Pit M.
Which function of libpq.dll should one use to determine if a field may contain NULL values ? ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Authenticating using Windows XP login

2005-08-15 Thread Richard Sydney-Smith
Was looking to see if I could get pgAdmin to log into postgresql 8.0.3 on Windows XP using the current windows login information. Tried using the ident functionality on pg_hba.conf to no avail. Can someone post a link to a how to on this subject please? Also can anyone tell me if there is an

Re: [GENERAL] atomic function

2005-08-15 Thread Tino Wildenhain
Mage schrieb: Hello! What's wrong with this function? public | common_adviewnum_increase | integer | bigint, character varying | postgres | plpgsql | declare row record; result int; begin select into row viewnum from common_adviewnum where adid = $1 and s

Re: [GENERAL] atomic function

2005-08-15 Thread Dennis Bjorklund
On Mon, 15 Aug 2005, Mage wrote: > 2005-08-12 19:08:43: ERROR: duplicate key violates unique constraint > "common_adviewnum_adid_site_day_index" Between your select and your insert someone else inserted a row making the insert fail. See this example of how you can update or insert depending

Re: [GENERAL] Optimizing query

2005-08-15 Thread Dennis Bjorklund
On Mon, 15 Aug 2005, Poul Møller Hansen wrote: > I have a problem creating a usable index for the following simple query: > SELECT * FROM my.table WHERE node = '10' ORDER BY id DESC LIMIT 1 > > id is a serial, so the query is to find the latest entry to a given node > and id is the primary key.

[GENERAL] atomic function

2005-08-15 Thread Mage
Hello! What's wrong with this function? public | common_adviewnum_increase | integer | bigint, character varying | postgres | plpgsql | declare row record; result int; begin select into row viewnum from common_adviewnum where adid = $1 and site = $2 and da

Re: [GENERAL] vacuum error "left link changed unexpectedly"

2005-08-15 Thread Ulrich Wisser
Hi Tom, I did run vacuum verbose". INFO: vacuuming "public.userclick" INFO: index "userclick_i01" now contains 13715747 row versions in 60640 pages DETAIL: 0 index row versions were removed. 14209 index pages have been deleted, 14209 are currently reusable. CPU 2.46s/6.06u sec elapsed 186.

Re: [GENERAL] Optimizing query

2005-08-15 Thread Poul Møller Hansen
I have a problem creating a usable index for the following simple query: SELECT * FROM my.table WHERE node = '10' ORDER BY id DESC LIMIT 1 id is a serial, so the query is to find the latest entry to a given node and id is the primary key. You're not necessarily getting the latest entry, jus

Re: [GENERAL] Optimizing query

2005-08-15 Thread Richard Huxton
Poul Møller Hansen wrote: I have a problem creating a usable index for the following simple query: SELECT * FROM my.table WHERE node = '10' ORDER BY id DESC LIMIT 1 id is a serial, so the query is to find the latest entry to a given node and id is the primary key. You're not necessarily getti

[GENERAL] Optimizing query

2005-08-15 Thread Poul Møller Hansen
I have a problem creating a usable index for the following simple query: SELECT * FROM my.table WHERE node = '10' ORDER BY id DESC LIMIT 1 id is a serial, so the query is to find the latest entry to a given node and id is the primary key. The table contains around 1 million records and the query

Re: [GENERAL] Upgrading 8.0.2 to 8.0.3 on Windows XP

2005-08-15 Thread Magnus Hagander
> Hello Giovanni, > > I had a similar problem. I think the windows installer tries > to create a new service which he can't, since there is > already one with the same name. I uninstalled Postgresql but > told it to keep the data directory, rebooted the machine > (that's important since only

Re: [GENERAL] Apostrophe doesn't show up in command line

2005-08-15 Thread Richard Huxton
CSN wrote: In a field I have text like "in today's news..." When I select that field in psql using putty (Latin-1), then apostrophe doesn't show up (shows up as "todays"), but it does show up in phppgadmin (and other php programs). Is this an issue with psql, or putty (or something else)? It's

Re: [GENERAL] Upgrading 8.0.2 to 8.0.3 on Windows XP

2005-08-15 Thread Frank Rittinger
Hello Giovanni, I had a similar problem. I think the windows installer tries to create a new service which he can't, since there is already one with the same name. I uninstalled Postgresql but told it to keep the data directory, rebooted the machine (that's important since only then the old