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
--
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
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
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
'' || $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
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
: 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
-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
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
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
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
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
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]
:
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
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
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
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
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
.
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
19 matches
Mail list logo