Re: [HACKERS] Suggestion: additional system views

2005-06-07 Thread Peter Eisentraut
Bruce Momjian wrote:
 Uh, I thought the shoot-down was for duplication of existing
 information in new system tables, not the addition of new system
 table information, e.g. we have pg_operator, but no list of error
 codes or keywords in the system tables.

System tables are primarily useful if (a) the information is variable 
for a given installation, or (b) client programs may want to 
automatically process the information.  Neither seems to apply here.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Josh Berkus
Bruce,

 I do like this idea.  Can you make a general patch?  Do others like the
 idea of system tables showing error codes and keywords?

Yes.  However, I think the idea of additional system views has already been 
shot down in flames.   

Unless people think that it's reasonable to have a system view for error codes 
and not one for, say, operators?  

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Bruce Momjian
Josh Berkus wrote:
 Bruce,
 
  I do like this idea.  Can you make a general patch?  Do others like the
  idea of system tables showing error codes and keywords?
 
 Yes.  However, I think the idea of additional system views has already been 
 shot down in flames.   

 Unless people think that it's reasonable to have a system view for error 
 codes 
 and not one for, say, operators?  

Uh, I thought the shoot-down was for duplication of existing information
in new system tables, not the addition of new system table information,
e.g. we have pg_operator, but no list of error codes or keywords in the
system tables.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Robert Treat
On Monday 06 June 2005 17:35, Bruce Momjian wrote:
 Josh Berkus wrote:
  Bruce,
 
   I do like this idea.  Can you make a general patch?  Do others like the
   idea of system tables showing error codes and keywords?
 
  Yes.  However, I think the idea of additional system views has already
  been shot down in flames.
 
  Unless people think that it's reasonable to have a system view for error
  codes and not one for, say, operators?

 Uh, I thought the shoot-down was for duplication of existing information
 in new system tables, not the addition of new system table information,
 e.g. we have pg_operator, but no list of error codes or keywords in the
 system tables.

Would this include a new view for showing user priviliges, rather than the 
current method of incense and chanting that are needed to divine the meaning 
of pg_class.relacl ?

-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Bruce Momjian
Robert Treat wrote:
 On Monday 06 June 2005 17:35, Bruce Momjian wrote:
  Josh Berkus wrote:
   Bruce,
  
I do like this idea.  Can you make a general patch?  Do others like the
idea of system tables showing error codes and keywords?
  
   Yes.  However, I think the idea of additional system views has already
   been shot down in flames.
  
   Unless people think that it's reasonable to have a system view for error
   codes and not one for, say, operators?
 
  Uh, I thought the shoot-down was for duplication of existing information
  in new system tables, not the addition of new system table information,
  e.g. we have pg_operator, but no list of error codes or keywords in the
  system tables.
 
 Would this include a new view for showing user priviliges, rather than the 
 current method of incense and chanting that are needed to divine the meaning 
 of pg_class.relacl ?

The new tables have to do with error messages and keywords.  It has
nothing to do with permissions.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] Suggestion: additional system views

2005-06-04 Thread Bruce Momjian

I do like this idea.  Can you make a general patch?  Do others like the
idea of system tables showing error codes and keywords?

---

David Fetter wrote:
 On Mon, Nov 01, 2004 at 12:49:47AM +0100, Gaetano Mendola wrote:
  Josh Berkus wrote:
  Neil,
  
  
  pg_functions might be useful, but what would pg_users offer that pg_user
  does not already do?
  
  
  Show a list of groups that the user belongs to?  Same thing with 
  pg_groups; showing the list of users in the group.
  
  
  A pg_sequences view might also be handy.
  
  
  Yes.  Anything else?  So far I have:
  
  pg_users
  pg_groups
  pg_functions
  pg_sequences
  hmmm ...
  pg_schemas 
  pg_tablespaces 
  ... as well, just for completeness.
  
  This is obviously and 8.1 thing, so I'll put it on my task list for after 
  8.0 PR is done.
  
  I suggest to add on pg_functions and on pg_views too, the list of
  dependencies with other objects.
 
 pg_keywords
 pg_sqlstates
 
 Attached is a rough draft of the latter.
 
 Cheers,
 D
 -- 
 David Fetter [EMAIL PROTECTED] http://fetter.org/
 phone: +1 510 893 6100   mobile: +1 415 235 3778
 
 Remember to vote!

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 2: you can get off all lists at once with the unregister command
 (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] Suggestion: additional system views

2004-11-27 Thread Bruce Momjian

This has been saved for the 8.1 release:

http:/momjian.postgresql.org/cgi-bin/pgpatches2

---

