[GENERAL] unique constraint on more than one tables

2006-12-28 Thread Akbar

Hi,

Imagine I have two tables, like this:

create table bla_a (
 id serial primary key,
 name varchar(31) not null,
 comment varchar(31)
);

create table bla_b (
 id serial primary key,
 name varchar(31) not null,
 blabla int
);

I want to make sure that both tables could not have the same value for
name column. Can I do that?

insert into bla_a ( id, name, comment ) values ( 1, 'bo', 'ha');
insert into bla_b ( id, name, comment ) values ( 1, 'bo', 3);

I want to make the second insertion failed because of unique
constraint. Can I do that?

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] select union with table name

2006-12-28 Thread Akbar

Hi, I have two tables.
create table blue (
 id serial primary key,
 name text not null,
 kill text not null
);

create table red (
 id serial primary key,
 name text not null,
 kiss text not null
);

select blue.name from blue union select red.name from red; give me this:
name
'blabla'
'bubu'
'haha'
'kkk'

I want this:
nametable_name
'blabla'   blue
'bubu'blue
'haha'red
'kkk'  red

Could I?

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] Installation problem with the version 8.0.2

2005-04-25 Thread Akbar
http://www.microsoft.com/downloads/details.aspx?FamilyID=4b6140f9-2d36-4977-8fa1-6f8a0f5dca8fDisplayLang=en


On Mon, 2005-04-25 at 15:37 +0530, K.RajaSekar wrote:
 Hi
 
 I am trying to install the 8.0.2 version in windows 2000 server. After
 opening the installer, I have got the welcome screen. I have selected the
 Language English/English in the welcome screen and clicked the start button.
 I am getting the following error.
 
 There is a problem with this windows installer package. A DLL required for
 this install to complete could not be run. Contact your support personnel or
 package vendor.
 
 What could be the problem?. While replying to this mail, I am requesting
 everyone, please send your reply to [EMAIL PROTECTED]
 
 Regards
 K.RajaSekar
 
 
 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
 


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[GENERAL] installation as service failed on windows xp

2005-04-25 Thread Akbar
Hi,

The first time I install postgresql in Windows XP, I install it as
service. The installer asked me to create postgres account. Ok, fine...
then someday I uninstalled postgresql so I can install the newer version
of postgresql. But first to make it clean, I delete the postgres account
from right clicking the My Computer, then click the properties. Choose
the advanced tab, then click the user profiles setting buttons.

Then when I try to install as service with postgres account, it said :
Invalid user name specified: Logon failure: unknown user name or bad
password.

I try to create postgres account from start menu --- account or control
panel -- user account, it said that The account already exists. But
there is no postgres account in User Accounts window.

So the questions is:
1. How do I really delete the postgres account that created by
postgresql installer???

Thank you.

Regards,

Akbar


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


[GENERAL] weird error on installing postgresql in Windows XP

2005-03-20 Thread Akbar
Hi,

I have installed previous version of postgresql. 8.x. I uninstalled it.
Then remove the superuser in My Computer ( right click ) -- Properties
-- in tab Advanced -- Settings button. I try to install postgresql
8.0.1. In service configuration, I checked the install as service
checkbox. Filled the form. After suggesting me to change the weak
password, it said that Internal account lookup failure: No mapping
between account names and security IDs was done.

What is going on here

Thank you.






---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly