On Apr 15, 2008, at 11:23 PM, Tom Lane wrote:
What's really a duplicate sounds like a judgment call here, so you
probably shouldn't even think of automating it completely.
I did a consulting gig about 10 years ago for a company that made
software to normalize street addresses and names. Lit
On Mar 18, 2008, at 2:40 PM, Campbell, Lance wrote:
Why use a random number as a primary key? Security via obscurity.
I build web applications for a living. In most of my applications
it is
preferable to use a random primary key. Why?
Don't expose the actual ID to the end user; only ex
On Mar 18, 2008, at 1:03 PM, Campbell, Lance wrote:
The field n is not random but is sequential. Is there something I
should do to make the serial number random?
Depending on your "randomness" need, you can alter the increment of
the sequence so it changes by a different amount than "1" on
On Nov 4, 2007, at 12:57 PM, Volkan YAZICI wrote:
major bottleneck. I planned to partition this table, but I learnt that
PostgreSQL doesn't allow referencing views. Does anybody have any
suggestions?
I can envision writing your own custom trigger instead of using the
stock FK trigger that
On Sep 26, 2006, at 10:56 AM, Tom Lane wrote:
"log_min_error_statement = error" is what you're looking for.
my personal belief is that this should be the default, as the current
default (essentially "never") is mostly useless.
smime.p7s
Description: S/MIME cryptographic signature
On Nov 23, 2005, at 10:45 AM, Alvaro Herrera wrote:
A. R. Van Hook wrote:
It seems that in 8.1.0 we can no longer set the SYSID when adding
users
and groups.
i.e
template1=# create role hooker sysid 1345;
NOTICE: SYSID can no longer be specified
I have lots of code that depends on the actu
t of our application.
I *certainly* hope you're not passing $value in straight from your
web form directly into the SQL. You're opening yourself up for SQL
injection attacks.
Why not just have your app that reads the form generate the proper
value to insert? That is the safe route.
the first row you fetch?
Vivek Khera, Ph.D.
+1-301-869-4449 x806
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
function in SQL or a trigger
to fire when the computer switches on say Jan 1 of every year?
Will be grateful if anybody could point me in the right direction.
Vivek
---(end of broadcast)---
TIP 6: explain analyze is your friend
On Jul 7, 2005, at 4:14 PM, Theodore Petrosky wrote:
you have to use currval inside a transaction...
begin;
insert something that increments the counter;
select currval('sequence_name');
end;
using currval inside a transaction guarantees that the
value is correct for your insert statement an
e set to write-back mode. FreeBSD 4.11.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
s an error (such as a typo) will not be
logged -- just the error gets logged. Makes debugging of very complex
systems much easier to be able to see the full query that caused the
problem.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
urned off as per various recommendations on this list. The RAID
card on this box is a PERC 3/DC. It is a very big disappointment. The
Opteron based generic system totally outperforms this Dell box.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
care... :-) For me,
high performance DB and Dell servers are mutually exclusive.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
load. Under moderate to low load
they're acceptable.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
using a Dell RAID controller.
I have a 1 year old box connected to a 14 disk powervault (PowerEdge
2650) and it is dog slow compared to a dual opteron with 8 disks that
is replacing it. It is all I/O for me, and the dell's just are not
known for speedy I/O.
Vivek Khera, Ph.D.
+1-301-869
rarely run processes.
Vivek Khera, Ph.D.
+1-301-869-4449 x806
smime.p7s
Description: S/MIME cryptographic signature
m using Postgres 7.2.1 on FreeBSD 4.6.
Thanks.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.kher
ound two instances where I use FOR
UPDATE LIMIT 1. These are trivial to change, but difficult to do at
the same moment I update the db server. One of these I probably don't
even need the LIMIT...
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.
> "BM" == Bruce Momjian <[EMAIL PROTECTED]> writes:
>> Could you add the length limitation for TEXT to the reference manual?
>> I searched high and low for that limit, but never found it. Also,
>> what's the max VARCHAR() or CHAR() I can create? Is that also 1Gb?
BM> TEXT limit is 1GB, as
:Pg: Shared object "libpq.so.2" not found at
jj> /usr/libdata/perl/5.00503/DynaLoader.pm line 169.
After you installed postgres, did you run ldconfig -m
/usr/local/pgsql/lib to add that shared lib to the system?
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> "JB" == Josh Berkus <[EMAIL PROTECTED]> writes:
>> Those docs are lacking an explanation that there is no such thing in
>> PostgreSQL as a timestamp *without* time zone.
JB> Hmmm OK, I'll revise the A: but I *don't* want to go into Time Zone
JB> issues in this intro. Any docs I can
> "JB" == Josh Berkus <[EMAIL PROTECTED]> writes:
JB> Q. What about TIMESTAMP WITH TIME ZONE?
JB> A. An important topic, and datatype, that I don't want to get into here.
JB> See the PostgreSQL docs.
Those docs are lacking an explanation that there is no such thing in
PostgreSQL as a time
InvoiceDate + INTERVAL Acct.AverageDaysToPay 'Days'
try
SELECT Invoices.InvoiceDate + Acct.AverageDaysToPay::interval
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED] R
your fields you declare as timestamp. This
leads me to believe that they are silently "upgraded" in their type.
I have a subroutine in my apps that strips the timezone before passing
it along to the users.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ead up on how to implement a
linked list inside an array. This maps directly to an SQL table with
a sequential primary key.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]
The SERIAL type creates a
sequence, so just use the sequence command setval() to set the
starting value for the named sequence.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]
Here's what I use:
select CURRENT_DATE + '4 DAYS'::interval;
Just cast your "interval" from a string to an interval type, then add
it to your date value.
I doubt this is portable. What "tradition" provides for a dateadd()
function?
--
=-=-=-=-=-=-
the row (those columns take their defaults,
not the original values of the old row). It is really a useless
function, as far as I can tell.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROT
lues, and
MySQL lets me keep these in 3 bytes as a bit-field behind the scenes.
>From what I see, my choice in Postgres is to store this as a
comma-separated string and let my application work as before.
Does anyone have a script that actually handles properly doing auto
increments with the
Hi!
a small query may be u can help me.
i just wanted to compare 2 columns in 2 tables.how can i do it in sql
statement.i know it is possible somehow i am not able to write my query.
i am using RDB 6.0
Any pointer or help will be highly appreciated.
Thanx
-vivek
31 matches
Mail list logo