Using the below (with a few fixes, delcare->declare
and adding the close quote and language type as plpgsql,
and a table1 defined as id int, field1 varchar, field2 varchar,
I get a NULL returned if I select test1(); I'm somewhere
between beta4 and 5 though.
On Sun, 18 Mar 2001, Josh Berkus wrote
On Mon, 19 Mar 2001, postgresql wrote:
> I have a table that I want to add a serial type column. Is there a way
> to add it or do I have to create a new table and insert into it. I have
> experimented with:
>
> insert into newdb (name) select name from olddb order by jobno;
>
> however, pg d
On Mon, 19 Mar 2001, Josh Berkus wrote:
> Tom, Stephan. List folks:
>
> I'm having a great deal of trouble with the automated constraint
> triggers as implemented in 7.1 beta 3. I find that if I establish a
> foriegn key through the CREATE TABLE statement, things start to blow up
> if I mo
On Mon, 19 Mar 2001, Josh Berkus wrote:
> Stephan,
>
> > Yeah, it doesn't play nice with alter table at all. :(
> > Actually, for recreating -- All you really need to do is kill the
> > three triggers that it creates (drop trigger should work) and use
> > alter table to add them again.
>
> How
On Mon, 19 Mar 2001, Joseph Shraibman wrote:
> I want to select all the entries from d that have at least one
> corresponding entry in u that meets my conditions. The problem is that
> count(*) is returning the number of corresponding entries in u, and I
> want only the number of entries in d.
> > And postgres tries to be helpful again... :( [I *really* dislike this
> > adding to from list thing] Technically the above should be illegal
> > because no from list contains u or a. Postgres is adding them to the
> > from list for you.
> >
> I get the same result if I do:
> select count(d
On Thu, 22 Mar 2001, [iso-8859-1] Johannes Grødem wrote:
> Hi,
>
> it seems I can't have a foreign key that references some subclass. Postgres
> says it can't figure out what its primary key is. The primary key is defined
> in the superclass.
Unique/primary key doesn't inherit to subclasses.
You'll probably want something like null::varchar (or other appropriate
type) for the nulls. It's trying to grab the type from the first
select and can't figure the type out for the null. (Technically
speaking, it's probably supposed to be CAST(NULL AS VARCHAR) to
be technically sql complient,
On Mon, 26 Mar 2001, Jack wrote:
> According to user guide, both Raise Notice & Raise Exception will write
> message to database log. Which system table is the database log about?
It's actually generally on either STDERR or sent to syslog depending
on configuration.
> By the way what is the di
> create function updateCat() returns opaque as '
> declare
> rec record;
> rename new to cat;
> rename old to ct;
> maxlen integer;
>
> begin
> if tg_op = ''INSERT'' and cat.category is null then
> raise exception ''You are missing entry for category field'';
I was going to guess that it was something related to the
foreign key, but I can't imagine why that would be affected
by a delete on the referencing table (there shouldn't be
a trigger there anyway).
Can you send full schema with constraints for the tables?
On Wed, 28 Mar 2001, chris Günther wr
On Tue, 17 Apr 2001, clayton cottingham wrote:
> hi one of the developers here at work say this should work
> insert into detail (det_id,det_mas_id,det_date,det_amt) values
> (0,0,now(),'0'), (1,1,now(),'1');
>
>
>
> but when i try that in postgres like:
> insert into detail (det_id,det_ma
On Wed, 18 Apr 2001, Sara Cohen wrote:
> The Problem:
>
>
> I would like to use a subquery that returns one column, but more than one
> tuple. The result of this subquery is then used in an aggregate function.
>
> For example, suppose I have a table c, with columns a and b of
> num
On Wed, 18 Apr 2001, Stef Telford wrote:
> CREATE TABLE action
> (
> ORDER_IDintegerPRIMARY KEY,
> ORDERTYPE integerNOT NULL,
> client_idchar(16)NOT NULL,
> priority integerDEFAULT 5
On Wed, 25 Apr 2001, Kyle wrote:
> Peter Eisentraut wrote:
>
> > Kyle writes:
> >
> > > Is there a way to get this to work without granting update to table b?
> >
> > Update to 7.1.]
>
> I'm on 7.1. Should an RI trigger under 7.1 run as the DBA or as the current
> user?
IIRC, only the checks
On Wed, 25 Apr 2001, Peter J. Schoenster wrote:
> I want to use this referential integrity etc. that I've never used in
> mysql ... so I tried many things and looked here and there ... My
> example below produces this error:
>
> > CreateTrigger: function check_primary_key() does not exist
>
On Fri, 27 Apr 2001, [iso-8859-1] Hans-Jürgen Schönig wrote:
> Is there any possibility to make PostgreSQL use indexes when working
> with regular expressions?
>
> performance=# EXPLAIN SELECT * FROM perftest WHERE id=100;
> NOTICE: QUERY PLAN:
>
> Index Scan using idx_id_perftest on perftest
On Fri, 27 Apr 2001, Scott David Walter wrote:
> I am attempting to add a few attributes to an existing table that already
> contains data. The problem that I am having is that the new attributes
> that I want to add need to be forgein key references to other tables. I
> can't figure out how to
On Wed, 2 May 2001, Ligia Pimentel wrote:
> I need to know if there is a sql function implemented in postgres that gives
> me a date plus any number of days, months or years (the traditional dateadd
> function) or how to do it in sql?
Just add a date and an interval. Something like:
date + '1
On Sun, 6 May 2001, Michael Richards wrote:
> I see that the REFERENCES constraint is a little more restrictive in
> 7.1. I need to have a table with a constraint so one of it's columns
> must exist in a second table. This is not a key, since there may be N
> columns in the second table that m
Yes. It depends on what exactly you want for the update/delete cases
on permissions. I believe that in any cases you can use the
check function that's used by the fk implementation to do the
insert/update check on objects. If you don't mind update/deletes
on permission failing if the row being
> I have a problem with inherited refences.
> For example :
> CREATE TABLE A(LNR integer Primary key blabla);
> CREATE TABLE B () INHERITS(A);
> CREATE TABLE C(LNR integer primary key blabla, RNR Intger not null,
> unique(RNR), FOREIGN KEY(RNR) REFERENCES A.LNr ON DELETE CASCADE);
> will throw a
On Mon, 21 May 2001, gabi munteanu wrote:
> I have the following problem.
>
> I have a table [friends] and it looks like this:
>id serial
>name varchar(25)
>phone varchar(15)
> After I created it tehre is also a sequence that generates me the ids
> friens_id_s
I'm not sure, but...
Does it work if you say cdate > '2001-05-18' ? (Possibly ::date too)
I'd guess your date value you're trying to put there is getting treated
as an integer expression.
On Wed, 23 May 2001, Chris Ruprecht wrote:
> Hi all,
>
> although not new to databases, I'm new to the wo
On Wed, 30 May 2001, Koen Antonissen wrote:
> Now this one doesn't:
> Table "teams"
> Attribute | Type | Modifier
> ---+-+--
> id| integer | not null
On Wed, 30 May 2001, Tom Lane wrote:
> Mark <[EMAIL PROTECTED]> writes:
> > It appears that the behavior of a bpchar compare with a string literal
> > is not implicitly trimming the bpchar before the compare, which IMHO is
> > incorrect behavior. Is my opinion valid?
>
> regression=# create tab
On 30 May 2001, Mark wrote:
> On 30 May 2001 11:16:35 -0700, Stephan Szabo wrote:
> > On Wed, 30 May 2001, Tom Lane wrote:
> >
> > > Mark <[EMAIL PROTECTED]> writes:
> > > > It appears that the behavior of a bpchar compare with a string literal
>
It really depends on the number of rows. If the number of
rows in the tables are small or the number of rows returned is
a reasonable percentage, the index scan is currently more expensive.
What does (for example) select count(*) from classes; give?
On Thu, 31 May 2001, Koen Antonissen wrote:
There is currently no ability to span databases in a single
query.
On Wed, 30 May 2001, Muhammed Yazici wrote:
> hi,
> i'am really new to postgresql and i try it with php ..
>
> Now i have following question :
>
> is it possible to make one query on two databases. I have a database calles
> d
On Wed, 30 May 2001, Nicolas wrote:
> Hi,
>
> I'm trying to retreive DISTINCT Values from a two colomn table called
> "Books". The colomns are named "Author" and "URL".
> DISTINCT values should be retieved from the "Author" Colomn , and then I
> should be able to retrieve the corresponding URL.
On Sat, 2 Jun 2001, Mario Bittencourt wrote:
> Hi,
>
> I've decided to switch from mysql to postgresql as my database server. I
> do mostly web programming (who doesnt these days?) with more than a 100
> sites developed (using mysql).
>
> I've read about postgresql and it's fe
On Wed, 6 Jun 2001, Markus Wagner wrote:
> The problem is, how to get the names of all tables and their attributes? I
> looked into the system tables ("pg_*"), but there were many tables and
> many attributes for *my* tables, and I did not figure out how to
> distinguish my tables and my attr
On Wed, 6 Jun 2001, Linh Luong wrote:
> I recently wipe my database away. And some of the tables have a UPDATE
> CASCADE on it to another table.
> When I reload the data from my backup that I did with pg_dumpall. My
> code started to give me an error because I tried to modify a table that
> w
On Wed, 6 Jun 2001, Mark Stosberg wrote:
>
> Hello,
>
> I'm a long time Postgres user who uses MySQL when I have to. I recently
> ran into an issue with MySQL where this construct didn't do what I expect:
>
> WHERE date_column = NULL
>
> I expected it to work like "date_column IS NULL" like i
You probably need to make sure to double quote the tgname in your drops.
On Thu, 7 Jun 2001, Linh Luong wrote:
> Hi,
>
> Is there to drop a constraint when you add it separately with an alter
> statement.
>
> alter table failuretypecategory1 add constraint fk_failuretypecategory1
> FOREIGN K
On Thu, 7 Jun 2001, Gerald Gutierrez wrote:
>
> I'm using 7.1.1 right now, and have the following table:
>
> id | s
> +---
>1 | alpha
>2 | beta
>3 | gamma
>4 | delta
> (4 rows)
>
> I'd like to switch the id of "beta" to 3 and the id of "gamma" to 2 ("flip"
> them).
Maybe this?
update table set col = col || '$val';
On Thu, 7 Jun 2001, Laurent Patureau wrote:
> Hy,
>
> I try to update a table:col with take the valueof this col and concatenate
> it with $val.
> I don't want to select all value of table:col and addition $val at each one
>
> I try :
>
> UP
On Fri, 8 Jun 2001, Subra Radhakrishnan wrote:
> Hi All,
>
> The index created by me is not being used while doing
> select. I found that out by using the EXPLAIN. For
> example:
>
> Table department has
>
> dept_num
> dept_desc
>
>
> Table 'employee' looks like this:
>
On 10 Jun 2001, Christophe Labouisse wrote:
> I wanted to build the following schema :
>
> - one "generic" document table with a column doc_id ;
> - a couple of "specific" document tables inheriting from doc ;
> - a table refering a document by it's id with and integrity constraint
> on it.
>
>
On Sun, 10 Jun 2001, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > One problem is that for update isn't supported across inheritance trees
> > AFAICS and the triggers use for update for the appropriate locking.
>
> It's possible (maybe
On Sat, 9 Jun 2001, Postgresql wrote:
> Hi,
>
> I have a table of categories (it's pseudo-sql...) :
>
> CATEGORIES
> (
> id_category PRIMARY KEY,
> id_category_parent (FOREIGN KEY ? CONSTRAINT ??) ,
> cat_text
> )
>
> There is recursivity : id_category_parent is -1 (= no parent cat
Yes, you cannot currently do this. Check past discussions on mailing
lists for more details. Inheritance and constraints is pretty dodgy
right now (for instance, Reservationfile.datafileNr is not unique).
On Tue, 5 Jun 2001, Mikael Kjellström wrote:
> I've declared a foreign key in table File
What version are you using and what error are you getting? Your example
works for me on 7.2devel once i made a dpts table with an id_dpt column.
The function code is not checked for plpgsql until its first
use, so if there was a syntax error, it wouldn't be seen until you
tried to use it.
On S
I think that using INNER JOIN between nl and n (on n.nid=nl.nid) or
joining those tables in a subquery might work.
On Mon, 18 Jun 2001, The Hermit Hacker wrote:
> Is there some way to write the above so that it evaluates:
>
> WHERE (n.type = 'A' OR n.type = 'N' OR n.type = 'H' OR n.ty
On Mon, 18 Jun 2001, Stef Telford wrote:
>
> I seem to have hit what i -think- may be a bug (but i am not crying
> wolf jst yet ;).
>
> I have three tables. action, client and order_details. action has a primary
> key 'order', client references action (along with adding the cli
On Wed, 20 Jun 2001, Bruno Boettcher wrote:
> i have a lots of threads that work on a table, making insertions,
> updates removes.
>
> now i certain cases its important to keep data integrity, so i looked
> into locks
What kind of data integrity are you trying to implement?
> all i fo
On Tue, 19 Jun 2001, Mikael Kjellström wrote:
>
> Maybe I am doing this the wrong way, but how do I check if a table exist?
>
> This works from psql:
>
> select
> relname
> from
> pg_class
> where
> relname = 'tablename'
>
>
> But if I try to do the same from a PL/PGSQL stored procedu
On Thu, 21 Jun 2001, [iso-8859-1] Martín Marqués wrote:
> I'm trying somethings here and I get strange errors:
>
> select *,(
> (CASE WHEN titulo LIKE '%Matematica%' THEN 1 ELSE 0 END) +
> (CASE WHEN descripcion LIKE '%Matematica%' THEN 1 ELSE 0 END) +
> (CASE WHEN incumbenci
How about creating a temporary table with the data? That'll be persistant
for the session.
On Fri, 22 Jun 2001, Markus Wagner wrote:
> Hi,
>
> can I access information on the current connection from within a trigger
> function?
> I need to identify different server connections somehow. Someth
On 25 Jun 2001, Itai Zukerman wrote:
> According to the documentation for CREATE TABLE:
>
> In addition, the referenced columns are supposed to be the columns
> of a UNIQUE constraint in the referenced table, however Postgres
> does not enforce this.
>
> Well, it looks like PostgreSQL *do
On Mon, 9 Jul 2001, Bhuvan A wrote:
> can any one say how can we change the table definition once
> created?
>
> say, we have a table with 1000s of records. if one needs
> to change the data type of particular column or if he
> needs to change the width of a column what should be
> done?
>
> A
On Thu, 12 Jul 2001, James Orr wrote:
> Hi,
>
> Is there anyway that you can reference a column in a view for
> referential integrity? The problem is with the unique thing,
> obviously I can't create a unique index on a view. Here is what I
> have:
Not right now, and actually you still wouldn
On Fri, 13 Jul 2001, Josh Berkus wrote:
> Folks,
>
> Pardon me for asking this again, but I received *no* responses last
> week.
>
> Question: Is there any function or method which will allow me, in SQL
> or PL/pgSQL, to validate dates without raising an error for invalid
> dates?
Not as far
Something like?
select employee.* from employee where
not exists (select * from salesorder where
salesorder.emp_id=employee.emp_id);
On Fri, 13 Jul 2001 [EMAIL PROTECTED] wrote:
>
>
> Hi,
>
> Consider the below...
>
> table 'employee' with unique 'emp_id',
> table 'salesorder' wi
On Fri, 13 Jul 2001, Alexey V. Neyman wrote:
> Hello there!
>
> [Please Cc: me in followups.]
>
> I tried the following:
>
> CREATE TABLE a (
> int4 id
> );
> CREATE TABLE b (
> int4 id
> CHECK (id = ANY(SELECT a.id FROM a))
> );
>
> Tables are created ok, checking with '\d table' confi
On Wed, 11 Jul 2001, Phuong Ma wrote:
> I'm trying to define a trigger that copies the row to be deleted into
> another table (which is the inventory_audit table) before it does the
> delete from the original table (which is the inventory table).
>
> CREATE FUNCTION inv_audit_mod () RETURNS OPA
Have you tried "where recno IS NULL"?
- Original Message -
From: "Chris Ruprecht" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 15, 2001 7:05 PM
Subject: [SQL] Unknown values in int8 fields?
> Hi Chris,
>
> When I load records with copy from ... And one of the fields (
What version are you using? (dbPG95GetIndex?)
On Thu, 19 Jul 2001, David M. Richter wrote:
> Hallo !
>
> I want to tune a database. There a many redundant datas in the database
> , because of all the relations were consider as n:m relations. But the
> most of them are 1:n Relations. So my appr
On 22 Jul 2001, Domingo Alvarez Duarte wrote:
> I'm trying create a unique index using more than one field and
> applying a function in one field to achieve case insensitive
> uniqueness but postgresql doesn't accept.
>
> create table a(
>
> id int primary key,
> id2 int not null,
> na
On Mon, 23 Jul 2001, dado feigenblatt wrote:
> > system tables all ~ '^pg', which is probably a better check than
> > user=postgresql.
>
> You never know when someone will name their tables starting with "pg".
> Well, you never know when someone will create their tables as user postgres
> eithe
On Tue, 24 Jul 2001, [ISO-8859-1] Mário Sérgio G Antunes wrote:
> I use PostgreSQL 7.1.2.4 in two servers under RedHat 7.0.
> Our database has a table like that:
> create table tb_client
> (
>id_client varchar(32),
>client_name varchar(40),
>bdate date,
> ...
> );
>
> create index
On Wed, 25 Jul 2001, Renato De Giovanni wrote:
> I'm working on a project based on an unusual data model. Some entities
> aren't represented by separate tables, they're grouped in the same table
> just like the following simplified model shows:
>
> CREATE TABLE class (
>id CHAR(8)
On Wed, 18 Jul 2001, Raymond Chui wrote:
>
>
> The Subject says its all.
>
> To speed up a bulk of INSERTs, I need to turn-off the auto commit 1st.
> Then
> at the end of INSERTs, issue COMMIT;
> What is the syntax to turn off the auto commit? Thank you!
Put them in an explicit transaction
On Fri, 27 Jul 2001, John Oakes wrote:
> Can anyone tell me why this always return 1? Thanks!
>
> CREATE FUNCTION passrate(date, date, text) RETURNS float AS '
>
> DECLARE
> begindate ALIAS FOR $1;
> enddate ALIAS FOR $2;
> passfail ALIAS FOR $3;
> ret float;
> countp float;
> counttota
On Sat, 28 Jul 2001, Roy Souther wrote:
> In PG the _ is a wildcard that means any singal char. I need to do a search
> for the actual _ char and not get back thousands of wrong matches. Is there
> and escape char that I could use? This needs to work with PG 7.0.3 & 7.1.2.
\\_ should work for
On Sun, 5 Aug 2001, Allan Engelhardt wrote:
> test=# create table baz(bar integer, constraint fk_bar foreign key (bar)
>references foo(id));
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
> CREATE
>
> but this is not exactly what I want: I need to e
On Tue, 7 Aug 2001, Sundararajan wrote:
> I am developing a db application in postgresql and i need to write a delete
> trigger on one of the tables.
>
> I need a delete trigger on the table 1, so that if I delete a row from table
> 1 , the corresponding rows from table 2 should also be deleted.
On Tue, 7 Aug 2001, Josh Berkus wrote:
> Denis,
>
> > I have a case where I wanted to do circular REFERENCES, is this
> > impossible ?
>
> It can be done. It's just a bad idea.
>
> > We deliver to the *shops* of our *customers*.
> > We have therefore two tables :
> > - customers (enterpris
On Wed, 8 Aug 2001, Cedar Cox wrote:
>
> Two questions (maybe they are silly..)
>
> 1. Can a column reference more than one table? (This assumes you use a
> single sequence to generate the IDs for both "tbla" and "tblb". I guess
> you would also have the problem of enforcing a unique index.
On Mon, 20 Aug 2001, Jean-Christophe Boggio wrote:
> Hello, can someone explain to me why this query is so slow :
>
> select distinct t.idmembre,p.datecrea
> from tmp_stat t,prefs p
> where p.idmembre=t.idmembre
> limit 5;
>
> And this one is so fast :
>
> select t.idmembre,p.datecrea
> fr
On Mon, 20 Aug 2001, Joseph Shraibman wrote:
> I want to select a boolean if there exists a row in another table that matches this
>one.
> So I did select ..., (select count(*) from table2 where ...) > 0 ...
> but that count(*) was taking forever. I know there is a better way to do it, but
>
hat the inner query (on the exists) or the entire explain?
I guess it'd be useful to see the whole query and explain and maybe
schema.
> Stephan Szabo wrote:
> > On Mon, 20 Aug 2001, Joseph Shraibman wrote:
> >
> >
> >>I want to select a boolean if there exists
> Stephan Szabo wrote:
> > On Tue, 21 Aug 2001, Joseph Shraibman wrote:
> >
> >
> >>Thank you, I was missing the parens.
> >>
> >>If I do an explain I see:
> >>
> >>-> Index Scan using m_u_and_p_key on m (cost=0.00..303
On Mon, 27 Aug 2001, Joseph Shraibman wrote:
> OK my query was like:
> select u.field1, ... , d.field1, ... (select ml.field from ml WHERE ml.key = u.key
>order
> by ml.keyfield desc limit 1) as lastml FROM utable u, dtable d, WHERE u.key = d.key
>and
> ... and (sublectect again) = 2;
>
> OK
On Mon, 27 Aug 2001, Joseph Shraibman wrote:
> Stephan Szabo wrote:
> > I think you'd want to move the entire query excepting the lastml where
> > condition into a single subselect in the outer from with the lastml
> > condition on the outside:
> > select * from
On Wed, 22 Aug 2001, Jayson Callaway wrote:
> In postgres 7.0.x I had some working code that lookes something like:
>
> CREATE TABLE category
> (
> uid int4 PRIMARY KEY,
> description text NOT NULL,
> parent int4 NULL REFERENCES category(uid)
> )
>
> After upgrading to postgres 7.1.
On 28 Aug 2001, satish rao wrote:
> Entered below is the SQL create table syntax:
>
> CREATE TABLE lists (
> [listid] [int] IDENTITY (1, 1) NOT NULL ,
> [listname] [varchar] (200) NULL ,
> [listcreator] [varchar] (200) NULL ,
> [listdesc] [text] NULL)
create table lists
On Thu, 23 Aug 2001, Jaydip wrote:
> a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a
>Date/DateTime variable.
>
> For Example : i> In Oracle to_char(dt,'') - for extracting the year value
>from a date variable dt
> ii> In SqlServer datepart(hh,
On Thu, 30 Aug 2001, Marc [iso-8859-1] André Paquin wrote:
> Hello,
>
> Here is 2 tables:
>
> airport
> -
> airport_id
> name
> code
> city_id
>
> destination
> ---
> destination_id
> dest_name
> ...
> airport_dep_id // using airport.airport_id (departure)
> airport_arr_id //
On Mon, 3 Sep 2001, Joseph Syjuco wrote:
> im new in postgresql (actually came from SQL Server) and i was trying a
> script like this
>
> insert into table1(field1,field2) values (select field1, field2 from table
> 2);
>
> i dont know if this is possible (inserting a set of entries via results
On Fri, 7 Sep 2001, Carolyn Lu Wong wrote:
> anyone knows if duplicated oid is possible??
>
> is there a possible way to remove the duplicate row, now that i don't
> know which ID to use? any suggestions?
Hmm, that's wierd.
AFAIK that should only occur in cases like copy with oids and oid wrap
On Sun, 9 Sep 2001, Josh Berkus wrote:
> > i have several friends that are DBA's by profession and work on
> > oracle
> > and/or ms sql server. they have all told me that while there are some
> > general rules to follow that each database is different.
>
> Yup. They told ya right.
>
> > for e
On Sun, 9 Sep 2001, Josh Berkus wrote:
> Ah. Well, you answer optimization questions so often that I'd assumed
> that you had a hand in it. Is the optimizer all Tom and Bruce's work?
Mostly Tom I believe.
> > At least on 7.1 and below, if you have a dummy value that is very
> > common
> > bu
On Mon, 10 Sep 2001, Jeff Barrett wrote:
> I have an update statement (no transaction controls surround these
> statements):
>
> update sessions set sessdate = 0 where sessid in ( long list of ids);
>
> How long will the rows being updated be locked for this statement? Will all
> be locked unti
On Mon, 10 Sep 2001, Jeff Barrett wrote:
> How can I call a shell script from within a pl/pgsql function that is called
> as from a trigger. I do not want to interact with the script I just want it
> to run. I do want the trigger to wait for the script it called to complete
> before returning a v
On Mon, 10 Sep 2001, Alex Pilosov wrote:
> On Mon, 10 Sep 2001, Stephan Szabo wrote:
>
> > On Mon, 10 Sep 2001, Jeff Barrett wrote:
> >
> > > How can I call a shell script from within a pl/pgsql function that is called
> > > as from a trigger. I do not wan
(hopefully this doesn't double post... stupid mail system)
On Tue, 11 Sep 2001, Christof Glaser wrote:
> On Tuesday, 11. September 2001 10:04, Kevin Way wrote:
> > I'm having a little trouble with some inherited tables and a foreign
> > key. Here's a simplified case, to show the trouble.
> >
>
On Tue, 11 Sep 2001 [EMAIL PROTECTED] wrote:
> hello all
> I tried recently (pgsql 7.1.2) to establish the oid of one table as foreign key
> in another.
> To no avail : there was no uniqueness constraint on that column
> Naturally, it seems impossible to add a uniqueness constraint to such a sys
On Fri, 14 Sep 2001, Kevin Way wrote:
> I'm having trouble creating a trigger. First i'm creating a function,
> add_to_search in PL/pgSQL.
>
> \df verifies the existance of this function:
> smallint | add_to_search | text, text, text, integer
>
> but when I call:
>
> C
On Mon, 17 Sep 2001, Tod McQuillin wrote:
> On Sun, 16 Sep 2001, Kovacs Baldvin wrote:
>
> > select NULL = NULL;
> >
> > The answer is: true!!!
>
> This has got to be a bug. NULL is not equal to anything (nor is it
> unequal to anything).
This is because of a hack due to a broken MS client th
On Thu, 20 Sep 2001, David M. Richter wrote:
> Hi!
>
> Thanks, to You!
>
> Yes I have to do . Now I solved that problem with rename the original
> table study to _study
> then create the new right structured table study , Insert into study
> (chilioid,...,...) SELECT * FROM _study;
> Ok not el
On Thu, 20 Sep 2001, Patrik Kudo wrote:
> On Thu, 20 Sep 2001, Haller Christoph wrote:
>
> > Try
> > create NEWtable (userid text, val integer, ts timestamp);
> > insert into NEWtable
> > select userid, val, max(ts) from table group by userid, val;
>
> That won't work. That will give me multipl
On 17 Sep 2001, Pasha wrote:
> Hello to Every1.
> I'm trying to find if anyone knows how to find out when the stored
> procedure was used last time (not created).
I don't think there's any real way to do that apart from having your
procedure keep track of that itself.
-
On Thu, 18 Oct 2001, Oleg Lebedev wrote:
> Hi,
> I am trying to count the number or rows in a table with similar field
> values. I want to do it in one table scan.
> In other words, say I want to count the number of rows in Person table,
> having age equal to 40, and the number of rows with stat
Well, the easiest general way is probably a plperl function, but I think
the following may work for your specific case:
update mytable set
property_id=substr(property_id, 1, position('-' in property_id)-1)
where position('-' in property_id)!=0;
On Thu, 18 Oct 2001, Steve Frampton wrote:
>
On Sat, 20 Oct 2001, Joel Burton wrote:
> On Sat, 20 Oct 2001, Aasmund Midttun Godal wrote:
>
> > Can a rule see the where statement in a query which it has been
> > triggered by? or is it simply ignored?? what happens?
> >
>
> Looking over your question, I wanted to clarify the problem a bit,
> Don't think so. I think the rule doesn't make any sense.
> NEW.id and OLD.id are probably dbl values, so saying OLD.id=id (where id
> is raw.id since that's the update table) isn't correct. It probably
> should be OLD.id=id*2 (which seems to work for me, btw) It's editing
> a different row t
On Wed, 24 Oct 2001, Joseph Shraibman wrote:
> Can I just set tgenabled to false?
I'm not sure if it works now (in 7.2 devel) but I'm pretty
sure that doesn't work in past versions unfortunately.
---(end of broadcast)---
TIP 5: Have you checked
On Mon, 22 Oct 2001, Esteban Gutierrez Abarzua wrote:
>
> hi.
>
> I wanna to make a query on this table(postgres system catalog):
>
> Attribute | Type| Modifier
> --+---+--
> relname | name |
> reltype | oid |
> relowner | in
On Wed, 31 Oct 2001, [ISO-8859-1] Stéphane Chomat wrote:
> I create two table repertory and person. And i have an error :
>
> > CREATE TABLE repertory (name_rep name, attribut text[], PRIMARY
> KEY(name_rep));
> > CREATE TABLE person (nam_rep repertory, name_pers text, url text, eadr
> text, te
101 - 200 of 732 matches
Mail list logo