RE: how do i...

From: "Robert J(dot) Sanford, Jr(dot)" <rsanford(at)nolimitsystems(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: RE: how do i...
Date: 2001-08-12 05:11:10
Message-ID: HOEFIONAHHKFEFENBMNOKENBCAAA.rsanford@nolimitsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

doh!

i have now discovered that every row in every table is
automatically given a globally unique OID. that's pretty
cool. that means that i don't have to personally create
an OID column for every table. excellent.

i also enjoy that i can use the OID as an index on tables.
nice, very nice. thank you for making my life easier.

rjsjr

> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Robert
> J. Sanford, Jr.
> Sent: Saturday, August 11, 2001 10:49 PM
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] how do i...
>
>
> first - i'm new at this postgres thing...
>
> i'm coming from a MSAccess and MSSQLServer environment where
> i can set up and "AUTOINCREMENT" primary key so that when i
> insert a row into a table i don't have to worry about trying
> to figure out what the primary key should be.
>
> i know that i can set up a sequence in postgres but i then
> have to make sure that all of my inserts use the sequence to
> create the primary key and i would like to avoid that.
>
> is there any way that i can set up a sequence so that the
> primary key is automatically generated whenever a row is
> inserted?
>
> if not, then my plan is to create a stored procedure that
> performs the insert with the sequence call. however, i would
> like to make sure that ONLY the stored procedure has the
> ability to perform the insert and that my developers cannot
> insert directly into the table. is this possible? i'm worried
> that when i set up a stored procedure it only has the rights
> given to it by the caller so if i turn off insert rights for
> my applications then the store procedure won't be able to do
> the inserts either.
>
> many thanks!
>
> rjsjr
>
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

  • how do i... at 2001-08-12 03:49:19 from Robert J. Sanford, Jr.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message omid omoomi 2001-08-12 07:05:20 RE: how do i...
Previous Message Robert J. Sanford, Jr. 2001-08-12 03:49:19 how do i...