Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Thanks Michael for answer January, 24 2005, 9:58:35: MF> On Mon, Jan 24, 2005 at 08:57:43AM +0500, Mihail Nasedkin wrote: >> I don't need to know which tables have OIDS. I want know which system >> table contain column OID with all OID's inserted into my tables. MF> No system table contains a l

Re: [SQL] OID's

2005-01-23 Thread Michael Fuhr
On Mon, Jan 24, 2005 at 08:57:43AM +0500, Mihail Nasedkin wrote: > I don't need to know which tables have OIDS. I want know which system > table contain column OID with all OID's inserted into my tables. No system table contains a list of all OIDs, if that's what you're asking. > Or is there sys

Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Hello, pgsql-sql and Michael. MF> On Fri, Jan 21, 2005 at 11:17:34AM +0500, Mihail Nasedkin wrote: >> I have already read about "System Columns" of the PostgreSQL documentation. >> In the table "pg_catalog.pg_attribute" column "attrelid" contain >> only "system OID's" but not OID's from records o

Re: [SQL] OID's

2005-01-21 Thread Richard Huxton
Mihail Nasedkin wrote: Hello, Michael. Thank you for answer January, 20 2005, 21:48:30: MF> On Thu, Jan 20, 2005 at 03:45:58PM +0500, Mihail Nasedkin wrote: How (where) I can get all OID's of the PostgeSQL installation? In other words where OID's is stored? Is it stored in special table? MF> See

Re: [SQL] OID's

2005-01-21 Thread Michael Fuhr
On Fri, Jan 21, 2005 at 11:17:34AM +0500, Mihail Nasedkin wrote: > I have already read about "System Columns" of the PostgreSQL documentation. > In the table "pg_catalog.pg_attribute" column "attrelid" contain > only "system OID's" but not OID's from records of the user tables. > > But I would li

Re: [SQL] OID's

2005-01-20 Thread Mihail Nasedkin
Hello, Michael. Thank you for answer January, 20 2005, 21:48:30: MF> On Thu, Jan 20, 2005 at 03:45:58PM +0500, Mihail Nasedkin wrote: >> How (where) I can get all OID's of the PostgeSQL >> installation? >> In other words where OID's is stored? Is it stored in special table? MF> See the "System

Re: [SQL] OID's

2005-01-20 Thread Michael Fuhr
On Thu, Jan 20, 2005 at 03:45:58PM +0500, Mihail Nasedkin wrote: > How (where) I can get all OID's of the PostgeSQL > installation? > In other words where OID's is stored? Is it stored in special table? See the "System Columns" section in the "Data Definition" chapter of the PostgreSQL documentat

[SQL] OID's

2005-01-20 Thread Mihail Nasedkin
Hi, I have a question about OID. How (where) I can get all OID's of the PostgeSQL installation? In other words where OID's is stored? Is it stored in special table? I would like use some SQL queries with the all OID's. Is this possible? I hadn't find the answer in the FAQ ( 4.16 What is an OID

Re: [SQL] oid's in views.

2001-10-24 Thread Josh Berkus
Hey, Dado, > Hi Josh! > Once you have your usq, how do you get more info about that row? > How do you know which table it came from? Well, if you have to go at it from that angle (hey, I have this USQ, where did it come from) then you're in trouble. However, I never use it that way. Let me giv

Re: [SQL] oid's in views.

2001-10-23 Thread Dado Feigenblatt
Josh Berkus wrote: >Aasmund, > > Thank you for the clarification. Now that I know what you are doing, I >went through exactly the same thing about a year ago ... which is how we >discovered some additional problems with using OIDs in database design. >I was trying to spare you the same dea

Re: [SQL] oid's in views.

2001-10-23 Thread Aasmund Midttun Godal
No, many of the tables have primary keys already, serial, single key or several keys. I don't want to 'serialize' every table, because it does not make sense. Oid's however are very usefull as I can use them as a primary key on any table. Regards, Aasmund. On Fri, 19 Oct 2001 15:38:16 -0700,

Re: [SQL] oid's in views.

2001-10-22 Thread Josh Berkus
Aasmund, Thank you for the clarification. Now that I know what you are doing, I went through exactly the same thing about a year ago ... which is how we discovered some additional problems with using OIDs in database design. I was trying to spare you the same dead end. > > If your probl

Re: [SQL] oid's in views.

2001-10-22 Thread Joel Burton
On Mon, 22 Oct 2001, Josh Berkus wrote: > Each significant data table contains one column, the first column, > called "usq", for "universal sequence". This usq field may or may not > be the primary key for the table, but does have a unique index. The usq > is populated by a single sequence "uni

Re: [SQL] oid's in views.

2001-10-22 Thread Aasmund Midttun Godal
That is what i did... Regards, Aasmund On Sat, 20 Oct 2001 23:34:44 -0400 (EDT), Joel Burton <[EMAIL PROTECTED]> wrote: > On Sun, 21 Oct 2001, Aasmund Midttun Godal wrote: > > > > Aasmund -- > > If your problem is that you want to update VIEWs and aren't sure what the > PK for the view is,

Re: [SQL] oid's in views.

2001-10-20 Thread Aasmund Midttun Godal
I apologize for not expressing myself clearly, and for replying without really giving any new information. In hindsight I understand perfectly well, why you did not want to continue communication, but I hope that you or someone else, will give me a second chance on the issue. Let me try to exp

Re: [SQL] oid's in views.

2001-10-19 Thread Josh Berkus
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

Re: [SQL] oid's in views.

2001-10-19 Thread Aasmund Midttun Godal
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

Re: [SQL] oid's in views.

2001-10-19 Thread Josh Berkus
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

[SQL] oid's in views.

2001-10-18 Thread Aasmund Midttun Godal
CREATE VIEW testview AS SELECT test.oid, tull FROM test; ERROR: Attribute 'oid' has a name conflict Name matches an existing system attribute I think this should be allowed, because if you do: CREATE VIEW testview AS SELECT tull FROM test; SELECT oid, tull FROM testview; The oid column