pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unknown values in int8 fields?
3+ messages / 3 participants
[nested] [flat]

* Unknown values in int8 fields?
@ 2001-07-16 02:05 Chris Ruprecht <chrup999@yahoo.com>
  2001-07-16 02:24 ` RE: Unknown values in int8 fields? Robby Slaughter <webmaster@robbyslaughter.com>
  2001-07-16 03:48 ` Re: Unknown values in int8 fields? Stephan Szabo <acroyear_07030@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Chris Ruprecht @ 2001-07-16 02:05 UTC (permalink / raw)
  To: pgsql-sql

Hi Chris,

When I load records with copy <table> from ... And one of the fields (last
one) is left empty, I want the default of nextval('sequence_table') to kick
in - but it doesn't.
Now, the field with a unique index on it stays blank. No big deal if I could
go and say 'update rate set recno = nextval('sequence_rate') where recno = 0
- but it's not that easy as the recno is not 0 but - hmm  what? What can I
check for? I tried '?' and ? And 0 and ... And ... And ... But nothing works
... Now what?

Best regards
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: Unknown values in int8 fields?
  2001-07-16 02:05 Unknown values in int8 fields? Chris Ruprecht <chrup999@yahoo.com>
@ 2001-07-16 02:24 ` Robby Slaughter <webmaster@robbyslaughter.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Robby Slaughter @ 2001-07-16 02:24 UTC (permalink / raw)
  To: Chris Ruprecht <chrup999@yahoo.com>; pgsql-sql

I've not been following this too closely but it sounds like you are
trying to COPY records from table A to table B, where the table B
also includes a serial value.

Here's an easy trick which I'm pretty sure will work: instead of
using COPY use SELECT INTO. It's much slower but I think it will
do the trick.

Good luck! HTH.

-Robby

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Chris Ruprecht
Sent: Sunday, July 15, 2001 9:06 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Unknown values in int8 fields?


Hi Chris,

When I load records with copy <table> from ... And one of the fields (last
one) is left empty, I want the default of nextval('sequence_table') to kick
in - but it doesn't.
Now, the field with a unique index on it stays blank. No big deal if I could
go and say 'update rate set recno = nextval('sequence_rate') where recno = 0
- but it's not that easy as the recno is not 0 but - hmm  what? What can I
check for? I tried '?' and ? And 0 and ... And ... And ... But nothing works
... Now what?

Best regards
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Unknown values in int8 fields?
  2001-07-16 02:05 Unknown values in int8 fields? Chris Ruprecht <chrup999@yahoo.com>
@ 2001-07-16 03:48 ` Stephan Szabo <acroyear_07030@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2001-07-16 03:48 UTC (permalink / raw)
  To: Chris Ruprecht <chrup999@yahoo.com>; +Cc: pgsql-sql

Have you tried "where recno IS NULL"?

----- Original Message -----
From: "Chris Ruprecht" <chrup999@yahoo.com>
To: <pgsql-sql@postgresql.org>
Sent: Sunday, July 15, 2001 7:05 PM
Subject: [SQL] Unknown values in int8 fields?


> Hi Chris,
>
> When I load records with copy <table> from ... And one of the fields (last
> one) is left empty, I want the default of nextval('sequence_table') to
kick
> in - but it doesn't.
> Now, the field with a unique index on it stays blank. No big deal if I
could
> go and say 'update rate set recno = nextval('sequence_rate') where recno =
0
> - but it's not that easy as the recno is not 0 but - hmm  what? What can I
> check for? I tried '?' and ? And 0 and ... And ... And ... But nothing
works
> ... Now what?



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-07-16 03:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 02:05 Unknown values in int8 fields? Chris Ruprecht <chrup999@yahoo.com>
2001-07-16 02:24 ` Robby Slaughter <webmaster@robbyslaughter.com>
2001-07-16 03:48 ` Stephan Szabo <acroyear_07030@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox