"David Allardyce" <[EMAIL PROTECTED]> writes:
> ... If they had defined uniqueness as "all rows
> must be distinct" then two all null rows would violate the uniqueness
> constraint. Not the behavior I want at all.
Er, why not? You're essentially arguing that the UNIQUE constraint
should treat n
I don't mean to re-hash an argument that has been debated-to-death before,
but I can't help myself...
> > However, shouldn't any values that are not NULL violate the constraint
if
> > the same values exist already?
>
> No. Postgres is conforming to the SQL standard in this. SQL92 saith
> in sec
Aasmund,
> I don't use them in indexes foreign keys etc., however they are very
> usefull when your application tries to edit/update individual rows,
> as the oid is like a universal primary key.
You'd still be better off defining your own SERIAL columns and/or
primary keys and using those. Som
Check out the SERIAL type. It does precisely what you
want. An idea as to how this is used would be like
this:
CREATE TABLE foo (
prim_key SERIAL PRIMARY KEY,
bar text
);
I tend to create sequences by hand like this:
CREATE SEQUENCE my_sequence_seq;
And then I create my tabl
"Douglas Rafael da Silva" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'd like to do a query where can be possible I access tables from
> diferent databases on the same query.
> On MySQL, I do:
>
> SELECT People1.PersID, People1.Name, Result1.
On Mon, 15 Oct 2001, Stefan Lindner wrote:
> Is there any way to get system maintained keys from postgres? e.g. to
> have a table with a primary key column (varchar or int) and let postgres
> chose the next unique value for this column?
\h CREATE SEQUENCE will give syntax, or look up SEQUENCES
On Fri, 19 Oct 2001 08:07:50 -0700, "Josh Berkus" <[EMAIL PROTECTED]> wrote:
> Aasmund,
>
>
> I believe the *official* reccommendation now is that you leave the OIDs
> to the system, and create your own SERIAL values for row identification.
> There are *lots* of problems with using OIDs as an in
Stefan,
> Is there any way to get system maintained keys from postgres? e.g. to
> have a table with a primary key column (varchar or int) and let
> postgres
> chose the next unique value for this column?
Please address future questions of this type to the PGSQL-NOVICE list.
PGSQL-SQL is for more
Is there any way to get system maintained keys from postgres? e.g. to
have a table with a primary key column (varchar or int) and let postgres
chose the next unique value for this column?
---(end of broadcast)---
TIP 6: Have you searched our list
Hi,
I'd like to do a query where can be possible I access tables from
diferent databases on the same query.
On MySQL, I do:
SELECT People1.PersID, People1.Name, Result1.Value, Result1.Date FROM
Database1.People1, Database2.Result1 WHERE ...
I think on ORACLE works like as:
SELECT People1.PersI
Aasmund,
> The oid column will always be blank. The oid column can never be used
> for anything usefull.
I believe the *official* reccommendation now is that you leave the OIDs
to the system, and create your own SERIAL values for row identification.
There are *lots* of problems with using OIDs a
Hi,
Is it possible to allow a user to execute a procedure that will update
some tables without the user having any privileges on the underlying tables
themselves (like in Oracle where the procedure effectively runs with the
privilege of the creator)?
Regards,
___
Hi!!,
--
Best regards,
Gurudutt mailto:[EMAIL PROTECTED]
Life is not fair - get used to it.
Bill Gates
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
CREATE VIEW status_schmetus AS SELECT approval.status_name AS aproval_status_name,
acknowledgement.status_name AS acknowledgement_status_name FROM po_status JOIN status
AS approval ON(po_status.approval_status_id = status.status_id) JOIN status AS
acknowledgement ON(po_status.acknowledgement_st
"David Allardyce" <[EMAIL PROTECTED]> writes:
> However, shouldn't any values that are not NULL violate the constraint if
> the same values exist already?
No. Postgres is conforming to the SQL standard in this. SQL92 saith
in section 4.10:
A unique constraint is satisfied if and only
Hi all,
Kindly apologize any inconvenience!
I have 2 tables status and po_status like..
CREATE TABLE status (
status_id int primary key,
status_name varchar(15)
);
CREATE TABLE po_status (
po_no varchar(15),
approval_status_id int references status(status
16 matches
Mail list logo