Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Rodrigo Gonzalez
Directory permissions for user the user running the service? Ottó Havasvölgyi wrote: Magnus, It's a service, and it is 8.0.6. I have fixed the registry to this value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" The service does not start

Re: [GENERAL] Unable to connect to a dabase

2006-01-13 Thread Sally Sally
Yes a backend gets spewed. Actually it did connect me finally (I am not sure exactly how long it took). I checked back after about four hours and I was connected. I have also noticed in the past that after running vacuum the client (psql) takes longer than usual to connect. Thanks all sally

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Joshua D. Drake
Sincerely, Joshua D. Drake Why would you only recommend Slony? How does it compare to Sequoia or p/cluster? Well p/cluster is not OSS. Sequioa is but is query based and doesn't correctly deal with things like now(). I was speaking directly about OSS replication. Sincerely, Joshua D.

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Brendan Duddridge
On Jan 13, 2006, at 4:00 PM, Joshua D. Drake wrote: Why just Slony? There's at least 2 other free replication solutions I can think of off the top of my head, and I'm sure I'm missing some. Slony is the only free OSS postgreSQL replication solution that I would ever suggest to someone. H

Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Ottó Havasvölgyi
Magnus, It's a service, and it is 8.0.6. I have fixed the registry to this value: "C:\Program Files\PostgreSQL\8.0\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D "E:\PostgreSQL\data\" The service does not start. This new directory definetely exists. But now there is no Event log entry about the err

Re: [GENERAL] Unable to connect to a dabase

2006-01-13 Thread Joshua D. Drake
LOG: database system was shut down at 2006-01-13 18:04:05 EST LOG: checkpoint record is at 505/C80F1010 LOG: redo record is at 505/C80F1010; undo record is at 0/0; shutdown TRUE LOG: next transaction ID: 1341794294; next OID: 1358710904 LOG: database system is ready Well, that looks lik

Re: [GENERAL] Unable to connect to a dabase

2006-01-13 Thread Jim Nasby
Please do group replies so the list gets cc'd. > From: Sally Sally [mailto:[EMAIL PROTECTED] > The main reason I decided to kill the vacuum was because > there were several > postmaster processes spewed from scripts trying to access the > database and > they were all hanging. After killing the

[GENERAL] Apache::DBI and DBD::Pg

2006-01-13 Thread Tyler MacDonald
Apache::DBI claims that it will reconnect to a database if it's gone away. DBD::Pg claims that it supports the ping method. However, when I restart my database server while apache2 is running, all mod_perl pages that are database driven return internal server errors, no matter how many times I refr

Re: [GENERAL] Unable to connect to a dabase

2006-01-13 Thread Sally Sally
I'm sorry that was not intentional. From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: Sally Sally <[EMAIL PROTECTED]> CC: pgsql-general@postgresql.org Subject: Re: [GENERAL] Unable to connect to a dabase Date: Fri, 13 Jan 2006 16:55:16 -0600 Please don't hijack threads fo new questions. On Fri, J

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Andrew Sullivan
On Fri, Jan 13, 2006 at 10:39:06PM -, Greg Sabino Mullane wrote: > > I would presume that at least packaged with PG (in the contrib section) > would be a good start. A prominent, east to find link to Slony on But in Slony's case, that'd be a regression, not an improvement. It is designed, on

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Joshua D. Drake
Jim C. Nasby wrote: On Fri, Jan 13, 2006 at 10:39:06PM -, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Easy everyone. Let's not bite the newcomers too hard here. 2. Define "endorse". Does that mean "in the backend"? So everyone has to pay the performanc

Re: [GENERAL] Unable to connect to a dabase

2006-01-13 Thread Jim C. Nasby
Please don't hijack threads fo new questions. On Fri, Jan 13, 2006 at 10:45:51PM +, Sally Sally wrote: > I had to kill a vacuum in the middle with -9. I shut down and restarted the > postgres server several times after that but I am unable to connect to the > db that I was initially running

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Fri, Jan 13, 2006 at 10:39:06PM -, Greg Sabino Mullane wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Easy everyone. Let's not bite the newcomers too hard here. > > > 2. Define "endorse". Does that mean "in the backend"? So > > everyone has to pay the performance

[GENERAL] Unable to connect to a dabase

2006-01-13 Thread Sally Sally
I had to kill a vacuum in the middle with -9. I shut down and restarted the postgres server several times after that but I am unable to connect to the db that I was initially running vacuum on I'm doing "psql dbname" and it hangs for a while. I'm still waiting. Any ideas? Thanks

