[Gambas-user] Gambas & PostgreSQL cannot create index. relation XXX does not exist.

Randy bug.me at ...734...
Sat Jan 24 18:30:59 CET 2009


Hello Rolf,

I try to make index on any of the fields. The code that I posted is the 
last try and not what I intended for indexes for the table.  If I try to 
make indexes on any of the fields, Gambas fails with that error message. 
I turn on the DB.Bebug and try to make index for glsort field only.


Here's the debug output with index:

postgresql: 0x8159aa8: select substring(version(),12,5)
postgresql: 0x8159aa8: show client_encoding
postgresql: 0x8159aa8: select relname from pg_class where (relkind = 'r' 
or relkind = 'v') and (relname = 'glcoa') and (relnamespace not in 
(select oid from pg_namespace where nspname = 'information_schema'))
postgresql: 0x8159aa8: select pg_class.relname from pg_class, pg_index, 
pg_class pg_class2 where pg_class2.relname = 'glcoa' and 
(pg_class2.relnamespace not in (select oid from pg_namespace where 
nspname = 'information_schema')) and pg_index.indrelid = pg_
class2.oid and pg_index.indexrelid = pg_class.oid and pg_class.relname = 
'glcoa_sort'
postgresql: 0x8159aa8: CREATE UNIQUE INDEX "glcoa_sort" ON glcoa ( glsort )


Here's the debug output without index:

postgresql: 0x8159de8: select substring(version(),12,5)
postgresql: 0x8159de8: show client_encoding
postgresql: 0x8159de8: select relname from pg_class where (relkind = 'r' 
or relkind = 'v') and (relname = 'glcoa') and (relnamespace not in 
(select oid from pg_namespace where nspname = 'information_schema'))
postgresql: 0x8159de8: CREATE TABLE "glcoa" ( "company" VARCHAR(3), 
"account" VARCHAR(12) NOT NULL , "description" VARCHAR(32), "gltype" 
VARCHAR(1), "glsort" INT, "status" VARCHAR(1), PRIMARY KEY (account) )
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
"glcoa_pkey" for table "glcoa"


With indexes Gambas doesn't create the table! Bug?


Randy :-)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta3a (ProxSMTP 1.6)
AntiSpam:  SpamAssassin 3.2.3
AntiVirus: ClamAV 0.91.2/8897 - Fri Jan 23 07:59:36 2009
by Markus Madlener @ http://www.copfilter.org




More information about the User mailing list