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

2002-12-04 Thread Joel Burton
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.com | aim: wjoelburton Independent Knowledge Management Consultant ---(end of broadcast

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

2002-12-02 Thread Joel Burton
-- Seq Scan on states (cost=0.00..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

Re: [ADMIN] [SQL] CURRENT_TIMSTAMP

2002-12-02 Thread Joel Burton
to no-TZ], it will keep track of just HMS. Or put in other values for 0 for more granularity on seconds. Of course, you can always store the specific time and select it out w/less resolution (using the time/date functions). In some cases, this might be a better solution. - J. -- Joel BURTON

Re: [ADMIN] What err ???

2002-06-07 Thread Joel Burton
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 Access. SQL databases use CASE. See the docs for examples on CASE. - J. -- Joel BURTON | [EMAIL PROTECTED

Re: [ADMIN] About a PL/pgSQL function

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

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 Technology

Re: [ADMIN] SERIAL Field

2002-05-06 Thread Joel Burton
: 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() and setval() for other functions for sequences. Joel BURTON | [EMAIL

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 practice around here, and it works great

Re: [ADMIN] smart copy?

2002-04-26 Thread Joel Burton
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- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf

Re: [ADMIN] column name length

2002-03-09 Thread Joel Burton
On Fri, 8 Mar 2002, Felipe Nascimento wrote: Is there a max length (number of characters) to column names?? I received the following: identifier petb_convidado_partida_participante will be truncated to petb_convidado_partida_particip 32. You can recompile PG if you need more. -- Joel

Re: [ADMIN] Please help - tks

2001-10-18 Thread Joel Burton
On the really QD, 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.com | aim: wjoelburton Independent Knowledge Management Consultant

[ADMIN] Re: Queries

2001-05-04 Thread Joel Burton
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 than ILIKE. -- Joel Burton [EMAIL PROTECTED] Director of Information Systems, Support Center

[ADMIN] Re: [possibly] dumb question

2001-05-04 Thread Joel Burton
is mostly for administrative info about PostgreSQL. -- 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: createuser withpassword

2001-05-04 Thread Joel Burton
: 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: you can get off all lists at once

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

2001-04-30 Thread Joel Burton
don't have a 7.0 db running anywhere to see that this fails under 7.0. BTW, I was being far to simplistic in suggesting that you should pipe pg_dump to 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

[ADMIN] Re: random rows

2001-04-26 Thread Joel Burton
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 PROTECTED] Director of Information Systems, Support Center of Washington ---(end of broadcast

[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' for local users. -- Joel Burton

[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] Director of Information

[ADMIN] Re: System Catalogs

2001-04-20 Thread Joel Burton
. 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 Usenet, please send