Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Michael Fuhr
On Sat, Jul 16, 2005 at 05:39:59PM -0400, Garrett Kalleberg wrote: Now, the rec with id '1234' is in the table invoicelineiteminventorytypes, but I can't wrap my head around the fact that SELECT invoicelineitemtypeid FROM invoicelineitemtypes yields the rec with

Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Sander Steffann
Hi, http://www.postgresql.org/docs/8.0/static/ddl-inherit.html A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. This is true on both the referencing and

Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Garrett Kalleberg
On Jul 17, 2005, at 5:35 AM, Michael Fuhr wrote: See the inheritance documentation: http://www.postgresql.org/docs/8.0/static/ddl-inherit.html A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single

Re: [GENERAL] Trigger on Update

2005-07-17 Thread mark reid
Hi, Change it to a BEFORE UPDATE trigger, and set NEW.updated_date := now(); Otherwise each update produces another update produces another update -Mark. [EMAIL PROTECTED] wrote: Can anybody help me creating a trigger on update trigger with update statement as below. This trigger

Re: [GENERAL] How to create unique constraint on NULL columns

2005-07-17 Thread Patrick TJ McPhee
In article [EMAIL PROTECTED], Andrus [EMAIL PROTECTED] wrote: % Then redesign this as a many to many relation. That way someone can % have access to one, two, three, four, or all departments. % % This means adding separate row for each department into permission table. % If new department is

Re: [GENERAL] PLPGSQL how to get transaction isolation level info

2005-07-17 Thread Janning Vygen
Am Freitag, 15. Juli 2005 19:19 schrieb Tom Lane: Janning Vygen [EMAIL PROTECTED] writes: How can a function determine in which isolation level it runs? select current_setting('transaction_isolation'); Thank you for the hint. I didn't find it myself because tab completion on SHOW doesn't

[GENERAL] (Win32 Postgres) Slow to Connect first - OK afterwards

2005-07-17 Thread Scott cox
I am running PostgreSQL 8.0 on WinXP When I try to connect psql.exe -h localhost -p 5432 template1 postgres I have to wait 30 seconds before the Password: Prompt arrives 30 seconds after the password is entered. Once I am connected access is fast. I figured the problem is Authentication. a.)

Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Michael Fuhr
On Sun, Jul 17, 2005 at 12:38:48PM +0200, Sander Steffann wrote: A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. This is true on both the referencing

Re: [GENERAL] (Win32 Postgres) Slow to Connect first - OK afterwards

2005-07-17 Thread Martijn van Oosterhout
On UNIX this generally suggests a DNS configuration problem (can't lookup 127.0.0.1 in DNS). That's all I can help you with here... Hope this helps, On Fri, Jul 15, 2005 at 03:08:24PM +, Scott cox wrote: I am running PostgreSQL 8.0 on WinXP When I try to connect psql.exe -h localhost

Re: [GENERAL] (Win32 Postgres) Slow to Connect first - OK afterwards

2005-07-17 Thread Tom Lane
Scott cox [EMAIL PROTECTED] writes: I am running PostgreSQL 8.0 on WinXP When I try to connect psql.exe -h localhost -p 5432 template1 postgres I have to wait 30 seconds before the Password: Prompt arrives 30 seconds after the password is entered. Once I am connected access is fast. I

Re: [GENERAL] Japanese words not distinguished - Solution

2005-07-17 Thread Harry Mantheakis
I'll report the results, for the record. Okay, for the record, all went well. I re-initialise my PostgreSQL 7.4 database cluster using the following command: initdb --locale=C --encoding UNICODE Then, after defining the relevant groups and users, I used pg_restore to restore my data from a

Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Sander Steffann
Hi, A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. This is true on both the referencing and referenced sides of a foreign key constraint. I would realy

Re: [GENERAL] Converting MySQL tinyint to PostgreSQL

2005-07-17 Thread Jim C. Nasby
On Sat, Jul 16, 2005 at 03:18:24PM -0700, Ron Mayer wrote: Jim C. Nasby wrote: On Thu, Jul 14, 2005 at 11:29:23PM +0200, Martijn van Oosterhout wrote: On Thu, Jul 14, 2005 at 11:30:36AM -0500, Jim C. Nasby wrote: On Wed, Jul 13, 2005 at 07:52:04PM -0400, Bruce Momjian wrote: This is a good

Re: [GENERAL] foreign key constraints and inheritence

2005-07-17 Thread Jim C. Nasby
On Sun, Jul 17, 2005 at 10:33:58PM +0200, Sander Steffann wrote: I wish I knew enough about the internals of PostgreSQL to write one :-) Sander Well, there are other TODO items that are much simpler, which would be a great way to learn more about the internals. :) There's been talk of creating