mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +03:00 
			
		
		
		
	Added PostgreSQL 9.0 error codes.
This commit is contained in:
		
							parent
							
								
									b072a04c9c
								
							
						
					
					
						commit
						75a6f783c5
					
				| 
						 | 
					@ -1,3 +1,7 @@
 | 
				
			||||||
 | 
					2010-09-23  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* lib/errorcodes.py: Added PostgreSQL 9.0 error codes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2010-08-05  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 | 
					2010-08-05  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* psycopg/connection_int.c: don't execute a ROLLBACK on close()/GC.
 | 
						* psycopg/connection_int.c: don't execute a ROLLBACK on close()/GC.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,7 +50,7 @@ An example of the available constants defined in the module:
 | 
				
			||||||
    '42P01'
 | 
					    '42P01'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Constants representing all the error values documented by PostgreSQL versions
 | 
					Constants representing all the error values documented by PostgreSQL versions
 | 
				
			||||||
between 8.1 and 8.4 are included in the module.
 | 
					between 8.1 and 9.0 are included in the module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. autofunction:: lookup(code)
 | 
					.. autofunction:: lookup(code)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -201,6 +201,7 @@ NOT_NULL_VIOLATION = '23502'
 | 
				
			||||||
FOREIGN_KEY_VIOLATION = '23503'
 | 
					FOREIGN_KEY_VIOLATION = '23503'
 | 
				
			||||||
UNIQUE_VIOLATION = '23505'
 | 
					UNIQUE_VIOLATION = '23505'
 | 
				
			||||||
CHECK_VIOLATION = '23514'
 | 
					CHECK_VIOLATION = '23514'
 | 
				
			||||||
 | 
					EXCLUSION_VIOLATION = '23P01'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Class 24 - Invalid Cursor State
 | 
					# Class 24 - Invalid Cursor State
 | 
				
			||||||
INVALID_CURSOR_STATE = '24000'
 | 
					INVALID_CURSOR_STATE = '24000'
 | 
				
			||||||
| 
						 | 
					@ -226,6 +227,7 @@ TRIGGERED_DATA_CHANGE_VIOLATION = '27000'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Class 28 - Invalid Authorization Specification
 | 
					# Class 28 - Invalid Authorization Specification
 | 
				
			||||||
INVALID_AUTHORIZATION_SPECIFICATION = '28000'
 | 
					INVALID_AUTHORIZATION_SPECIFICATION = '28000'
 | 
				
			||||||
 | 
					INVALID_PASSWORD = '28P01'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Class 2B - Dependent Privilege Descriptors Still Exist
 | 
					# Class 2B - Dependent Privilege Descriptors Still Exist
 | 
				
			||||||
DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST = '2B000'
 | 
					DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST = '2B000'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ def main():
 | 
				
			||||||
    filename = sys.argv[1]
 | 
					    filename = sys.argv[1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    file_start = read_base_file(filename)
 | 
					    file_start = read_base_file(filename)
 | 
				
			||||||
    classes, errors = fetch_errors(['8.1', '8.2', '8.3', '8.4'])
 | 
					    classes, errors = fetch_errors(['8.1', '8.2', '8.3', '8.4', '9.0'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    f = open(filename, "w")
 | 
					    f = open(filename, "w")
 | 
				
			||||||
    for line in file_start:
 | 
					    for line in file_start:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user