re is still a read from the
heap to check if it's valid). The optimizer seems to think
333 records match num>2. Is this reasonable?
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 15 Aug 2000, Martin Dolog wrote:
> Hi *,
>
> I have pgsql7.0.2 on Linux2.2.16 and table with following indices
Sort of. You can give the field a default value of
nextval() which means that if you do not specify
the column in an insert, it automatically gets the default
value which should be the next value in the sequence.
Note, that not putting the column is different from inserting a
NULL into the field
d finally, the obligatory upgrade message... Upgrade
to 7.0.2 if you can, it's nice and stays crunchy in
milk. :)
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 15 Aug 2000, Dirk Elmendorf wrote:
> RedHat 6.2 /Postgres 6.53
> I'm still very new at PL/PGSQL but I have looked thru all the
&g
On Tue, 15 Aug 2000, Adam Lang wrote:
> Gotcha. Now, if I do an insert and just don't specify that field at all, it
> will, use the default value, correct? As long as I don't "touch" the field
> with anything it uses the default.
Right, as long as you don't specify the field in the column lis
On Thu, 17 Aug 2000, Joerg Hessdoerfer wrote:
> Hi!
>
> I have an application, where I have to insert data into a table at several
> rows per second, 24 hours a day, 365 days a year.
>
> After some period (a week, maybe a month) the data will be reducted to some
> degree and deleted from the t
On Fri, 18 Aug 2000, Joerg Hessdoerfer wrote:
> Good idea - I immediately tested it - rules rule! That seems to work perfectly,
> and the client doesn't even see it happen (except for 'selects', one would
> have to setup
> a rule to return something meaningful then...).
>
> I did:
> Two tables,
On Fri, 18 Aug 2000, Poul L. Christiansen wrote:
> Hi
>
> I'm trying to make a field in my table (datechanged) to automatically be
> updated with the value 'now()' when an update on the table occurs.
>
> plc=# create rule datechanged_radius AS ON update to radius do update
> radius set datecha
On Thu, 17 Aug 2000, Andreas Tille wrote:
> On Wed, 16 Aug 2000, Stephan Szabo wrote on [EMAIL PROTECTED]:
> (sorry for the crossposting, just to tell the list that I now switched to
> the right one hopefully)
>
> > I think the thing is that most people don't ha
(It won't really be forever, just probably
a really long time)
You can usually get around it by rewriting the
query to use EXISTS rather than IN.
Stephan Szabo
[EMAIL PROTECTED]
On Sun, 20 Aug 2000, Franz J Fortuny wrote:
> At our company we are presently using a commercial
> da
On Mon, 21 Aug 2000, Andreas Tille wrote:
> On Thu, 17 Aug 2000, Stephan Szabo wrote:
>
> > What you may need to do is declare a variable of type record
> > and do SELECT INTO * From ... rather than just
> > the SELECT.
> Thanks, that worked.
>
> > Yea
Wierd, I've not seen that behavior really, although I've never
done time sensitive stuff. It might be the time before the
shared cache updates? Not sure really. If you do the rule
inline with your inserts (rather than a second transaction)
does it still wait?
Stephan Szabo
[EMAIL
into kp values ('kp.dhs,d');
select * from kp where name like 'kp.dhs.%';
name
--
kp.dhs.a
kp.dhs.
(2 rows)
select * from kp where name like 'kp.dhs%';
name
------
kp.dhs.a
kp.dhs.
kp.dhs,d
(3 rows)
Stephan Szabo
[EMAIL PROTECTED]
On T
=employee.salary);
end;
Stephan Szabo
[EMAIL PROTECTED]
On Sun, 27 Aug 2000, Paulo Roberto Siqueira wrote:
> Hi folks,
>
> I have this table
>
> CREATE TABLE EMPLOYEE (ID_EMP INT4 PRIMARY KEY, NAME VARCHAR(35), SALARY
> NUMERIC(5,2));
>
> I want to s
On Sun, 27 Aug 2000, Paulo Roberto Siqueira wrote:
> Hi folks,
>
> I have this table
>
> CREATE TABLE EMPLOYEE (ID_EMP INT4 PRIMARY KEY, NAME VARCHAR(35), SALARY
> NUMERIC(5,2));
>
> I want to select only the employees' names who have the 5 highest salaries.
Well, that depe
On Sun, 27 Aug 2000, John McKown wrote:
> On Sun, 27 Aug 2000, Stephan Szabo wrote:
>
> >
> > Of course immediately after sending the last message and logging off my
> > ISP I figured out the simpler way for the third one:
> >
> > begin;
> > select sa
Without seeing the schema or anything, a similar
query to your first one appears to run on my
Postgres 7.0.2 setup. It's probably worth upgrading.
On Wed, 30 Aug 2000, J. Fernando Moyano wrote:
> I try this on my system: (Postgres 6.5.2, Linux)
>
> "select n_lote from pedidos except select rp
We don't currently support the SQL syntax for adding
a PK to a table. However, if you have the columns
as NOT NULL already, adding a unique index to the
columns in question has the same general effect.
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 29 Aug 2000, Webb Sprague wrote:
> Aprop
On Tue, 29 Aug 2000, Jie Liang wrote:
> Hi, there,
>
> 1. use copy ... from '.';
> 2. write a PL/pgSQL function and pass multiple records as an array.
>
> However, if your table have a foreign key constraint, it cannot be speed
> up,
>
> I have same question as you, my table invloving 9-1
On Wed, 30 Aug 2000, D'Arcy J.M. Cain wrote:
> Thus spake Stephan Szabo
> > We don't currently support the SQL syntax for adding
> > a PK to a table. However, if you have the columns
> > as NOT NULL already, adding a unique index to the
> > columns in
On Wed, 30 Aug 2000, Jie Liang wrote:
> Hi,
>
> I knew that if no constarint, it populate very quick, my question is:
> when two tables have been
> reloaded, then I want to add a foreign key constraint to it, say:
> tableA has primary key column (id)
> tableB has a column (id) references it, so
I'd suggest checking the array utilities in contrib. I believe
it has functions/operators for element in set.
Stephan Szabo
[EMAIL PROTECTED]
On Fri, 1 Sep 2000, Jon Lapham wrote:
> Stupid FAQ probably:
>
> Is it possible to query an array for an item WITHOUT KNOWING where
I think a references constraint on ID
referencing _ID with ON DELETE CASCADE
should do what you want.
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 6 Sep 2000, Craig May wrote:
> Hi,
>
> I have a tables having this structure:
>
> ID (int) | _ID (int) | Name (String)
>
>
&
you usually want to be searching where the
weight was given if you had the years_experience or greater?
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 12 Sep 2000, Mitch Vincent wrote:
> I emailed the list a while back about doing some weighted searching, asking
> if anyone had implemented any ki
hat does the inserts for you.
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 13 Sep 2000, Jerome Raupach wrote:
> I want to execute this query on some table2 in the same time :
>
> INSERT INTO table2_n(f1, f2, f3)
> SELECT D
If you were looking in just -sql, you'll have missed
out on the later information which was on -hackers...
I believe Tom Lane just committed changes recently
to put in support for them with a few caveats,
so unless something comes up, you should see some
support in 7.1.
On Thu, 14 Sep 2000, M
On Wed, 20 Sep 2000, Josh Berkus wrote:
> Timothy, Tom:
>
> > >1. a. Create new record with new key value in hosts table with the
> > >desired value
> > > b. Update the routes record to reference the new value
> > > c. Delete the old record in the hosts table
> > >
> >
> > Yes, that's what
On Wed, 20 Sep 2000, User Lenzi wrote:
> if I start a query:
>
> explain select * from teste where login = 'xxx'
> results:
> Index Scan using teste1 on teste (cost=0.00..97.88 rows=25 )
>
>
> however a query:
> explain select * from teste where login > 'AAA'
> results:
> Seq Scan on teste .
On Thu, 21 Sep 2000, Indraneel Majumdar wrote:
> select col1 from table while array_col[1][1:4]='2';
>
> how do I do this sort of thing? There seems to be no docs ;-(
>
> my array is {{"1","2","4","2"},{"3","2","5"},{"6","3","7","9"}}
You'll want to check out the array utilities in the contri
On Thu, 21 Sep 2000, Sergio de Almeida Lenzi wrote:
> > > On a machine running version 6.5 both queries results index scan.
> > >
> > > this results that the version 6.5 is faster than version 7.0.2 on this
> > > kind of
> > > query.
> > >
> > >
> > > Any explanation???
> >
> > Have you done
On Thu, 21 Sep 2000, Brian C. Doyle wrote:
> Hello all,
>
> How would I prevent a user from submitting information to a table once they
> have already done so for that day. I would need them to be able
> information on future dates as well as have information in the table from
> past dates
On Fri, 22 Sep 2000, Tom Lane wrote:
> indexscans; the current code may have overcorrected a shade, but I think
> it's closer to reality than 6.5 was.
>
> As Hiroshi already commented, the difference in results suggests that
> the desired data is very nonuniformly scattered in the table. 7.0
>
I'd assume this would work:
select * from table where booleanfield is null;
Stephan Szabo
[EMAIL PROTECTED]
On Sat, 23 Sep 2000, Jeff MacDonald wrote:
> how would i select all rows where a boolean value is neither
> t nor f.. ?
>
> ie if someone inserted without setting the boolean tag.
On Sun, 24 Sep 2000, Indraneel Majumdar wrote:
> Does any one know how I may select between two databases running on same
> machine or on different machines eg.
>
> select colA1 from tableA1 where colA2 in (select colB1 from tableB1);
>
> here tableA1 and tableB1 are in different databases. The
On Tue, 19 Sep 2000, Timothy Covell wrote:
> Schema:
> hosts table with fqhn column
> routes table with fqhn foreign key hosts(fqhn)
>
> Problem:
>
> 1. When I try to change fqhn in hosts, it complains that
> I have now violated entry in "routes" table.
>
> 2. When I try to update "rou
On Mon, 2 Oct 2000, Rini Dutta wrote:
> When two tables (table2 and table3) have foreign keys
> referring to a common table(table1), I am unable to
> have 2 concurrent transactions - one performing insert
> on table1 and the other on table2, when the records
> being inserted have the same foreign
the arguments in a bytea separated by \000
The arguments are as follows:
constraint name
fk table
pk table
match type
fk col1
pk col1
...
fk coln
pk coln
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 11 Oct 2000, Colleen Williams wrote:
> Hi,
>
> I would like to write some SQL to e
aint later.
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 11 Oct 2000, Franz J Fortuny wrote:
> This table:
>
> create table things
> (
> idthing integer not null,
> isthis boolean not null
> primary key(idthing,isthis)
>
>
> )
>
> would be refer
On Mon, 23 Oct 2000 [EMAIL PROTECTED] wrote:
> Hello,
> I have following problem with PostgreSQL 6.5.3, I haven't possiblity
> to check it on 7.0 and I want to know is it possible to run such query:
>
> SELECTk.pic, id_g, id_k, count(*)
> FROM kart k, pictues p
> WHERE k.pic = p.pic
> G
On Wed, 25 Oct 2000, Sivagami . wrote:
> Hi all,
>
> I am a newbie to Postgresql, but I am familiar with SQL. I am trying to add a
>constraint to my table using the ALTER TABLE command. The command goes like this :
>
> ALTER TABLE USER_SIGNUP ADD CONSTRAINT
> P_USER_SIGNUP_USER_ID PRIMARY KEY
What is the explain output for the queries you've tried?
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 25 Oct 2000, Josh Berkus wrote:
>
> Folks:
>
> Here's the problem, in abstract: I need to select every record in table
> A that does not have a link in table B
> i am a beginner at SQL and PL/pgsql and thus have some surely
> already known problems...
>
> i have set up some tables, and wanted to play around with inbuild
> functions, and set up the following function:
>
> CREATE FUNCTION balance (int4) RETURNS int4 AS '
> DECLARE
>compt
There are still some contexts in which subqueries in expressions are
wierd. The example below appears to work in current sources however.
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 31 Oct 2000, George Henry C. Daswani wrote:
> Hello,
>
> Was wondering if such a call is unsupported,
On Fri, 10 Nov 2000, Najm Hashmi wrote:
> I am facing a dilemma at my work, I am using postgres first time. For
> some reason, my co-workers think that in Postgres joins i.e.
> simple joins of two or three tables are so bad that their cost is
> exponential. They believe that postgres simply ta
On Mon, 13 Nov 2000, Cristi Petrescu-Prahova wrote:
> Hello,
>
> I would like to insert a bunch of rows in a table in a transaction. Some of
> the insertions will fail due to constraints violation. When this happens,
> Postgres automatically ends the transaction and rolls back all the previous
>
> >When you start a transaction,
> >you're telling the backend "treat all of these statements as one, big,
> >all or nothing event."
>
> This is actually contrary to the standard. Statements are atomic, and a
> failed statement should not abort the TX:
>
> The execution of all SQL-statemen
On Tue, 14 Nov 2000, Philip Warner wrote:
> >I could
> >almost see certain recoverable internal state things being worth not doing
> >a rollback for, but not constraints.
>
> Not true, eg, for FK constraints. The solution may be simple and the
> application needs the option to fix it. Also, eg,
If you look in contrib of the source, there is a set of
array operators(functions) including element in set.
That'll probably do what you want (you don't do an in
actually, it'll be like )
On Tue, 14 Nov 2000, Alvar Freude wrote:
> Roberto Mello schrieb:
> > Looks like you want someth
What is it actually giving you as an error
message in the failing case? Someone pointed
out a problem in deferred constraints recently
and I think this may be related.
Stephan Szabo
[EMAIL PROTECTED]
On Mon, 20 Nov 2000, Kyle wrote:
> Here's an interesting test of referential integri
Do you have any triggers, rules or check constraints defined on the
table? If so, you may have fallen pray to the thing that you cannot
drop and re-create a function that's used in a trigger without recreating
the trigger as well.
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 29 Nov 2000,
On Thu, 30 Nov 2000, Astrid Hexsel wrote:
> After trying for two weeks to delete more than one row at the time from a form
> - checkbox input, I was told that the only way different rows would be inputed
> or changed with the information from the form would be with the INSERT command.
>
>
> T
On Thu, 30 Nov 2000, Brian Powell wrote:
> I have around 40 tables defined, many relying on data in others so I have
> foreign key constraints. However, whenever I try to delete from any table,
> I get:
>
> ERROR: SPI_execp() failed in RI_FKey_cascade_del()
>
> What generates this? I need a
There was a bug (which should be fixed for 7.1) that got the
arguments wrong for the alter time check of the existing data.
I think I should be able to get a patch together to fix it once
I get a copy of the 7.0.3 source.
Can you send the table schema as well so I can test it out?
Stephan
On Wed, 13 Dec 2000, Al Lewis wrote:
> I am migrating to postgress from msql and am encountering numerous problems
> in the differences in NULL usage and comparison.
>
> 1. Why are 2 fields not equal if they are both NULL?
Because that's what the SQL spec says. If either value is NULL
the resu
On 14 Dec 2000, Marc Daoust wrote:
> Thank you very much Reberto,
>
> It appears that your co-workers are not inerested in potential funding.
> For the rude onesmaybe/perhaps people like myself were givin the email
> address ever think of that.
>
> A potential client that is having second t
On Tue, 19 Dec 2000 [EMAIL PROTECTED] wrote:
> Hello there
>
> I have a question regarding a SQL statement.
>
> When I execute (and that's what I need)
>
> SELECT Zylinder.Z_durch_soll, Zylinder.Z_id, Zylinder.Z_durch_ist,
> ((Zylinder.Z_durch_soll+0.12) - Zylinder.Z_durch_ist) AS durchmesserd
On Tue, 19 Dec 2000, Jeff MacDonald wrote:
> hi folks..
>
> i want to do this to a datetime field..
>
> select foo from table where substr(datefoo,1,11) = '2000-12-14';
>
> it returns no results yet..
>
> select substr(datefoo,1,11) does return some values that say
> 2000-12-14
>
> any clues
great deals of pain and suffering,
it might be possible to change the 10 to 20 by directly editing
the pg_relcheck row. I have not attempted to do this though,
so I'm not sure it would work.]
Stephan Szabo
[EMAIL PROTECTED]
On Wed, 20 Dec 2000, hubert depesz lubaczewski wrote:
>
I believe (although I haven't tried it) that pltcl will allow
you to do things such as this.
On Thu, 21 Dec 2000, Volker Paul wrote:
> Hi,
>
> > I don't think you can use DDL(data definition language) in PL/SQL.
> > create table is not DML(data munipulation language) instead
> > it's a DDL.
>
> I'm wondering how people creates guaranteed sequential numbers - in my case
> for invoice numbers.
>
> - Sequences are not rollback'able.
> - It seems overkill to have a table just for this.
> - What else?
You'll probably need a table (although you may be able to get away with
only one for a
What does explain show for your query?
On Sat, 23 Dec 2000, Joe Conway wrote:
> Hello,
>
> I'm working on an application where I need to design for one table to grow
> to an extremely large size. I'm already planning to partition the data into
> multiple tables, and even possibly multiple serv
It should work if you remove all three triggers for the constraint
using drop trigger, don't delete rows from pg_trigger unless you go
through and manually change the row in pg_class for the relation
the trigger is for.
On Mon, 1 Jan 2001, Michael Davis wrote:
> Does anyone know how to complete
On Fri, 5 Jan 2001, Marc Cromme wrote:
> I have some problems on making the right joins on system tables to extract
> the
> structure of some user defined tables/databases. I use PostgreSQL 7.0.2 on
> an
> RedHat 7.0 box.
>
> PROBLEM 1: I tried to make a Foreign key constraint from the primar
On Thu, 11 Jan 2001, Justin Clift wrote:
> I haven't seen a mention of a maximum number of constraints of similar
> applying to a table. If so, then could someone please point me to it...
>
> The reason I mention this is because I've found what seems to be causing
> this problem I'm experiencin
As someone else said a serial is probably easier, but
a trigger is probably a better bet than a rule for this purpose.
Using a plpgsql before insert trigger will do it.
On Wed, 10 Jan 2001, Andrew Higgs wrote:
> Hi all,
>
> I have looked at some previous posting and thought that I had found
> select user_name, date_part( 'epoch' , timestamp 'acct_timestamp') from
> tbacct limit 2;
>
> it said ERROR: Bad timestamp external representation 'acct_timestamp'
> how should i represent date_part( 'epoch' , timestamp 'acct_timestamp')
> to work?
select user_name, date_part ('epoch', acct
Okay, yep, seems like a garden variety bug to me...
What's happening is that the update trigger is checking to make sure
that there are no rows referencing the one that was changed, but that's
not sufficient for the deferred no action case possibly. It's got to be
that there are no rows that no
Can you send the full schema of the tables you are using for
this?
On Tue, 16 Jan 2001, Michael Richards wrote:
> Hi.
>
> I'm having trouble with committing a transaction. Intuitively it
> should work but does not.
>
> I've got a table with 2 foreign keys, minrev and maxrev. They refer
>
What version are you using? I believe this was added in 7.0.x, but
I could be wrong about that. A query of this sort works on my
7.1beta3 system.
On 17 Jan 2001, Mikael Hedin wrote:
> I have a table with a column (int4), and I want to know how many
> different numbers there are. In an exampl
On Thu, 18 Jan 2001, Kovacs Zoltan Sandor wrote:
> I realized that an error will abort a transaction all the time.
> Unfortunately I usually send millions of rows of INSERTs in a transaction
> and if there is some error in the middle of the code I got the message
> if I try to INSERT a new row:
On Wed, 24 Jan 2001, Frank Joerdens wrote:
> I just did something which seems to work alright and which makes sense
> to me now but which I have a funny feeling about. It may be good
> standard practice (and I just don't know about it) or dangerously
> foolish or just plain silly: I created a fo
On Thu, 25 Jan 2001, David Olbersen wrote:
> Greetings,
> Is there a way to have postgresql always return a value for each row
> requested? To be more clear, if I were using a Perl SQL hybrid I would write
> something like
>
> SELECT computer_ip or 'unset' FROM computers;
>
> So that
On Fri, 26 Jan 2001, Mark A. Summers wrote:
> I am having trouble with the following query taking forever:
> -
> SELECT * FROM ret108108_00, product
> WHERE ret108108_00."isbn" = product."Item1"
>
> AND product."SuperCategory" = '1'
> AND product."PublisherCode" = 'ZON'
> ORDER BY ret10
Isn't this equivalent to?
update table1 set na1=
(select table2.na1 from table2 where
table1.no=table2.no);
Which can also be invalid if there can be
multiple rows returned by the subselect
since there'd be no way to know which
table2.na1 you'd want without more info.
On Fri, 2 Feb 2001,
Functional indexes cannot currently take constant values to the function,
so it's complaining about the constant 'month'. The current workaround is
probably to create a function that does the date_part('month', ) for
you and then use that function in the index creation.
On Sat, 3 Feb 2001, Hube
Technically you are not allowed to make an FK to non-unique
values. What you're closer to looking for is MATCH PARTIAL
which we don't support (because it's a real pain - although
with the new memory management stuff in 7.1 it may be less
of one - since the fundamental problem is storing values
f
On Wed, 7 Feb 2001, Josh Berkus wrote:
> Folks,
>
> Where do I send bug reports for 7.1 beta? I;'ve looked on the web
> site, and don't see an address or bugtraq forum.
Probably the best is the pgsql-bugs mailing list at:
[EMAIL PROTECTED]
After you load the data, you need to run vacuum analzye. That'll
get statistics on the current data in the table. Of course, I'm
not sure that'll help in this case.
On Thu, 8 Feb 2001, Brice Ruth wrote:
> Stephan,
>
> Here is what EXPLAIN shows:
>
> NOTICE: QUERY PLAN:
>
> Sort (cost=0.0
What does explain show for the query and have you run
vacuum analyze recently on the tables?
On Thu, 8 Feb 2001, Brice Ruth wrote:
> The following query:
>
> SELECT
> tblSIDEDrugLink.DrugID,
> tblSIDEDrugLink.MedCondID,
> tblMedCond.PatientName AS MedCondPatientName,
>
You can use two quote characters to get a single quote in the quoted
string, so ''month''
On Thu, 8 Feb 2001, Hubert Palme wrote:
> Stephan Szabo wrote:
> >
> > Functional indexes cannot currently take constant values to the function,
> > so it'
I was able to do a function that took two arguments and did
that under 7.1beta3 with no trouble.
What message are you getting?
On Sat, 10 Feb 2001, Najm Hashmi wrote:
> Hi,
> How can I concatnate two varialbles, seperated by a |, that are type text
> together?
> v, v1 text;
> some work
> th
Does the function have any SELECTs that aren't
SELECT INTOs?
On Tue, 20 Feb 2001, Josh Berkus wrote:
> Tom, Stephan, Jan, Etc.
>
> Can you help me with this one? I can't figure out what is meant by
> this error message:
>
> I have a long, complicated PL/pgSQL function called
> fn_modif
You have to use ALTER TABLE to add the constraint to one of the tables.
Deferred refers to the checking of the constraint itself, not really
to the check to see if the table is there.
On Wed, 21 Feb 2001, Chris Czeyka wrote:
> Hey to all,
>
> I got two tables, linked to each other. How can I t
On Thu, 22 Feb 2001, [ISO-8859-1] Bjørn T Johansen wrote:
> I am trying to do a simple update (or at least I thought it was
> simple), but I just keep getting a parse error, saying:
>
> Error executing query
>
> Update "Config" Set "Wave" = 'F:\wav\BTJ.wav',"Answer" = 20,
> "Recordwav" ='F:\wav
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 e
It returns the first five rows it finds. Running the same
query over again if there are no updates is safe, but if the
table is updated there is the possibility it would find a different
five rows. If the query would do a seq scan and you updated
a row, the rows would be in a different order in
It looks like you have some rows for pyear which do
not convert cleanly into a number like ' '. What
do you want it to do in such cases?
On Sun, 25 Feb 2001, Ken Kline wrote:
> follow up
> actually the destination column is defined
> as a numeric(4)
>
> the following are the statements
On Tue, 27 Feb 2001, Herbert Ambos wrote:
> I'm trying to create Domain Aggregate function that mimic Access' Dlookup
> function, but without any luck, after digging (i think) all the docs
> don't have the solution yet.
>
> Syntax:
>
> DLookup ('field', 'table|view', ['condition'])
>
>
On Thu, 1 Mar 2001, Frank Joerdens wrote:
> When doing a subselect with NOT IN, as in
>
> SELECT name
> FROM customer
> WHERE customer_id NOT IN (
> SELECT customer_id
> FROM salesorder
> );
>
> (from Bruce Momjian's book)
>
> I get no rows if the result column returned by the subselect
> con
If you're only doing a simple check for reference, why not use
foreign keys?
In general however, you probably want to use plpgsql to define the
trigger. And trigger functions don't take parameters in the normal
sense, the function should be created taking no args and returning
opaque; the para
On Mon, 5 Mar 2001, Bruce Momjian wrote:
> > Jelle Ouwerkerk <[EMAIL PROTECTED]> writes:
> > > Also, is there a way to randomize the order of a result set?
> >
> > There's always
> > SELECT * FROM foo ORDER BY random();
> >
>
> How does that work?
>
> test=> select random();
>
On Fri, 9 Mar 2001, Josh Berkus wrote:
> Robert,
>
> > I suspect that the INSERT INTO SELECT in this case will take longer than a
> > CREATE TABLE AS because of the referential integrity check needed on every
> > INSERT (per Tom Lane).
>
> In that case, what about:
>
> a) dropping the referent
On Fri, 9 Mar 2001, Creager, Robert S wrote:
>
> Well, that explains why I wasn't seeing any appreciable speed increase with
> the INITIALLY DEFERRED. I tried mucking in pg_class, and saw a 3 fold
> increase in insert speed on inserts into my table with 2 relational
> triggers. SET CONSTRAINTS
On Fri, 9 Mar 2001, David Olbersen wrote:
> Greetings,
> I've been toying aroudn with postgres 7.1beta5's ability to control the
> planner via explicitely JOINing tables. I then (just for giggles) compare the
> difference in the EXPLAIN results.
>
> I'm no super-mondo-DBA or anything, b
> On Fri, 9 Mar 2001, Stephan Szabo wrote:
>
> ->Not entirely. Those are only estimates, so they don't entirely line up
> ->with reality. Also, I notice the first estimates 14 rows and the second
> ->1, which is probably why the estimate is higher. In prac
On Fri, 9 Mar 2001, David Olbersen wrote:
> On Fri, 9 Mar 2001, Stephan Szabo wrote:
>
> -> Hmm, what were the two queries anyway?
>
> The "slower" query
>
> SELECT
> to_char( p.insertion_time, 'HH:MI AM MM/DD' )
Darn. Well, one of the queries picked that 1 row was going to survive
the nested loop step and the other said 14. I was wondering which one
was closer to being correct at that time.
On Fri, 9 Mar 2001, David Olbersen wrote:
> On Fri, 9 Mar 2001, Stephan Szabo wrote:
>
> ->As a q
Actually, just thought of something else. If you remove
the probably redundant p.song_id=s.song_id from the second
query (since the join ... using should do that) does it
change the explain output?
On Fri, 9 Mar 2001, David Olbersen wrote:
> On Fri, 9 Mar 2001, Stephan Szabo wrote:
>
What is the schema of the table in question, does it have any references
to other tables and what is an example insert statement?
On Wed, 7 Mar 2001, chard wrote:
>
> help me pls.
> i got an error like this when i do an insert to a table, my table dont
> have bpchar type of field.
>
> ERROR:
pg_class holds the relation information (tables, etc)
pg_attribute holds attribute information (attname), it
keeps the oid of the relation it's on in attrelid and the
oid of the type as atttypid
pg_type holds type information (typname)
The attnum>0 is to limit the check to user attributes.
On Thu, 15 Mar 2001, Gerald Gutierrez wrote:
> 1) When I create a empty table, and then immediate create an index on a
> column, I can get /index scans/ when searching on that column. But when I
> then run VACUUM, the same search becomes a /sequential scan/. Shouldn't it
> still be an index s
1 - 100 of 732 matches
Mail list logo