David Fetter wrote:
 On Mon, Nov 01, 2004 at 12:49:47AM +0100, Gaetano Mendola wrote:
  Josh Berkus wrote:
  Neil,
  
  
  pg_functions might be useful, but what would pg_users offer that pg_user
  does not already do?
  
  
  Show a list of groups that the user belongs to?  Same thing with 
  pg_groups; showing the list of users in the group.
  
  
  A pg_sequences view might also be handy.
  
  
  Yes.  Anything else?  So far I have:
  
  pg_users
  pg_groups
  pg_functions
  pg_sequences
  hmmm ...
  pg_schemas 
  pg_tablespaces 
  ... as well, just for completeness.
  
  This is obviously and 8.1 thing, so I'll put it on my task list for after 
  8.0 PR is done.
  
  I suggest to add on pg_functions and on pg_views too, the list of
  dependencies with other objects.
 
 pg_keywords
 pg_sqlstates
 
 Attached is a rough draft of the latter.
 
 Cheers,
 D
 -- 
 David Fetter [EMAIL PROTECTED] http://fetter.org/
 phone: +1 510 893 6100   mobile: +1 415 235 3778
 
 Remember to vote!

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 2: you can get off all lists at once with the unregister command
 (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [HACKERS] Suggestion: additional system views

2004-10-31 Thread Gaetano Mendola
Josh Berkus wrote:
Neil,

pg_functions might be useful, but what would pg_users offer that pg_user
does not already do?

Show a list of groups that the user belongs to?  Same thing with pg_groups; 
showing the list of users in the group.


A pg_sequences view might also be handy.

Yes.  Anything else?  So far I have:
pg_users
pg_groups
pg_functions
pg_sequences
hmmm ...
pg_schemas 
pg_tablespaces 
... as well, just for completeness.

This is obviously and 8.1 thing, so I'll put it on my task list for after 8.0 
PR is done.
I suggest to add on pg_functions and on pg_views too, the list of dependencies
with other objects.
Regards
Gaetano Mendola

---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [HACKERS] Suggestion: additional system views

2004-10-31 Thread David Fetter
On Mon, Nov 01, 2004 at 12:49:47AM +0100, Gaetano Mendola wrote:
 Josh Berkus wrote:
 Neil,
 
 
 pg_functions might be useful, but what would pg_users offer that pg_user
 does not already do?
 
 
 Show a list of groups that the user belongs to?  Same thing with 
 pg_groups; showing the list of users in the group.
 
 
 A pg_sequences view might also be handy.
 
 
 Yes.  Anything else?  So far I have:
 
 pg_users
 pg_groups
 pg_functions
 pg_sequences
 hmmm ...
 pg_schemas 
 pg_tablespaces 
 ... as well, just for completeness.
 
 This is obviously and 8.1 thing, so I'll put it on my task list for after 
 8.0 PR is done.
 
 I suggest to add on pg_functions and on pg_views too, the list of
 dependencies with other objects.

pg_keywords
pg_sqlstates

Attached is a rough draft of the latter.

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!
BEGIN;
CREATE TABLE sqlstate (
  error_code CHAR(5) PRIMARY KEY
, meaning TEXT
);

COPY sqlstate FROM STDIN;
0   SUCCESSFUL COMPLETION
01000   WARNING
0100C   WARNING DYNAMIC RESULT SETS RETURNED
01008   WARNING IMPLICIT ZERO BIT PADDING
01003   WARNING NULL VALUE ELIMINATED IN SET FUNCTION
01004   WARNING STRING DATA RIGHT TRUNCATION
02000   NO DATA
02001   NO ADDITIONAL DYNAMIC RESULT SETS RETURNED
03000   SQL STATEMENT NOT YET COMPLETE
08000   CONNECTION EXCEPTION
08003   CONNECTION DOES NOT EXIST
08006   CONNECTION FAILURE
08001   SQLCLIENT UNABLE TO ESTABLISH SQLCONNECTION
08004   SQLSERVER REJECTED ESTABLISHMENT OF SQLCONNECTION
08007   TRANSACTION RESOLUTION UNKNOWN
08P01   PROTOCOL VIOLATION
09000   TRIGGERED ACTION EXCEPTION
0A000   FEATURE NOT SUPPORTED
0B000   INVALID TRANSACTION INITIATION
0F000   LOCATOR EXCEPTION
0F001   INVALID SPECIFICATION
0L000   INVALID GRANTOR
0LP01   INVALID GRANT OPERATION
0P000   INVALID ROLE SPECIFICATION
21000   CARDINALITY VIOLATION
22000   DATA EXCEPTION
2202E   ARRAY ELEMENT ERROR
22021   CHARACTER NOT IN REPERTOIRE
22008   DATETIME FIELD OVERFLOW
22012   DIVISION BY ZERO
22005   ERROR IN ASSIGNMENT
2200B   ESCAPE CHARACTER CONFLICT
22022   INDICATOR OVERFLOW
22015   INTERVAL FIELD OVERFLOW
22018   INVALID CHARACTER VALUE FOR CAST
22007   INVALID DATETIME FORMAT
22019   INVALID ESCAPE CHARACTER
2200D   INVALID ESCAPE OCTET
22025   INVALID ESCAPE SEQUENCE
22010   INVALID INDICATOR PARAMETER VALUE
22020   INVALID LIMIT VALUE
22023   INVALID PARAMETER VALUE
2201B   INVALID REGULAR EXPRESSION
22009   INVALID TIME ZONE DISPLACEMENT VALUE
2200C   INVALID USE OF ESCAPE CHARACTER
2200G   MOST SPECIFIC TYPE MISMATCH
22004   NULL VALUE NOT ALLOWED
22002   NULL VALUE NO INDICATOR PARAMETER
22003   NUMERIC VALUE OUT OF RANGE
22026   STRING DATA LENGTH MISMATCH
22001   STRING DATA RIGHT TRUNCATION
22011   SUBSTRING ERROR
22027   TRIM ERROR
22024   UNTERMINATED C STRING
2200F   ZERO LENGTH CHARACTER STRING
22P01   FLOATING POINT EXCEPTION
22P02   INVALID TEXT REPRESENTATION
22P03   INVALID BINARY REPRESENTATION
22P04   BAD COPY FILE FORMAT
22P05   UNTRANSLATABLE CHARACTER
23000   INTEGRITY CONSTRAINT VIOLATION
23001   RESTRICT VIOLATION
23502   NOT NULL VIOLATION
23503   FOREIGN KEY VIOLATION
23505   UNIQUE VIOLATION
23514   CHECK VIOLATION
24000   INVALID CURSOR STATE
25000   INVALID TRANSACTION STATE
25001   ACTIVE SQL TRANSACTION
25002   BRANCH TRANSACTION ALREADY ACTIVE
25008   HELD CURSOR REQUIRES SAME ISOLATION LEVEL
25003   INAPPROPRIATE ACCESS MODE FOR BRANCH TRANSACTION
25004   INAPPROPRIATE ISOLATION LEVEL FOR BRANCH TRANSACTION
25005   NO ACTIVE SQL TRANSACTION FOR BRANCH TRANSACTION
25006   READ ONLY SQL TRANSACTION
25007   SCHEMA AND DATA STATEMENT MIXING NOT SUPPORTED
25P01   NO ACTIVE SQL TRANSACTION
25P02   IN FAILED SQL TRANSACTION
26000   INVALID SQL STATEMENT NAME
27000   TRIGGERED DATA CHANGE VIOLATION
28000   INVALID AUTHORIZATION SPECIFICATION
2B000   DEPENDENT PRIVILEGE DESCRIPTORS STILL EXIST
2BP01   DEPENDENT OBJECTS STILL EXIST
2D000   INVALID TRANSACTION TERMINATION
2F000   SQL ROUTINE EXCEPTION
2F005   FUNCTION EXECUTED NO RETURN STATEMENT
2F002   MODIFYING SQL DATA NOT PERMITTED
2F003   PROHIBITED SQL STATEMENT ATTEMPTED
2F004   READING SQL DATA NOT PERMITTED
34000   INVALID CURSOR NAME
38000   EXTERNAL ROUTINE EXCEPTION
38001   CONTAINING SQL NOT PERMITTED
38002   MODIFYING SQL DATA NOT PERMITTED
38003   PROHIBITED SQL STATEMENT ATTEMPTED
38004   READING SQL DATA NOT PERMITTED
39000   EXTERNAL ROUTINE INVOCATION EXCEPTION
39001   INVALID SQLSTATE RETURNED
39004   NULL VALUE NOT ALLOWED
39P01   TRIGGER PROTOCOL VIOLATED
39P02   SRF PROTOCOL VIOLATED
3D000   INVALID CATALOG NAME
3F000   INVALID SCHEMA NAME
4   TRANSACTION ROLLBACK
40002   INTEGRITY CONSTRAINT VIOLATION
40001   SERIALIZATION FAILURE
40003   STATEMENT COMPLETION UNKNOWN
40P01   DEADLOCK DETECTED
42000   SYNTAX ERROR OR ACCESS RULE VIOLATION
42601   SYNTAX ERROR
42501   INSUFFICIENT PRIVILEGE
42846   CANNOT COERCE
42803   GROUPING ERROR
42830   INVALID FOREIGN KEY

[HACKERS] Suggestion: additional system views

2004-10-28 Thread Josh Berkus
Folks,

Is there any reason that we don't have pg_functions, pg_users, pg_groups and 
other system views?pg_tables and pg_views is really useful, but it would 
be good to cover the other items as well.

Is there a reason not to have these other than that they're not coded?   If 
not, I'll get working on them.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] Suggestion: additional system views

2004-10-28 Thread Neil Conway
On Fri, 2004-10-29 at 07:35, Josh Berkus wrote:
 Is there any reason that we don't have pg_functions, pg_users, pg_groups and 
 other system views?pg_tables and pg_views is really useful, but it would 
 be good to cover the other items as well.

pg_functions might be useful, but what would pg_users offer that pg_user
does not already do?

A pg_sequences view might also be handy.

-Neil



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Suggestion: additional system views

2004-10-28 Thread Josh Berkus
Neil,

 pg_functions might be useful, but what would pg_users offer that pg_user
 does not already do?

Show a list of groups that the user belongs to?  Same thing with pg_groups; 
showing the list of users in the group.

 A pg_sequences view might also be handy.

Yes.  Anything else?  So far I have:

pg_users
pg_groups
pg_functions
pg_sequences
hmmm ...
pg_schemas 
pg_tablespaces 
... as well, just for completeness.

This is obviously and 8.1 thing, so I'll put it on my task list for after 8.0 
PR is done.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html