Re: [HACKERS] [ADMIN] how to alter sequence.

2002-12-04 Thread Joel Burton
ere is about how to raise the *max* value for the sequence, not how to set the current value higher. The sequence in question was created with a too-low maximum value (see help on CREATE SEQUENCE for options); the user now wants to raise it. - J. -- Joel BURTON | [EMAIL PROTECTED] | joelburton.

Re: [ADMIN] What kind of index to use for many rows with few unique values?

2002-12-02 Thread Joel Burton
0..1171.51 rows=44627 width=20) Filter: (state = 'ok'::character varying) (2 rows) Looks right to me: index scan for the less-common option, seqscan for the most common. Why don't you think this, as a btree, will work for you? -- Joel BURTON | [EMAIL PROTECTED] | joelburto

Re: [ADMIN] [SQL] CURRENT_TIMSTAMP

2002-12-02 Thread Joel Burton
functions). In some cases, this might be a better solution. - J. -- Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [ADMIN] What err ???

2002-06-07 Thread Joel Burton
or pgsql-sql, by the way. Two problems: . Strings are concatenated using ||, not +. 'Cat' || 'Dog' => 'CatDog', whereas 'Cat' + 'Dog' => ASCII result of this (not what you want) . IIf() is a nonstandard Microsoft function used in Ac

Re: [ADMIN] About a PL/pgSQL function

2002-06-06 Thread Joel Burton
#x27;'SELECT ... FROM '' || $1 || ...; FETCH cursorname INTO varname; CLOSE cursorname; RETURN varname; END; -- Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant ---(end of broadca

Re: [ADMIN] Problem in User Securities

2002-05-20 Thread Joel Burton
The default security setup in PG is to allow all connections from localhost, w/o password. This should be changed. You'll find this in your $PGDATA directory, in the file pg_hba.conf. - J. Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Knowledge Management & T

Re: [ADMIN] SERIAL Field

2002-05-06 Thread Joel Burton
> -Original Message- > From: Dan Langille [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 12:41 PM > To: Joel Burton > Cc: [EMAIL PROTECTED] > Subject: Re: [ADMIN] SERIAL Field > > > In any event, inserting then using currval() is the standard pract

Re: [ADMIN] SERIAL Field

2002-05-06 Thread Joel Burton
> -Original Message- > From: Joel Burton [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 10:51 AM > To: Rajesh Kumar Mallah.; Gaetano Mendola; [EMAIL PROTECTED] > Subject: RE: [ADMIN] SERIAL Field > > > > -Original Message- > > From: [EM

Re: [ADMIN] SERIAL Field

2002-05-06 Thread Joel Burton
quest a value, and someone else has beat you to it before you insert it. In any event, inserting then using currval() is the standard practice around here, and it works great. Nothing fishy at all here, nothing to see, move on. J. Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoel

Re: [ADMIN] SERIAL Field

2002-05-06 Thread Joel Burton
olumn 'test.id' NOTICE: CREATE TABLE / UNIQUE will create implicit index 'test_id_key' for table 'test' joel=# insert into test values (default); INSERT 16617 1 joel=# select currval('test_id_seq'); currval - 1 (1 row) See also nextval()

Re: [ADMIN] smart copy?

2002-04-26 Thread Joel Burton
COPY command. If that's a problem, you can reduce it a bit by dropping indexes and triggers on B.TheTable, doing the INSERTs, then re-adding these. Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Knowledge Management & Technology Consultant > -Original Message--

Re: [ADMIN] column name length

2002-03-09 Thread Joel Burton
u can recompile PG if you need more. -- Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [ADMIN] Dropped table screws referential integrity?

2002-03-07 Thread Joel Burton
techdocs.postgresql.org, I have a HOWTO on referential integrity that provides some views that make it easier to find the ref rules in effect in your tables. These are helpful for debugging. -- Joel BURTON | [EMAIL PROTECTED] | joelburton.com | aim: wjoelburton Independent Knowledge Man

Re: [ADMIN] Please help - tks

2001-10-18 Thread Joel Burton
or sql > whatever script > > Thanks for your help > Mike On the really Q&D, can you split (man split) your ID file into a few pieces, PG COPY this to temp tables (say 10 or 20), and use these smaller tables for your updates? -- Joel BURTON | [EMAIL PROTECTED] | joelburton.co

[ADMIN] Re: createuser withpassword

2001-05-04 Thread Joel Burton
with createuser. Instead: psql -c "CREATE USER foozle WITH PASSWORD 'blobby'" template1 HTH, -- Joel Burton <[EMAIL PROTECTED]> Director of Information Systems, Support Center of Washington ---(end of broadcast)--- TIP 2:

[ADMIN] Re: [possibly] dumb question

2001-05-04 Thread Joel Burton
d use that as your AFTER UPDATE trigger. BTW, this question should be sent to pgsql-general or pgsql-novice. pgsql-admin is mostly for administrative info about PostgreSQL. -- Joel Burton <[EMAIL PROTECTED]> Director of Information Systems, Support Center of Washington -

[ADMIN] Re: Queries

2001-05-04 Thread Joel Burton
r 'DEFELICE'. Is there a way I can do that? Is that what >the "ilike" function does? CREATE INDEX lname_lower ON person ( lower(lname) ); (above step is optional, but helps performance) SELECT * FROM person WHERE lower(lname) = 'defelice' should be faster

[ADMIN] Re: datetimeField = datetimeField - '30minutes'::timespan in psql7.0 or above

2001-04-30 Thread Joel Burton
sed to psql. As was pointed out, redirect pg_dump to a file, sed/perl/edit that, then redirect from that to psql. HTH, -- Joel Burton <[EMAIL PROTECTED]> Director of Information Systems, Support Center of Washington ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[ADMIN] Re: random rows

2001-04-26 Thread Joel Burton
3686233 | SARA MICHELLE > > 0.00226354412839913 | DAVID > > 0.00233715307076329 | RODOLFO > > (10 rows) How totally obvious in retrospect, and how much better of a solution than the ones I offered. D'oh! Thanks for posting it to the list. -- Joel Burton <[EMAIL P

[ADMIN] Re: logs

2001-04-25 Thread Joel Burton
On Wed, 25 Apr 2001, [EMAIL PROTECTED] wrote: > I have tryed to configure pg_options for logs but it was not successful Normally, you want to up your debug level in pg_options. Can you tell us more specifically what you've tried to do? -- Joel Burton <[EMAIL PROTECTED]&g

[ADMIN] Re: Problem with postgres

2001-04-25 Thread Joel Burton
On Wed, 25 Apr 2001, [EMAIL PROTECTED] wrote: > when I am logging on Postgres i haven't to give a password > > How can I do in order to have one ? Look at the pg_hba.conf file (normally in $PGDATA directory). You'll want to change the 'trust' to 'password&

[ADMIN] Re: Reason to not upgrade from 6.5 to 7.0 or above

2001-04-25 Thread Joel Burton
o > so, I have to modify my application. Is there anything that datetime did that timestamp doesn't? Could you pg_dump | sed | psql to change the datetimes to timestamp? -- Joel Burton <[EMAIL PROTECTED]> Director of Information Systems, Support Center of Washington

[ADMIN] Re: System Catalogs

2001-04-20 Thread Joel Burton
sql. The Developer's Manual has full information about the system catalogs. -- Joel Burton <[EMAIL PROTECTED]> Director of Information Systems, Support Center of Washington ---(end of broadcast)--- TIP 3: if posting/reading through