On Wed, 24 Oct 2007 09:43:10 +0200
Nis Jørgensen <[EMAIL PROTECTED]> wrote:
> Well, I have a couple of times had the "need" to have a primary
> key/uniqueness constraint with one column nullable (indicating "Not
> Applicable"). The "problem" is that we have only one NULL, which for
> comparison pur
Forgive my butting in, but frankly, most of the times, whenever I find
myself in a very 'exceptional problem' such as this one, I always end up
questioning the basic design due to which I am stuck in the first place.
Paul, it seems that probably there is a basic design issue here.
All the best :)
Paul Lambert wrote:
It's marked not null as a result of being part of the primary key for
that table which I can't really get around.
I can get away with not having the foreign key though, so I'll have to
go down that path.
Cheers,
P.
Ignore this whole thread actually.
I need to rethin
D'Arcy J.M. Cain skrev:
> On Wed, 24 Oct 2007 11:00:47 +0800
> Paul Lambert <[EMAIL PROTECTED]> wrote:
>> It's marked not null as a result of being part of the primary key for
>> that table which I can't really get around.
>>
>> I can get away with not having the foreign key though, so I'll have t
On Wed, 24 Oct 2007 11:00:47 +0800
Paul Lambert <[EMAIL PROTECTED]> wrote:
> It's marked not null as a result of being part of the primary key for
> that table which I can't really get around.
>
> I can get away with not having the foreign key though, so I'll have to
> go down that path.
It can
Tom Lane wrote:
If I'm understanding you correctly, the problem is not the foreign key,
it's that you marked the column NOT NULL. A foreign key constraint by
itself will allow a NULL in the referencing column to pass. You choose
whether you want to allow that or not by separately applying a NO
Paul Lambert <[EMAIL PROTECTED]> writes:
> I have a table where one column references by foreign key a column from
> another table. However, the column in this first table does not always
> contain data which results in a not-null constraint violation when I
> attempt an insert.
> My question t
> My question therefore is, is it possible to create a foreign key that is
> conditional, i.e. only enforce the foreign key where the value in that
> table is not null.
My understanding from reading previous threads on this topic is the answer
is no, however you could make your own pseudo-foreign
I have a table where one column references by foreign key a column from
another table. However, the column in this first table does not always
contain data which results in a not-null constraint violation when I
attempt an insert.
My question therefore is, is it possible to create a foreign ke
How do you get this to work?
I'm creating a view of a table, but I'm trying to do something like
this:
create table t (
id integer not null,
amount numeric(7,2)
);
create view v as
select id as v_id,
'paid amount: ' || amount as v_comment
from t
;
You get this:
When I did the same task - I've writting a script on the perl, and if you
have stable databese structure, I think, it's a best way - write a script
which will run by cron /on-demand. Because, I don't remember exactly why
(date format is different or something else) but, I couldn't move data
from M
>
>
> there is one in contrib
>
> as well there is some through freshmeat.net
There are two in /contrib. One from pgsql.com, and another from
freshmeat.net:
http://ziet.zhitomir.ua/~fonin/code/
I would like to see these merged someday.
--
Bruce Momjian|
On 3/6/01, 5:26:18 PM, Josh Berkus <[EMAIL PROTECTED]> wrote regarding [SQL]
Quick question MySQL --> PgSQL:
> Folks,
> Just a quick question ... I need to do a regular transfer (daily +
on
> demand) of data from a MySQL database to a PostgreSQL database and back
>
"Brett W. McCoy" wrote:
>
> On Tue, 6 Mar 2001, Josh Berkus wrote:
>
> > Just a quick question ... I need to do a regular transfer (daily + on
> > demand) of data from a MySQL database to a PostgreSQL database and back
> > again. Can anybody steer me towards a good script for this, or do
v7.1's contrib directory has the mysql->pgsql script that was used for the
SourceForge migration ... its also downloadable at
http://www.pgsql.com->Downloads
On Tue, 6 Mar 2001, Brett W. McCoy wrote:
> On Tue, 6 Mar 2001, Josh Berkus wrote:
>
> > Just a quick question ... I need to do a r
On Tue, 6 Mar 2001, Josh Berkus wrote:
> Just a quick question ... I need to do a regular transfer (daily + on
> demand) of data from a MySQL database to a PostgreSQL database and back
> again. Can anybody steer me towards a good script for this, or do I
> have to write my own in PHP?
Don
Folks,
Just a quick question ... I need to do a regular transfer (daily + on
demand) of data from a MySQL database to a PostgreSQL database and back
again. Can anybody steer me towards a good script for this, or do I
have to write my own in PHP?
Sorry to bother everyone with som
17 matches
Mail list logo