When trying to alter a table and add a foreign key, I am getting this
error if the table has any data in it:
playpen=# alter table message add FOREIGN KEY (pod,originator)
REFERENCES usertable (podkey,userkey);
NOTICE: ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s)
for FOREIGN KE
"Edmar Wiggers" <[EMAIL PROTECTED]> writes:
> select * from users where last_visit + 7 > now();
> ERROR: Unable to convert null timestamp to date
Yeah, someone who hadn't quite grokked the concept of NULL seems to have
written a lot of the date.c code :-(.
This is fixed for 7.1. If it's re
Strange, this works:
select * from users where last_visit > now() + 7;
-- last_visit is nullable, of type timestamp
But this doesn't
select * from users where last_visit + 7 > now();
ERROR: Unable to convert null timestamp to date
-- yes, there are users where last_visit IS NULL
BTW
Beth -
Both errors you describe are due to using 6.3. The first one might work if
you parenthize the repeated use of ||, as so:
select * from av34s1 where chromat ~~ (('%' || sample ) || '%');
Ross
On Thu, Dec 07, 2000 at 01:45:00PM -0800, Beth Gatewood wrote:
> Hi Francis-
>
> Thank you for
Beth Gatewood <[EMAIL PROTECTED]> writes:
> I hope this isn't because I am using 6.3 (yes...I know it is very very
> old but this is currently where the data is!)
> here is the query:
> select * from av34s1 where chromat ~~ ('%' || sample || '%');
> ERROR: parser: syntax error at or near "||"
I
> This makes perfect sense...unfortunately it isn't working...
>
> I hope this isn't because I am using 6.3 (yes...I know it is very very
> old but this is currently where the data is!)
>
> here is the query:
>
> select * from av34s1 where chromat ~~ ('%' || sample || '%');
>
>
> ERROR: pars
Hi,
Is any other SQL implicit cursor attribute in PL/plsql ??
when you say (in pl/plsql):
select field into v_1 from atable where whatever;
special variable FOUND can be used to tell return is null or not.
this functions like SQL%FOUND or SQL%NOTFOUND in Oracle,
however, when I do some DML(i
Hi!
I did as postgres user
ipcclean
then
pg_ctl stop
but then when I tried to start again the server as usual I couldn't, I just
doesn't do anything.
Somebody know whats going on?
Thank you,
Rocael.
Get free email and a permanen
Hi all!
I'm using postgresql7.0.2
I did
ipcclean
and then
pg_ctl stop
then I tried to start again the DB server as usual
nohup postmaster -i > pgserver.log 2>&1 &
I got this error:
FATAL 2: Read("/usr/local/pgsql/data/pg_control") failed:2
Startup failed - abort.
Somebody know what could be wrong
Beth Gatewood writes:
> So-If I had a table where I had LONG_NAME and ABBR as attributes.
>
> I want something like
>
> SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
> in that row]%';
SELECT whatever FROM my_table a, my_table b WHERE a.long_name like (b.abbr || '%');
-
Hi Francis-
Thank you for your rapid and excellent response.
This makes perfect sense...unfortunately it isn't working...
I hope this isn't because I am using 6.3 (yes...I know it is very very
old but this is currently where the data is!)
here is the query:
select * from av34s1 where chromat
Hi Beth,
Try something like this ...
Here's a simple table schema:
CREATE TABLE abbrev (
abbr varchar(10),
long_name varchar(50),
primary key(abbr)
);
Throw in some random data:
INSERT INTO abbrev VALUES ('fs', 'fsolomon');
INSERT INTO abbrev VALUES ('bg', 'bgatewood');
INSERT INTO abbr
Hi-
I can't figure out how to do this
I examine a table where I think that one attribute is an abbreviation of
another attribute.
So-If I had a table where I had LONG_NAME and ABBR as attributes.
I want something like
SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
Hi all!
I am using postgresql 7.0.2 and then installed tcl 8.2.3 (from
dev.scriptics.com). I followed all the instructions to install tcl.
Then I have configured again postgres using this flag, --with-tcl.
everythings looks ok, I did a
createlang pltcl mydb and it worked!
then load some pltcl
14 matches
Mail list logo