Re: [SQL] Foreign key

2005-03-26 Thread Michael Fuhr
On Fri, Mar 25, 2005 at 04:31:16PM +0100, [EMAIL PROTECTED] wrote: > > When i add table with foreign key in my database, this error return : < > number of referencing and referenced colums for foreign key disagree>. Apparently the referencing key (the foreign key specification) has a different num

Re: [SQL] Auto Numbering

2005-03-26 Thread Michael Fuhr
On Tue, Mar 22, 2005 at 11:25:10AM -0800, sreekanth pk wrote: > > How to enable autonumbering in pgsql. See "How do I create a serial/auto-incrementing field?" in the FAQ: http://www.postgresql.org/docs/faqs.FAQ.html#4.11.1 If that's not what you're looking for then please be more specific. -

[SQL] Merging item codes using referential integrity

2005-03-26 Thread Andrus Moor
I have item table and a lot of child tables where the items are used. I want to merge two item codes into single item in all tables. It is not nice to write a lot of separate UPDATE statements for each table. So I want to utilize REFERENCES clause for merging. I tried the following code but got du

[SQL] Accessing other Databases

2005-03-26 Thread osmar
Hi all. Anybody knows some way to access other database inside of a different database(under the same instalation of postgres)? Like the example under: I have two database under the same instalation(database A and B). I am doing some queries in A - pslq A - and inside A, I want to access, tables,

[SQL] Permissions on tables

2005-03-26 Thread subhash
Hi, I have a requirement where I have a table and a view on top of it. I want to make some changes so that a user in a given group would be able to insert/update only on the view (ofcourse i have a rule which inserts/updates the table) but not on the underlying table. I tried revoke the insert/upda

[SQL] How to make update statement to work

2005-03-26 Thread Andrus Moor
I want to nullify fields which does not exist in reference table. I tried UPDATE demo.toode SET "liik"=NULL,"grupp"=NULL WHERE ("grupp","liik") NOT IN (SELECT ("grupp", "liik") FROM "artliik") but this causes error: ERROR: operator d

Re: [SQL] timestamp precision - can I control precision at select time

2005-03-26 Thread [EMAIL PROTECTED]
thanks, christoph. i did go ahead and retool all the tables, but glad to know about the casting option. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] select a list of schema names

2005-03-26 Thread Andrus Moor
I want to implement a multi-company database where each schema represents different company. I created a number of schemas in a database. How to select a list of schema names which current user is authorized to access ? I want to get the list of companies to allow user pick the one. ---

[SQL] Is there a way to find a schema name

2005-03-26 Thread Kalyani Chennupati
Would like to know if there is a way to find a schema name (when in the schema through a application or through psql). Thanks KC ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Auto Numbering

2005-03-26 Thread sreekanth pk
hello sir/madam,      How to enable autonumbering in pgsql. How Can i implement autonumbering. Am using servlets,jsp and tomcat to develope web applications.   regards sreekanth__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protect

[SQL] Foreign key

2005-03-26 Thread ASAKALAL
Hello,   When i add table with foreign key in my database, this error return : « number of referencing and referenced colums for foreign key disagree». How resolve this problem ?   Thanks   alain SAKALALA Mailto:[EMAIL PROTECTED]