On Thu, Feb 22, 2001 at 11:01:11PM -0500, Tom Lane wrote:
[EMAIL PROTECTED] writes:
I have the following type :
...
How can I insert a value in this table ?
INSERT INTO entiers VALUES('1234') should work fine.
I have tried and I have this message :
ex1=# insert into entiers
dear all
I hava 2 problems about view
1. i can't insert into view
2. i can't create view with union
I try to insert into view as following
create table t1 (id int,name varchar(12) check(id=10));
create table t2 (id int,name varchar(12) check(id10));
create view v1 as select * from t1,t2;
insert
Hi,
I cannot use any kind of odbc because my customers have his local m$
access db's locally then export them on .txt with tab or | separated, then
put on my server trought ftp.
and is working ok except that the customers are on spanish databases then
a data like:
I hava 2 problems about view
1. i can't insert into view
I try to insert into view as following
create table t1 (id int,name varchar(12) check(id=10));
create table t2 (id int,name varchar(12) check(id10));
create view v1 as select * from t1,t2;
This is not an updateable view in any
On Sun, Feb 18, 2001 at 03:42:43PM -0500, Kevin Quinlan allegedly wrote:
Does anyone have any performance numbers regarding SQL statements,
specifically SELECT, UPDATE, DELETE, and INSERT? For instance, on average
how long does a typical SELECT (UPDATE, DELETE, INSERT) statement take to
On Sun, Feb 18, 2001 at 03:42:43PM -0500, Kevin Quinlan allegedly wrote:
Does anyone have any performance numbers regarding SQL statements,
specifically SELECT, UPDATE, DELETE, and INSERT? For instance, on average
how long does a typical SELECT (UPDATE, DELETE, INSERT) statement take to
[EMAIL PROTECTED] writes:
ERROR: Load of file /ens/klimann/PostgreSQL/entier.o failed: Exec format error
.o? Did you convert this file into a shared library? I'd expect .so or
.sl depending on platform...
regards, tom lane
Mr. Taves,
Am I correct in concluding that I can't return a record
set from a function?
For example, in MS SQL I would do:
create procedure foo as
select * from yada
I expected to be able to do the following in postgresql.
create function foo (integer) returns (integer) as '
On Fri, 23 Feb 2001, Olaf Zanger wrote:
i'd like to add up the "true" values of a comparison like
sum(ab)
it just doesn't work like this
Try
sum(case when ab then 1 else 0 end)
--
Tod McQuillin
Olaf Zanger writes:
i'd like to add up the "true" values of a comparison like
sum(ab)
sum(case when ab then 1 else 0 end)
of maybe even just
select count(*) from table where ab;
--
Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/
hi there,
s cool,
this works streight away and took 5 min. waiting for a answer :-)
thanks very much to you tod personal and the mailing list for existence.
Olaf
Tod McQuillin schrieb:
On Fri, 23 Feb 2001, Olaf Zanger wrote:
i'd like to add up the "true" values of a comparison
Or how about just:
SELECT count(*) FROM tablename WHERE a b;
--
Andrew J Perrin - Ph.D. Candidate, UC Berkeley, Dept. of Sociology
Chapel Hill, North Carolina, USA - http://demog.berkeley.edu/~aperrin
[EMAIL
Zeugswetter Andreas SB [EMAIL PROTECTED] writes:
You probably wanted:
create view v1 as
select * from t1
union all
select * from t2;
Probably, but we don't support UNION in views before 7.1 :-(
I'm not real clear on why t1 and t2 are separate tables at all in this
example. Seems like
Hi fellows,
I'm trying to the following query:
select * from areas where titulo ~ '+' or titulo ~ '*'
and the answer is:
ERROR: regcomp failed with error repetition-operator operand invalid
I have tried to escape the '+' and the '*' with a backslash, as
follows:
select * from areas where
I believe you'll need two \ characters to escape the + or *.
titulo ~ '\\+'
On Fri, 23 Feb 2001, Gabriel Fernandez wrote:
Hi fellows,
I'm trying to the following query:
select * from areas where titulo ~ '+' or titulo ~ '*'
and the answer is:
ERROR: regcomp failed with error
Hi,
I need your help on something. I have to write a
trigger (in sybase) that does this: Everytime a record
gets updated it should update a column in that record
with the current date/time. I am able to do it for the
whole table, but how do I make sure the update happens
only for that record
select field from table
where field like '%\\%%' or field like '%*%';
select field from table
where field ~ '.*\\*.*' or ~ '.*%.*';
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
Gabriel,
Two backslashes.
select * from areas where titulo ~ '\\+' or titulo ~ '\\*'
Troy
Hi fellows,
I'm trying to the following query:
select * from areas where titulo ~ '+' or titulo ~ '*'
and the answer is:
ERROR: regcomp failed with error repetition-operator operand
Hi,
I was reading through Bruce's on line . I found follwing bit unclear...
"Notice that each query uses ORDER BY . Although this clause is not required,
LIMIT without ORDER BY returns random rows from the query, which would be
useless. "
When I run a query several time I get the same results
e.g.
Try:
CREATE TABLE emp (
id int4 primary key,
empname text,
salary int4,
last_date datetime,
last_user name);
CREATE FUNCTION emp_stamp () RETURNS OPAQUE AS
BEGIN
update emp set last_date=''now''::timestamp where id=NEW.id;
RETURN NEW;
END;
'
Hi,
I was reading through Bruce's on line . I found follwing bit unclear...
"Notice that each query uses ORDER BY . Although this clause is not required,
LIMIT without ORDER BY returns random rows from the query, which would be
useless. "
It means there is no guarantee which rows will be
My understanding:
because you return a subset instead of a single value,
so between 2 select ... limit ... queries.
if you delete a record(say song_id=947) then insert it again.
then results are different.
So for a multiple users db, you should use oder by when you use limit.
Jie LIANG
St.
I don't think it is actually random. It just that the order is not defined
and other events may change the order. I believe that without an ORDER BY
or other clauses that cause an index to be used that the database tends to
return rows in the order stored on disk. This order tends to be
Najm Hashmi [EMAIL PROTECTED] writes:
I just want to know what exatly --"LIMIT without ORDER BY returns random rows
from the query" --means
It means the results aren't guaranteed. It doesn't mean that the exact
same query run under the exact same conditions by the exact same version
of
Hello everyone,
I have a system (simplified for this example) with the following two tables:
TABLE1
id::int8
containerId::int8
containerType::varchar(100)
moreInfo::text
TABLE2
id::int8
containerId::int8
containerType::varchar(100)
I am away from my server for the weekend and I need a little help.
when doing updates of multiple fields there commas between
the elements?
I mean
update table set cname = 'Bill', caddress = '2nd floor' where acode =
'AVAN';
I refer to the space between 'Bill' and caddress.
if I could
Hello,
I would like my psql script to log everything that it does.
I set the following
\set ECHO all
\o foo.txt
\qecho
some sql, some ddl, etc...
\o
But foo.txt only contains
DROP
DROP
DROP
CREATE
CREATE
CREATE
I want it to contain everything that I see on the screen, what am I
missing?
Hi,
I cannot use any kind of odbc because my customers have his local m$
access db's locally then export them on .txt with tab or | separated, then
put on my server trought ftp.
and is working ok except that the customers are on spanish databases then
a data like:
Jeff MacDonald [EMAIL PROTECTED] writes:
A person recent pointed this out to me..
seems a bit funny, because limit 1 pretty much
say's it't not gonna return multiple values.
CREATE FUNCTION vuln_port(int4) RETURNS int4 AS 'SELECT port FROM
i_host_vuln WHERE vuln = $1 GROUP BY port ORDER BY
Ken Kline [EMAIL PROTECTED] writes:
I have just joined the list a few days ago and am trying quite hard
to come up to speed with pgsql but i find documentaion frustratiing.
I think maybe it;s just a matter of finding things that are of the
correct
scope. I've been an Oracle developer for
30 matches
Mail list logo