On 7/27/20 2:48 AM, Shashikanth Komandoor wrote:
Hi Mark,
Thank you for your response. And sorry for not giving you
complete information as I am not sue what to share with you.
I am using Postgresql-11.7 as my backend database. The below is
the structure of the address table in* mailman *database:
mailman=# \d address; Table "public.address" Column | Type | Collation | Nullable | Default ----------------+-----------------------------+-----------+----------+------------------------------------- id | integer | | not null | nextval('address_id_seq'::regclass) email | character varying | | | _original | character varying | | | display_name | character varying | | | verified_on | timestamp without time zone | | | registered_on | timestamp without time zone | | | user_id | integer | | | preferences_id | integer | | | Indexes: "address_pkey" PRIMARY KEY, btree (id) "ix_address_email" UNIQUE, btree (email) "ix_address_preferences_id" btree (preferences_id) "ix_address_user_id" btree (user_id) Foreign-key constraints: "address_preferences_id_fkey" FOREIGN KEY (preferences_id) REFERENCES preferences(id) "address_user_id_fkey" FOREIGN KEY (user_id) REFERENCES "user"(id) Referenced by: TABLE ""user"" CONSTRAINT "_preferred_address" FOREIGN KEY (_preferred_address_id) REFERENCES address(id) ON DELETE SET NULL TABLE "autoresponserecord" CONSTRAINT "autoresponserecord_address_id_fkey" FOREIGN KEY (address_id) REFERENCES address(id) TABLE "member" CONSTRAINT "member_address_id_fkey" FOREIGN KEY (address_id) REFERENCES address(id) TABLE "onelastdigest" CONSTRAINT "onelastdigest_address_id_fkey" FOREIGN KEY (address_id) REFERENCES address(id)
The below is the structure of *user* table:
mailman=# \d user; Table "public.user" Column | Type | Collation | Nullable | Default -----------------------+-----------------------------+-----------+----------+---------------------------------- id | integer | | not null | nextval('user_id_seq'::regclass) display_name | character varying | | | password | character varying | | | _user_id | uuid | | | _created_on | timestamp without time zone | | | is_server_owner | boolean | | | _preferred_address_id | integer | | | preferences_id | integer | | | Indexes: "user_pkey" PRIMARY KEY, btree (id) "ix_user__user_id" btree (_user_id) "ix_user_preferences_id" btree (preferences_id) Foreign-key constraints: "_preferred_address" FOREIGN KEY (_preferred_address_id) REFERENCES address(id) ON DELETE SET NULL "user_preferences_id_fkey" FOREIGN KEY (preferences_id) REFERENCES preferences(id) Referenced by: TABLE "address" CONSTRAINT "address_user_id_fkey" FOREIGN KEY (user_id) REFERENCES "user"(id) TABLE "domain_owner" CONSTRAINT "domain_owner_user_id_fkey" FOREIGN KEY (user_id) REFERENCES "user"(id) TABLE "member" CONSTRAINT "member_user_id_fkey" FOREIGN KEY (user_id) REFERENCES "user"(id)
mailman=# \dn List of schemas Name | Owner --------+---------- public | postgres (1 row)
mailman=# select * from user; user
postgres (1 row)
*The above command output is not showing any fields. But if use the table as public.user (schema.tablename) with select command, it is showing the data. But without schema name this table is not showing those fields. Not sure if this the expected behavior or not.*
This is expected. psql gets confused because it has its own user table.
The above table definitions look fine.
Is there any entry in the address
table for which id
is not an integer?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan