How would I start Postgres on windows as an un-privileged user without
logging into an un-privileged account. I have tried the -U switch but it
still complains. I have version 8.
kind regards
Garry
---(end of broadcast)---
TIP 1: if posting/reading
On 11/25/06, Ritesh Nadhani [EMAIL PROTECTED] wrote:
Hello all
Let me introduce myself first. I am the ex-lead developer of SQLyog
(one of the most popular GUI for MySQL which is Windows only and runs
on Linux through WINE, more info at http://www.webyog.com).
===
New Project: wxWidgets
Garry,
the standard recommendation is to install PostgreSQL as a service on
windows; logging in with an own low privilege user account, usually named
postgres.
That usage of a service is recommended because it solves all the usual
problems of services :) (start, shut down, login as seperate
Ritesh,
what you are trying to do sound very similiar to dabo:
http://dabodev.com/
Maybe have a look at it first?
best wishes
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more
Hello Herald
Somebody mailed me earlier also regarding dabodev but its not what I
am talking about.
I took a look at dabo and it definitely serves one part of application
that I have in mind but more specifically I was thinking of starting
with a admin/developer tool like TOAD, MS Query
I am buying a new gentoo server for postgresql and I was wondering if a 64 bit CPU would make any
difference in performance. I am not planning on using 64 bit integers.
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore
Martijn van Oosterhout wrote:
Well, it kinda sucks for joining because comparing strings may take
tens to hundreds of times as long as compairng integers. It's not just
byte-wise comparison but you have to be locale sensetive about it.
My main problem with using any kind of string as natural
On Nov 27, 2006, at 02:45 , Tom Lane wrote:
Alexander Staubo [EMAIL PROTECTED] writes:
select comments.*, users.*
from comments
left outer join users on
users.id = comments.creator_id
inner join events_comments on
comments.id = events_comments.comment_id
and events_comments.event_id =
Syl wrote:
Try
select *
from tablename
where title like ('%nith%')
and date_trunc('month',recall_date::timestamp) =
date_trunc('month','1995-01-01'::timestamp)
and date_trunc('month',recall_date::timestamp) =
date_trunc('month','2006-12-31'::timestamp)
Hi all!
[EMAIL PROTECTED] wrote:
On Friday 24 November 2006 12:56, ben short wrote:
I have a postgresql server setup on a Solaris 10 box. I can
connect to the db via psql from the local machine. What I have
been trying to do it connect with pgAdmin from my workstation. I
have setup the
On 27 Nov 2006 at 8:03, garry saddington wrote:
How would I start Postgres on windows as an un-privileged user without
logging into an un-privileged account. I have tried the -U switch but
it still complains. I have version 8.
If you installed PostgreSQL using the installer - which I'd
On 11/27/06, Sim Zacks [EMAIL PROTECTED] wrote:
I am buying a new gentoo server for postgresql and I was wondering if a 64 bit
CPU would make any
difference in performance. I am not planning on using 64 bit integers.
a 64 bit server will allow the computer to use more memory. This can
be a
I've just got the following message while trying to restore a database :
pg_restore : [custom archiver] Dumping a specific TOC data block out of order is
not supported without ID on this input stream (fseek required).
The command was :
pg_restore -L /tmp/toc --dbname=whitebeam --disable-triggers
Hi,
I installed postgres 814 on solaris 10 using the following packages
SUNWpostgr-libs-8.1.4-x86.tar.gz
SUNWpostgr-8.1.4-x86.tar.gz
SUNWpostgr-server-8.1.4-x86.tar.gz
SUNWpostgr-server-data-8.1.4-x86.tar.gz
SUNWpostgr-contrib-8.1.4-x86.tar.gz
SUNWpostgr-devel-8.1.4-x86.tar.gz
I am able to use kerberos authentication with Windows 20003 SP1 Active
Directory. I couldn't get Postgres 7.414 to work, but as soon as I
upgraded to 8.15, added my username to postgres (also set in Active
Directory), used POSTGRES as the service principal, I could login using
psql
Tom Lane wrote:
Um, is that really considered a fix??? We all know that there's no
guarantee at all, even in ANSI C, that unsigned int isn't bigger than
32 bits, right?
OID is 32 bits. Full stop.
I should know better than to argue about this, but:
In that case, casting it as in the OP's
On 24 Nov 2006 04:43:02 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I just can't understand the use of this PGDATA variable!
-I am on FC3. (pgl 7.4)
-I am installing rpms and then running /etc/init.d/postgresql start
(which is done by default)
-The resulting data directory is in
Merlin Moncure wrote:
I think you should look for inspiration in the EMS suite, which while
windows-only and closed source is a pretty feature packed and cross
(db) platform. You are on very well traveled ground here.
Not to mention Lightning Admin for Postgresql and MySQL:-)
I noticed that that pgAdmin invokes pg_dump with -b command line parameter.
I havent found any documentation about this parameter in Psotgres Docs.
What is the purpose of this parameter ?
Andrus.
---(end of broadcast)---
TIP 4: Have you
On Mon, 2006-11-27 at 10:36, Andrus wrote:
I noticed that that pgAdmin invokes pg_dump with -b command line parameter.
I havent found any documentation about this parameter in Psotgres Docs.
What is the purpose of this parameter ?
According to pg_dump --help:
-b, --blobs
Andrus wrote:
I noticed that that pgAdmin invokes pg_dump with -b command line parameter.
I havent found any documentation about this parameter in Psotgres Docs.
You haven't looked closely enough
pg_dump --help:
-b, --blobs include large objects in dump
--
Alvaro Herrera
Hi all,
I'm trying to return multiple rows from a function, but all I can get
with the code below is the first row. I got most of the function below
off the net and I think the problem is the first RETURN statement,
which stops the loop.
CREATE OR replace function getOnCallVol() RETURNS
I need to create nightly backups to separate computer over internet from 8.1
server
I tried to run pg_dump to make backup using command
..\pg_dump\pg_dump.exe -i -Z9 -b -v -f C:\061127 mybackup.backup -F c -h
81.50.12.18 -U myuser -p 5431 mydb
but this takes 4.5 hours to complete.
How to
Bret Schuhmacher wrote:
Hi all,
I'm trying to return multiple rows from a function, but all I can get
with the code below is the first row. I got most of the function below
off the net and I think the problem is the first RETURN statement,
which stops the loop.
CREATE OR replace
On Nov 27, 2006, at 18:13 , Andrus wrote:
I need to create nightly backups to separate computer over internet
from 8.1
server
I tried to run pg_dump to make backup using command
..\pg_dump\pg_dump.exe -i -Z9 -b -v -f C:\061127
mybackup.backup -F c -h
81.50.12.18 -U myuser -p 5431 mydb
Bottom line: check digits are in SSNs
Uhm, no they're not. And this is of course one of the huge problems with
SSNs. (Although not quite as bad as the fact that they're not strictly
unique. Yes, really, duplicates have been issued in the past.)
--
Scott Ribe
[EMAIL PROTECTED]
There are basically two ways to attack the problem of a database-wide
unique ID:
* Use a single int8 sequence for the whole database;
* Use the combination of table OID and row OID (or, perhaps, an int8
sequence for the row identifier, if you need more than a billion or
so rows in the
On Nov 27 11:59, Bret Schuhmacher wrote:
I'm trying to return multiple rows from a function, but all I can get
...
CREATE OR replace function getOnCallVol() RETURNS RECORD AS $$
You should return SETOF record. See related section of the manual
about SRFs (Set Returning Fucntions).
Regards.
On Thu, 2006-11-23 at 10:23, Ron Johnson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/22/06 20:23, carter ck wrote:
Hi all,
I am wonderring if it is a good practice to use SERIAL index as primary
key, as it is only available up to 999?
Currently i am dealing
On Thu, 2006-11-16 at 14:56, Martijn van Oosterhout wrote:
On Thu, Nov 16, 2006 at 12:40:41PM -0800, Glen Parker wrote:
But now, pull the drive from port 2 and boot the system. You will now
have SDA,SDB,SDC. The kernel will now fail BOTH of the last two drives
from the RAID array. The
On Mon, 2006-11-27 at 11:47 -0600, Scott Marlowe wrote:
On Thu, 2006-11-23 at 10:23, Ron Johnson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/22/06 20:23, carter ck wrote:
Hi all,
I am wonderring if it is a good practice to use SERIAL index as primary
key, as
On Mon, 2006-11-27 at 19:13 +0200, Andrus wrote:
I need to create nightly backups to separate computer over internet from 8.1
server
I tried to run pg_dump to make backup using command
..\pg_dump\pg_dump.exe -i -Z9 -b -v -f C:\061127 mybackup.backup -F c -h
81.50.12.18 -U myuser -p 5431
On Fri, Nov 24, 2006 at 11:59:16AM +0100, Jakub Ouhrabka wrote:
I've done little research in mailing list archives and I found possible
cause: table corruption caused by flaky hardware. Does it sound about
right? Are there any other possible causes?
It sounds about right, yes; but the other
Hello, I just installed postgresql 8.1.5 and the only things I ported from
8.0.3 (last version I used) are server, user and CA X509 certificates (fresh
install for everything else). I'm using OpenSSL 0.9.8d, Fedora Core 4, I have
enabled SSL as described in manual (at every step where it's
You might try using online backups. By following the steps in this
document:
http://www.postgresql.org/docs/8.1/static/backup-online.html
you can back up the data at the speed of your filesystem. There's no way
to make it faster than that.
Note however that you will want to apply
Hi everyone,
I recently installed PostgreSQL (Version 8.1.5.1) using the MSI installer on a
Windows Server 2000 system.
I ran the installer logged in under an Administrator account, and set the
service account to postgres.
During the installation process, when it came time to run initdb, the
Everything runs as expected.
Until the Windows Server is rebooted. When this occurs, the
PostgreSQL service starts as expected, but won't accept connections.
If the PostgreSQL service is then restarted manually (via
Administrative Tools Component Services Restart), the service
Bill Kurland [EMAIL PROTECTED] writes:
I did a google search on AIX + getaddrinfo and found
http://lists.samba.org/archive/rsync/2002-April/002063.html
In that context the author says that adding the port number in
etc/services solved his problem with getaddrinfo.
Interesting. I wonder
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 11:26, Scott Ribe wrote:
Bottom line: check digits are in SSNs
Uhm, no they're not. And this is of course one of the huge problems with
SSNs. (Although not quite as bad as the fact that they're not strictly
unique. Yes, really,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 11:47, Scott Marlowe wrote:
On Thu, 2006-11-23 at 10:23, Ron Johnson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/22/06 20:23, carter ck wrote:
Hi all,
I am wonderring if it is a good practice to use SERIAL index as
George Weaver wrote:
I then updated the postgresql.conf file with listen_addresses = '*'
and changed the port from 5432 (currently being used for a 7.3 server)
to 5435.
Have you tried setting the port back to default and see what happens?
Is it possible for you to stop the 7.3 server for a
Yes, that's the point. They are legacy designs, and that portion of
the design is wrong.
I'll weigh in my my .02 on this subject. After much pain and agony in
the real world, I have taken the stance that every table in my database
must have an arbitrary, numeric primary key (generally
Simply put, it doesn't scale as well.
If a table already has candidate keys, then you've presumably got unique
indices on them. A surrogate primary key adds another segment of data
to pass through I/O and another index to maintain. Under high loads,
those extra cycles will cost you transactions
John,
I'll weigh in my my .02 on this subject. After much pain and agony in
the real world, I have taken the stance that every table in my database
must have an arbitrary, numeric primary key (generally autogenerated).
I feel the same.
In the real world there is no such thing as a primary
I don't know what the exact version is but I am getting this:
FATAL: database is not accepting commands to avoid wraparound data loss
in database postgres
How can I recover from this and why woud this happen to the postgres
database? Has my server been hacked? there should be no inserts
Tony Caduto wrote:
I don't know what the exact version is but I am getting this:
FATAL: database is not accepting commands to avoid wraparound data loss
in database postgres
How can I recover from this and why woud this happen to the postgres
database? Has my server been hacked?
George,
I guess your service is not running after rebooting? You can check this via
services.msc
Most propable cause: the postgres user does not have logon_as_service
privilege.
I ran the installer logged in under an Administrator account, and set the
service account to postgres.
That is
Alvaro Herrera wrote:
Tony Caduto wrote:
I don't know what the exact version is but I am getting this:
FATAL: database is not accepting commands to avoid wraparound data loss
in database postgres
How can I recover from this and why woud this happen to the postgres
database? Has my
In the real world,
data changes, even supposedly unchangeable data.
And that's the crux of it. All of the that design is wrong arguments in
the world won't stop data that has been constant unique for decades from
changing when some manager, rightly or wrongly, sees a business need for
it.
On Mon, 2006-11-27 at 13:36 -0600, Tony Caduto wrote:
Alvaro Herrera wrote:
Tony Caduto wrote:
I don't know what the exact version is but I am getting this:
FATAL: database is not accepting commands to avoid wraparound data loss
in database postgres
How can I recover from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 13:23, Harald Armin Massa wrote:
John,
I'll weigh in my my .02 on this subject. After much pain and agony in
the real world, I have taken the stance that every table in my database
must have an arbitrary, numeric primary key
There are lots of numbers. Credit card numbers, account numbers
sales ticket numbers, etc, etc ad nauseum. Julian day and Julian
date, even. You can't have lived in the west in the past 30 years
without being surrounded by them.
It's their blind use in *every* table which I take issue
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 13:37, Scott Ribe wrote:
In the real world,
data changes, even supposedly unchangeable data.
And that's the crux of it. All of the that design is wrong arguments in
the world won't stop data that has been constant unique for decades
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 12:53, John McCawley wrote:
Yes, that's the point. They are legacy designs, and that portion of
the design is wrong.
I'll weigh in my my .02 on this subject. After much pain and agony in
the real world, I have taken the stance
It's an arbitrary identifier that only has meaning within the context of
the database. The domain model isn't supposed to model data in a
database. It's supposed to model data which coincidentally is going to
be stored in a database.
As far as your bank's poor software design, I can't help you
I have been using postgres since a long time. Recently number of users
in my portal has been increased drastically and because of that load on
Database server has been increased. Suddenly postgres Database crashed
and I need to restart the DB. I am not able to find out root cause of
this problem.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Nov 27, 2006, at 1:21 PM, Brandon Aiken wrote:
The other argument is that it's redundant data with no real meaning to
the domain, meaning using surrogate keys technically violates low-
order
normal forms.
It has real meaning in the sense
One suggestion would be to not cross post to admin and general and answer
the question sent back to you on the admin list, but that's just me.
On Mon, Nov 27, 2006 at 04:59:22PM +0200, Doron Baranes wrote:
Hi,
I installed postgres 814 on solaris 10 using the following packages
post some more informations, i.e. version, latest entries in logfile before
crash, etc.
- thomas
- Original Message -
From: rbaisak
To: pgsql-general@postgresql.org
Sent: Monday, November 27, 2006 8:26 PM
Subject: [GENERAL] DB crashed
I have been using postgres since a
Perhaps I am amazingly ignorant, but I have yet to find a case where my
approach causes any real problems. What does using real data as a
primary key buy you? The only real advantages I can see are that an
individual record's data will be somewhat more human-readable without
joining
Alvaro Herrera wrote:
Stop the postmaster, start a standalone backend, and issue a
database-wide VACUUM on database postgres.
Just in case anyone is interested I did get it up and running with no
damage to the system.
It took well over a year for it to reach the 1 million threshold mark.
...*most especially* when they are the only unique key.
There are usually other keys which should be unique, and this should
certainly be reflected in the db design. On the other hand, designers should
not strive to find and enforce combinations that won't actually necessarily
be unique, such as
primary key (first_name,last_name,address_id)
One will enable you to have a distinct Joshua Drake, one in portland
oregon and one in portland maine.
What happens when you move? Do we treat you as a different person? Or do we
pretend that you've always lived in the same place?
--
Scott Ribe
Shouldn't the results of this query shown here been sorted by b rather than
by a?
I would have thought since order by b is in the outer sql statement it would
have
been the one the final result gets ordered by.
li=# select * from (select (random()*10)::int as a, (random()*10)::int as b
from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 14:34, Scott Ribe wrote:
...*most especially* when they are the only unique key.
There are usually other keys which should be unique, and this should
certainly be reflected in the db design. On the other hand, designers should
not
On Mon, 2006-11-27 at 13:38 -0700, Scott Ribe wrote:
primary key (first_name,last_name,address_id)
One will enable you to have a distinct Joshua Drake, one in portland
oregon and one in portland maine.
What happens when you move? Do we treat you as a different person? Or do we
pretend
You would update the address, the address id wouldn't change. If you
want to keep track of old addresses you would keep an archive table
associated with the user.id.
But what about historical data that referenced the address? If you move
today, I still want to know where I shipped last week's
OK, let's use a synthetic key on the sales master table. In fact,
*both* companies have a synthetic key on their sales master tables.
OMG, conflicting/overlapping synthetic keys!
Which are not exposed in any UI and therefore easier to change?
Heck, I'd use UUIDs everywhere if it
Right, but when you write your script (or whatever) that cleans these
keys up and does the merge, you're where you started -- arbitrary
integer keys with no meaning. If you merge databases where the keys are
*supposed* to have meaning, you then have to mangle *real* data to make
them merge.
We are getting a backend crash after issueing a load command. It's
pretty easy to recreate -- so easy that I'm not sure that there is
something being overlooked. This is on pg 8.2 roughly two weeks old.
Basic m.o. is:
1. create pic .so
2. load .so and call a function in it (from psql).
3.
Thomas H. wrote:
post some more informations, i.e. version, latest entries in logfile
before crash, etc.
- thomas
- Original Message -
*From:* rbaisak mailto:[EMAIL PROTECTED]
*To:* pgsql-general@postgresql.org
mailto:pgsql-general@postgresql.org
*Sent:* Monday,
Right, but when you write your script (or whatever) that cleans these
keys up and does the merge, you're where you started -- arbitrary
integer keys with no meaning. If you merge databases where the keys are
*supposed* to have meaning, you then have to mangle *real* data to make
them merge.
On Mon, 2006-11-27 at 14:00 -0700, Scott Ribe wrote:
You would update the address, the address id wouldn't change. If you
want to keep track of old addresses you would keep an archive table
associated with the user.id.
But what about historical data that referenced the address? If you
insert a new address, and update the users table to the new address_id
Which changes the user's primary key. My point was that having the address
id be part of the primary key is wrong. Having it be a part of a key may be
fine for many uses. But it's contrary to the notion of primary key that
[EMAIL PROTECTED] wrote:
...Should I expect
any problems with this even on the old 2.4 kernel?
I'd advise you to be using a 2.6 kernel at this point, too.
... I assume 8 will still work on 2.4 though.
IIRC, you need a reasonably modern 2.6 kernel (early 2005)
if you want fsync() to flush
- Original Message -
From: Harald Armin Massa
Hi Harald,
I guess your service is not running after rebooting? You can check this via
services.msc
This is what is confusing me - the service IS running after rebooting, but does
not appear to be listening on port 5435. If I simply
Merlin Moncure [EMAIL PROTECTED] writes:
We are getting a backend crash after issueing a load command.
No crash from your example here (on Fedora Core 5). What platform and
gcc are you using exactly? Can you provide a stack trace from the crash?
regards, tom lane
On Mon, 2006-11-27 at 12:44 -0800, Ron Mayer wrote:
Shouldn't the results of this query shown here been sorted by b rather than
by a?
I would have thought since order by b is in the outer sql statement it
would have
been the one the final result gets ordered by.
li=# select * from
On Mon, Nov 27, 2006 at 02:22:19PM -0600, Tony Caduto wrote:
Just in case anyone is interested I did get it up and running with no
damage to the system.
It took well over a year for it to reach the 1 million threshold mark.
You mean one *billion*, right?
That's one busy server!
Hopeefully
Jeff Davis [EMAIL PROTECTED] writes:
On Mon, 2006-11-27 at 12:44 -0800, Ron Mayer wrote:
Shouldn't the results of this query shown here been sorted by b rather
than by a?
li=# select * from (select (random()*10)::int as a, (random()*10)::int as b
from generate_series(1,10) order by a) as x
Jeff Davis wrote:
On Mon, 2006-11-27 at 12:44 -0800, Ron Mayer wrote:
Shouldn't the results of this query shown here been sorted by b rather
than by a?
I would have thought since order by b is in the outer sql statement it
would have
been the one the final result gets ordered by.
li=#
Shenanigans!
That problem occurs regardless of whether or not you use surrogate keys.
You have exceeded the scope of the example.
--
Brandon Aiken
CS/IT Systems Engineer
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Ribe
Sent: Monday, November
Martijn van Oosterhout wrote:
On Mon, Nov 27, 2006 at 02:22:19PM -0600, Tony Caduto wrote:
Just in case anyone is interested I did get it up and running with no
damage to the system.
It took well over a year for it to reach the 1 million threshold mark.
You mean one *billion*,
Tom Lane wrote:
Jeff Davis [EMAIL PROTECTED] writes:
On Mon, 2006-11-27 at 12:44 -0800, Ron Mayer wrote:
li=# select * from (select (random()*10)::int as a, (random()*10)::int as b
from generate_series(1,10) order by a) as x order by b;
It looks like a planner bug.
It looks to me like
I wrote:
It looks to me like the planner thinks that order by a and order by b
are equivalent because the expressions are equal(); hence it discards
what it thinks is a redundant second sort step.
... What's the use-case for sorting by a volatile
expression in the first place?
It may be
Tony Caduto wrote:
Martijn van Oosterhout wrote:
On Mon, Nov 27, 2006 at 02:22:19PM -0600, Tony Caduto wrote:
Just in case anyone is interested I did get it up and running with no
damage to the system.
It took well over a year for it to reach the 1 million threshold mark.
You
Shenanigans!
That problem occurs regardless of whether or not you use surrogate keys.
You have exceeded the scope of the example.
Yes the problem occurs in that this is something that needs to be tracked,
but the suggested schema presents peculiar problems for what otherwise is a
pretty
On Mon, 2006-11-27 at 14:36 -0700, Scott Ribe wrote:
insert a new address, and update the users table to the new address_id
Which changes the user's primary key. My point was that having the address
id be part of the primary key is wrong.
As I said, you don't *have* to do it that way. I was
Ron Mayer [EMAIL PROTECTED] writes:
Tom Lane wrote:
It looks to me like the planner thinks that order by a and order by b
are equivalent because the expressions are equal(); hence it discards
what it thinks is a redundant second sort step.
Would it be a smaller waste of cycles and still
Alvaro Herrera [EMAIL PROTECTED] writes:
Tony Caduto wrote:
I did not have autovacuum turned on and I usually do a vacuumdb -z -a -f
-q each night but this one slipped through the cracks :-(
Strange -- autovacuum should have started an automatic database-wide
vacuum on that database, even
insert a new address, and update the users table to the new address_id
Which changes the user's primary key. My point was that having the address
id be part of the primary key is wrong.
As I said, you don't *have* to do it that way. I was just giving an
example. You could just as easily
On Mon, 2006-11-27 at 15:47 -0700, Scott Ribe wrote:
insert a new address, and update the users table to the new address_id
Which changes the user's primary key. My point was that having the
address
id be part of the primary key is wrong.
As I said, you don't *have* to do it that
I've been tasked with administering one of our PostgreSQL databases and
know little or nothing about the product (though I do have DB
experience). I've been looking for training and came across an
administration class at 'http://www.postgresql.org/about/event.425' on
the main web site. When I
This list represents the most informed database admins I know, and while
the conversation can easily devolve into minutae, I am genuinely
interested in everyone's opinions on this subject. Primary keys are a
pretty central aspect of database design, and most everyone on this list
has unique
On Mon, 2006-11-27 at 17:09 -0600, John McCawley wrote:
This list represents the most informed database admins I know, and while
the conversation can easily devolve into minutae, I am genuinely
interested in everyone's opinions on this subject. Primary keys are a
pretty central aspect of
I promise I'm not trying to be a pain in the butt ;) Do you then use
your serial id as your foreign key in other tables, or the
firstname/lastname primary key?
Joshua D. Drake wrote:
users
=
id serial unique,
first_name text,
last_name text,
primary key (first_name,last_name)
Yes
A artificial does not protect against duplication.
That's it, in a nut shell. There is no argument there. That is why you
don't use artificial keys.
Sure, but in many cases natural primary keys simply do not exist. (People
being the prime example.) Many examples of what are proposed as
On Mon, 2006-11-27 at 17:31 -0600, John McCawley wrote:
I promise I'm not trying to be a pain in the butt ;) Do you then use
your serial id as your foreign key in other tables, or the
firstname/lastname primary key?
Now that is a good question. I would use the id, but that is not
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/27/06 17:25, Joshua D. Drake wrote:
On Mon, 2006-11-27 at 17:09 -0600, John McCawley wrote:
[snip]
users
=
id serial unique,
first_name text,
last_name text,
primary key (first_name,last_name)
Yes there are problems with the above,
I promise I'm not trying to be a pain in the butt ;) Do you then use
your serial id as your foreign key in other tables, or the
firstname/lastname primary key?
Now that is a good question. I would use the id, but that is not
technically proper :).
But firstname/lastname is *NOT* a primary
1 - 100 of 137 matches
Mail list logo