Re: [GENERAL] Indexing Question

2006-01-13 Thread Jim C. Nasby
On Thu, Jan 12, 2006 at 01:16:00PM -0800, Mike wrote: > Hi, > > My table structure is the following: > > tbl_A one-to-many---> tbl_B one-to-many---> tbl_C > > Since it was important for me to trace back tbl_C records back to > tbl_A, I placed a tbl_A_id inside tbl_C. > > Now, in order t

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Easy everyone. Let's not bite the newcomers too hard here. > 2. Define "endorse". Does that mean "in the backend"? So > everyone has to pay the performance penalty even though they won't > all use it? Even though no other database system mak

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Fri, Jan 13, 2006 at 04:49:02PM -0500, Jaime Casanova wrote: > There has been announce recently about a project for analizing slow queries: > http://archives.postgresql.org/pgsql-announce/2006-01/msg7.php Sure, but it still means installing an external tool, which requires PHP, which isn't

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Fri, Jan 13, 2006 at 02:59:47PM -0700, Michael Fuhr wrote: > On Fri, Jan 13, 2006 at 03:40:48PM -0600, Jim C. Nasby wrote: > > It strikes me that if we had a way to abort a statement on another > > backend, you could abort anything that's been waiting more than x > > seconds for a lock via an ex

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Fri, Jan 13, 2006 at 03:15:06PM +0100, Mikael Carneholm wrote: > >> > >> Too bad - I think that will keep a lot of potential users from > >> evaluating Pg as a serious alternative. Good or bad, decide for > >> yourself :) > > >Why on earth should that be? > > Citing Baldur Norddahl > (http://

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Michael Fuhr
On Fri, Jan 13, 2006 at 03:40:48PM -0600, Jim C. Nasby wrote: > It strikes me that if we had a way to abort a statement on another > backend, you could abort anything that's been waiting more than x > seconds for a lock via an external process watching pg_locks. Of course, > that would be much more

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Andrew Sullivan
Sigh. This old chestnut. On Fri, Jan 13, 2006 at 03:15:06PM +0100, Mikael Carneholm wrote: > > Citing Baldur Norddahl > (http://archives.postgresql.org/pgsql-general/2006-01/msg00597.php): > > "I will also point out that none of the replication solutions have > the same solid reputation as post

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jaime Casanova
On 1/13/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > On Thu, Jan 12, 2006 at 10:36:39AM -0800, Joshua D. Drake wrote: > > Mikael Carneholm wrote: > > >>In terms of statistics we do have statistics and exhaustive logging that > > >>can provide you with all of that information. Is there something >

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Fri, Jan 13, 2006 at 01:59:19AM -0700, Michael Fuhr wrote: > On Fri, Jan 13, 2006 at 01:49:02AM -0700, Michael Fuhr wrote: > > On Fri, Jan 13, 2006 at 09:30:22AM +0100, H.J. Sanders wrote: > > > Just one request that would make the transition from another > > > great database to PostgreSQL a lot

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Jim C. Nasby
On Thu, Jan 12, 2006 at 10:36:39AM -0800, Joshua D. Drake wrote: > Mikael Carneholm wrote: > >>In terms of statistics we do have statistics and exhaustive logging that > >>can provide you with all of that information. Is there something > >>specific that > >>the information already provided reall

Re: [GENERAL] Create Produre for DROP row

2006-01-13 Thread Jim C. Nasby
On Wed, Jan 11, 2006 at 03:40:22PM -0600, Guy Rouillier wrote: > Marcos wrote: > > Hi, > > > > Does have possible create one procedure to delete a row that return > > TRUE if the deletion was success or FALSE if a error occur? > > > > The procedure for deletion I already create but I don't know

Re: [GENERAL] Concept about stored procedures

2006-01-13 Thread Jim C. Nasby
Using stored procedures as an API to the database is a perfectly acceptable way of doing things, and provides some nice benefits: You can lock out all other access to tables. This limits what can be done if the application gets compromised. It means you don't have to worry about people embedding

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread David Fetter
On Fri, Jan 13, 2006 at 02:23:29PM +0100, Martijn van Oosterhout wrote: > On Thu, Jan 12, 2006 at 08:51:44PM -0800, rlee0001 wrote: > > 1. > > Two new special variables in triggers functions (TG_STATEMENT and > > TG_EFFECTIVE_STATEMENT) which returns the statement that triggered > > the trigger. >

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread John Gray
Robert, Others have covered some of your topics. On Thu, 12 Jan 2006 20:51:44 -0800, rlee0001 wrote: > 7. > An XML field type and associated XPath/DOM functions. Other exotic > field types like Image might be nice for some people as well. But XML > would be awesome. > The contrib module xml2 (

[GENERAL] Encoding Problem

2006-01-13 Thread Marcos
Hi. I'm receiving this error message: invalid UTF-8 byte sequence detected SET search_path TO administracao,public; CREATE OR REPLACE FUNCTION inserirTela(text,text,text) RETURNS text AS ' DECLARE sName ALIAS FOR $1; sDesc ALIAS FOR $2; cSist ALIAS FOR $3; BEGIN

Re: [GENERAL] Error when inserting millions of records

2006-01-13 Thread Qingqing Zhou
"Rudolph" <[EMAIL PROTECTED]> wrote > Me and a friend are testing some operations for a search application in > PostgreSQL. In version 8.1 my friend tried to copy the result of a join > into another table, about 45.000.000 (small) records. This is the > result: > > testsearch=> insert into t_docum

Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> [ changing PGDATA doesn't seem to work on Windows ] > Are you running it as a service:? If so you need to reconfigure the service. > Unfortunatly,the only way to do this is using regedit. Go to > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread Jaime Casanova
On 1/13/06, Aly Dharshi <[EMAIL PROTECTED]> wrote: > > > > >> 10. > >> Or an alternative to views where tables can be defined with virtual > >> fields which point to functions. So for example I can say: > >> SELECT balance, name FROM customers WHERE balance < 0; > >> ...where balance actu

Re: [GENERAL] Temporary tables

2006-01-13 Thread Michael Fuhr
On Fri, Jan 13, 2006 at 05:23:42PM -, Raymond O'Donnell wrote: > The first time I call "select testfunc();", I get 0 as expected. > However, subsequent calls return an error: > > ERROR: relation with OID 80845 does not exist > CONTEXT: SQL statement "SELECT count(*) from TestTbl" > PL/pgSQ

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Joshua D. Drake
Aly Dharshi wrote: Active, active as in multi-master? More like a Oracle grid system. 10g. Heh. Well here is the thing. Oracle has billions of dollars. Plus. 1. We really don't compete against Oracle grid. The people that *need* Oracle grid, are going to buy Oracle grid. 2. We don'

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread Joshua D. Drake
You are wrong, you can make updatable views. Yes you can but not out of the box. You have to write some rules to make this go, isn't it ? I think the point is that out of the box, yes you can create an updateable view using rules. You can not just say: create view and have it updatea

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Aly Dharshi
Active, active as in multi-master? More like a Oracle grid system. 10g. -- Aly S.P Dharshi [EMAIL PROTECTED] "A good speech is like a good dress that's short enough to be interesting and long enough to cover the subject" ---(end o

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread Aly Dharshi
10. Or an alternative to views where tables can be defined with virtual fields which point to functions. So for example I can say: SELECT balance, name FROM customers WHERE balance < 0; ...where balance actually performs a behind the scenes JOIN against a transactions table and total

[GENERAL] Temporary tables

2006-01-13 Thread Raymond O'Donnell
Hi all, When you create a temporary table using the CREATE TEMPORARY TABLE AS... syntax, does the table get created (but left empty) if the query returns no rows? I'm seeing funny behaviour, and don't know whether it's my incomplete understanding or whether something weird really is happening.

Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Doug McNaught
Doug McNaught <[EMAIL PROTECTED]> writes: > Dumb question, but are you sure you exported the PGDATA variable? Is > it pointing to the directory that actually contains postgresql.conf? > > If you still have problems, post the exact error message that appears > in the logs. Duh, I didn't read the

Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Magnus Hagander
> Hello, > > I would like to move the data directory to another location. > I have done this: > 1. Stop PostgreSQL > 2. Move data directory > 3. Create a PGDATA env. variable to the new location 4. Start > PostgreSQL > > And it cannot start, because it cannot find postgresql.conf. > (in Event

Re: [GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Doug McNaught
Ottó Havasvölgyi <[EMAIL PROTECTED]> writes: > Hello, > > I would like to move the data directory to another location. I have done this: > 1. Stop PostgreSQL > 2. Move data directory > 3. Create a PGDATA env. variable to the new location > 4. Start PostgreSQL > > And it cannot start, because it ca

Re: [GENERAL] Problem with restoring database from 7.3.1 to 8.0.1

2006-01-13 Thread Tom Lane
Kai Hessing <[EMAIL PROTECTED]> writes: > I have a small problem. We're currently using an old PostgreSQL 7.3.1 > database. In near future we want to migrate to a new server and taking > the chance to upgrade postgres. Now I have a testsystem with postgres > 8.0.1 where I tried to import a dump fr

Re: [GENERAL] FATAL: terminating connection due to administrator command

2006-01-13 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > why is it coming: > FATAL: terminating connection due to administrator command Something sent the backend a SIGTERM signal. With no more information than that, it's difficult to say more. regards, tom lane --

[GENERAL] Moving PostgreSQL data directory on Windows

2006-01-13 Thread Ottó Havasvölgyi
Hello, I would like to move the data directory to another location. I have done this: 1. Stop PostgreSQL 2. Move data directory 3. Create a PGDATA env. variable to the new location 4. Start PostgreSQL And it cannot start, because it cannot find postgresql.conf. (in Event log) What should I do now

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Tom Lane
Karsten Hilbert <[EMAIL PROTECTED]> writes: > On Thu, Jan 12, 2006 at 07:46:18PM -0500, Tom Lane wrote: >> The comment's "have to" is an overstatement. The transaction would be >> treated as crashed anyway, it's just that this is a convenient place to >> make pg_clog a bit cleaner. I'm not real s

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Joshua D. Drake
Not really. The available options for postgresql are simply not as good as what the big databases offer. For some problems the non-transaction master/slave Slony-I is good enough. But to claim it is good enough for all, is like when MySQL claimed nobody really needs transactions. Nobody cla

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Mikael Carneholm
>> >> Too bad - I think that will keep a lot of potential users from >> evaluating Pg as a serious alternative. Good or bad, decide for >> yourself :) >Why on earth should that be? Citing Baldur Norddahl (http://archives.postgresql.org/pgsql-general/2006-01/msg00597.php): "I will also point out

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread John DeSoi
On Jan 13, 2006, at 8:47 AM, Michael Glaesemann wrote: You can definitely cast boolean to integer: The poster mentioned using PostgreSQL/PHP which may be the real source of the issue. Boolean values are returned to PHP as strings 't' and 'f'. Of course, 'f' is not equivalent to FALSE in P

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread John D. Burger
rlee0001 wrote: 2. The ability to typecast from boolean to other datatypes. For example: false::varchar ...would return varchar 'false' while: Why should it return 'false'? If anything, it seems to me it should do the same as this: # select false; bool -- f (1 row)

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread Michael Glaesemann
On Jan 13, 2006, at 13:51 , rlee0001 wrote: I've been using PostgreSQL 8.1 with EMS PostgreSQL Manager and PHP for about a month now and here are the top 10 features I'd like to see. Keep in mind that I'm a novice so we might have some of this and I just can't find it in the docs. There *i

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Martijn van Oosterhout
On Thu, Jan 12, 2006 at 10:40:40PM +0100, Baldur Norddahl wrote: > I will also point out that none of the replication solutions have the > same solid reputation as postgresql. As long the postgresql team will > not endorse a replication solution, you can not expect people to put the > same trust

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread Martijn van Oosterhout
On Thu, Jan 12, 2006 at 08:51:44PM -0800, rlee0001 wrote: > 1. > Two new special variables in triggers functions (TG_STATEMENT and > TG_EFFECTIVE_STATEMENT) which returns the statement that triggered the > trigger. Which would that be? The statement that directly invoked the trigger, or the one th

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Baldur Norddahl
Jeff Trout skrev: "Built In" Failover/Clustering This won't happen. The community stance, which is a good one is that no single replication solutions fits everyone's needs and therefore we rely out the outside sources. Slony-I, Mammoth Replicator and pgpool being the most popular. Too bad -

[GENERAL] Indexing Question

2006-01-13 Thread Mike
Hi, My table structure is the following: tbl_A one-to-many---> tbl_B one-to-many---> tbl_C Since it was important for me to trace back tbl_C records back to tbl_A, I placed a tbl_A_id inside tbl_C. Now, in order to optimize my database for speed, I want to index my tbl_B for it's tbl_A_

[GENERAL] PostgreSQL Top 10 Wishlist

2006-01-13 Thread rlee0001
I've been using PostgreSQL 8.1 with EMS PostgreSQL Manager and PHP for about a month now and here are the top 10 features I'd like to see. Keep in mind that I'm a novice so we might have some of this and I just can't find it in the docs. 1. Two new special variables in triggers functions (TG_STATE

[GENERAL] Problem with restoring database from 7.3.1 to 8.0.1

2006-01-13 Thread Kai Hessing
Hi Folks, I have a small problem. We're currently using an old PostgreSQL 7.3.1 database. In near future we want to migrate to a new server and taking the chance to upgrade postgres. Now I have a testsystem with postgres 8.0.1 where I tried to import a dump from our database. Everthing works fine

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Harry Jackson <[EMAIL PROTECTED]> wrote: % I am not aware of Oracle etc having a seperate company that sells % replication on top of their database although I could be wrong. There's more than one third-party replication offering for Oracle. -- Patrick TJ McPhee

Re: [GENERAL] Returning SQL statement

2006-01-13 Thread rlee0001
Thanks guys but I cannot use C on the database server. I am a lowly coder in a large organization and even getting pl/PGSQL loaded into the production database practically took an act of congress. So for now solutions that require stored procedures to be written in C are not an option. pl/Perl wou

[GENERAL] FATAL: terminating connection due to administrator command

2006-01-13 Thread surabhi.ahuja
Title: FATAL: terminating connection due to administrator command i am seeing the following in the postgreslog why is it coming: FATAL:  terminating connection due to administrator command thanks, regards Surabhi

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Karsten Hilbert
On Thu, Jan 12, 2006 at 07:46:18PM -0500, Tom Lane wrote: > > * Transaction was committed/aborted/crashed - we have to update pg_clog > > * if transaction is still marked as running. > > */ > > if (!TransactionIdDidCommit(xid) && !TransactionIdDidAbort(xid)) > > TransactionIdAbort(xid); >

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Michael Fuhr
On Fri, Jan 13, 2006 at 01:49:02AM -0700, Michael Fuhr wrote: > On Fri, Jan 13, 2006 at 09:30:22AM +0100, H.J. Sanders wrote: > > Just one request that would make the transition from another > > great database to PostgreSQL a lot easier: > > > > SET LOCK MODE TO WAIT n > > > > n = the max.time in

Re: [GENERAL] Locales problems with debian sarge3.1

2006-01-13 Thread Martijn van Oosterhout
On Thu, Jan 12, 2006 at 06:15:23PM +0100, Amédée wrote: > Hello, > > I saw lot of topics treating about the subject, but nowhere i found > real solutions. Has the bug been fixed? > Before initialising DB I fixed these variables : > (I don't use -E option of initdb) > > export LC_ALL=C > export

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Michael Fuhr
On Fri, Jan 13, 2006 at 09:30:22AM +0100, H.J. Sanders wrote: > Just one request that would make the transition from another > great database to PostgreSQL a lot easier: > > SET LOCK MODE TO WAIT n > > n = the max.time in second to wait. Will statement_timeout suffice? http://www.postgresql.org

Re: [GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
Take a look at the docs, in particular the three-parameter version of setval and the is_called flag. http://www.postgresql.org/docs/current/interactive/functions- sequence.html Thanks Michael, SELECT setval('tblperson_id_seq', 1, false); will do exactly what I supposed to get. Nico

Re: [GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Michael Fuhr
On Fri, Jan 13, 2006 at 09:02:17AM +0100, Nico Grubert wrote: > After I truncated tblperson I supposed that the Id will start with 1 > again if I insert a new record into tblperson. I thought, truncating the > table tblperson will also reset its sequence "tblperson_id_seq"!? Am I > wrong? Yes,

[GENERAL] Plans for 8.2?

2006-01-13 Thread H.J. Sanders
Hello. Just one request that would make the transition from another great database to PostgreSQL a lot easier: SET LOCK MODE TO WAIT n n = the max.time in second to wait. Please? My Christmas present?? For Christmas 2007 I like: statistics about how many sequential scans where have been for

Re: [GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Michael Glaesemann
On Jan 13, 2006, at 17:02 , Nico Grubert wrote: SELECT setval('tblperson_id_seq', 1); Any idea, how I can reset the sequence so it will start with 1 again? Take a look at the docs, in particular the three-parameter version of setval and the is_called flag. http://www.postgresql.org/docs/c

[GENERAL] How to reset a sequence so it will start with 1 again?

2006-01-13 Thread Nico Grubert
Hi there, I would like to reset a sequence so its id will start with 1 if I insert a new record into the table, after I have deleted all records from the table. I am using Postgres 8.03 and here is what I tried: test=# create table tblperson ( test(# id SERIAL NOT NULL, test(# name VARCHAR(2