On Thu, Mar 22, 2001 at 07:14:51AM -0500,
Joel Burton <[EMAIL PROTECTED]> wrote:
>
> Is there a function for substring replacement?
[snip]
> Am I missing anything? Has anyone already solved this?
I asked a similar question about a month ago, and got someone to add doing
sed like string repl
On Tue, Jun 18, 2002 at 00:46:59 +0100,
Andy Pearce <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This may be the wrong forum, but I'm sure someone can help!
>
> I'm writing a VB application that uses PostgreSQL as the database backend. Is it
>common practice to create a user id in pgsql for each user
On Fri, Jun 21, 2002 at 10:30:54 +0200,
Michael Agbaglo <[EMAIL PROTECTED]> wrote:
>
> of course you could sort by DOY but then you'll have a problem w/ the
> next year:
>
> if it's let's say december and you select the list for the next 60 days,
> persons having birthday in december will app
Is there a simple way to do something like the following:
create unique index inst_u_app on inst (lower(host), psport);
It looks like you can have an index on several columns, but not
several functions.
---(end of broadcast)---
TIP 2: you can get
On Tue, Jun 25, 2002 at 14:35:16 -0400,
Tom Lane <[EMAIL PROTECTED]> wrote:
> Bruno Wolff III <[EMAIL PROTECTED]> writes:
> > Is there a simple way to do something like the following:
> > create unique index inst_u_app on inst (lower(host), psport);
>
> > It
I don't know if this is a well known trick or not. I wanted to check a
list of values inputted to a script against some existing tables. I was
trying to think of alternatives to using a temp table and copy since
this would take two requests instead of one.
What I ended up doing is building the in
On Mon, Jul 08, 2002 at 03:18:33 +0200,
Joachim Trinkwitz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to insert a row only under condition that there isn't already
> another row with similar values -- something like a INSERT INTO
> ... WHERE NOT EXISTS (SELECT ...)?
You can do something like t
On Mon, Jul 08, 2002 at 17:49:56 +0200,
Joachim Trinkwitz <[EMAIL PROTECTED]> wrote:
>
> Now I want to allow a user with id 123 only to insert a row in T if he
> doesn't choose values from L with same 'art' and 'semester' values --
> in the examples user 123 has already chosen a kvvnr from seme
On Mon, Jul 15, 2002 at 17:31:24 -0700,
Josh Berkus <[EMAIL PROTECTED]> wrote:
> Stephan,
>
> > We had a discussion recently on -general about this. Right now the
> > planner won't push the conditions down into the arms of the union because
> > noone's been sure under what conditions the optim
On Tue, Jul 16, 2002 at 09:36:31 -0700,
Josh Berkus <[EMAIL PROTECTED]> wrote:
> Bruno,
>
> > It wouldn't have to be a dummy table. You could have both sets of
> > data
> > in the same table.
>
> Per my original e-mail, this is not an option.
>
> Basically, the two tables have nothing in co
On Tue, Jul 16, 2002 at 15:42:23 -0700,
Josh Berkus <[EMAIL PROTECTED]> wrote:
>
> Table "events", the largest table in the database, contains event schedule
> listing with 11 attributes and one dependant table as well as recursive
> relationships between events. Each event record can be (a
Just in case there was some misunderstanding of my suggestion here is
what I had in mind.
Your query:
SELECT t1.id, t1.name, t1.abbreviation, t1.juris_id
FROM t1
UNION ALL
SELECT t2.id, t2.name, NULL, t2.juris_id
FROM t2;
My suggestion:
SELECT t3.id, coalesce(t1.name, t2.name), t1.abbreviation,
On Sun, Jul 21, 2002 at 10:11:25 +1000,
mark carew <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Can somebody direct me to a list of the above. Would be nice to know in
> advance of its release.
You can read the development docs. If you follow the developers link on
any of the mirrors you can f
On Fri, Aug 16, 2002 at 16:15:57 +0100,
Gary Stainburn <[EMAIL PROTECTED]> wrote:
>
> I only want the insert to work if prpid matches pgpid and prnozzle matches
> pgnozzle.
There are several typos in your sample that make it hard to know for
sure what you want to do. However I suspect you jus
On Sun, Aug 18, 2002 at 12:49:18 +0100,
Julian Scarfe <[EMAIL PROTECTED]> wrote:
> I'm struggling to find an appropriate efficient query for an aggregate-type
> problem and I'd appreciate suggestions.
>
> I have messages associated with a set of locations (zero or more messages
> per location).
On Fri, Aug 23, 2002 at 11:11:51 +0200,
Roger Mathis <[EMAIL PROTECTED]> wrote:
> Hi
>
> Is it true, that I can't define unsigned integers in a table definition?
If the main issue is that there not be negative numbers, you can use a
constraint to enforce this. In 7.3 you can define a domain wi
On Thu, Aug 29, 2002 at 13:37:40 -0500,
"Marie G. Tuite" <[EMAIL PROTECTED]> wrote:
>
> Is there a system attribute or table or ? providing record count by table?
No. Normally you use the count aggregate to obtain that information.
However if you do few updates and need this information fairl
On Fri, Aug 30, 2002 at 14:07:28 +,
Matthew Price <[EMAIL PROTECTED]> wrote:
> Howdy,
>
> Does anyone know of an SQL function that will check a string for compliance with the
>RFC822 mail address spec? I have a script that sends mail from a db (no, I am not a
>spammer) but I often have m
On Mon, Sep 09, 2002 at 00:13:04 +,
Colin Fox <[EMAIL PROTECTED]> wrote:
>
> select
>*
> from
>motm
> order by
>creation_date desc
> limit 1;
>
> So in the first case I select the record that has the largest date. In the
> second case, I order all the records, and then return o
On Thu, Sep 12, 2002 at 12:49:21 -0500,
Larry Rosenman <[EMAIL PROTECTED]> wrote:
> Look at contrib/earthdistance, I **think** it does what you need.
There isn't an index for the distance operator. You can use boxes to
limit the candidates if there is a small bound on how far apart points
can b
On Thu, Sep 26, 2002 at 18:56:46 +0800,
"John Sebastian N. Mayordomo" <[EMAIL PROTECTED]> wrote:
>
>
> How do I get the start and end date of the present week?
> Is this possible?
>
> For example this week
> Start = Sept. 22
> End = Sept. 28
The following advice will work on 7.3. For 7.2.
On Thu, Sep 26, 2002 at 11:55:48 -0400,
Jean-Luc Lachance <[EMAIL PROTECTED]> wrote:
> How about:
>
> select now() - date_part( 'DOW', now()) as starts_on,
> now() -date_part( 'DOW', now()) + 6 as ends_on;
That won't work in 7.3.
The following works in both 7.2 and 7.3:
area=> select curre
On Sun, Sep 29, 2002 at 18:12:55 -0600,
Mike Sosteric <[EMAIL PROTECTED]> wrote:
> On Sun, 29 Sep 2002, Bruce Momjian wrote:
>
> 3) can you do selects on only a portion of a multidimensional array. That
> is, if you were storing multilanguage titles in a two dimensional array,
>
> [en], "engl
On Mon, Sep 30, 2002 at 06:38:56 -0600,
Mike Sosteric <[EMAIL PROTECTED]> wrote:
> On Mon, 30 Sep 2002, Bruno Wolff III wrote:
>
> The chances are very very good that in 99% of the cases we'd only ever
> have a single title. multiple titles would be rare. and, to mak
On Thu, Oct 03, 2002 at 22:07:40 -0400,
Vincent-Olivier Arsenault <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I saw a posting regarding this issue in august, with no solution...
Then you didn't read the entire thread. You can create a new operator
class to get the desired behavior.
--
On Thu, Oct 03, 2002 at 19:30:59 -0700,
Josh Berkus <[EMAIL PROTECTED]> wrote:
> Vincent,
>
> > SELECT * FROM TABLE1 ORDER BY X DESC, Y ASC;
> >
> > (X is a date and Y a varchar)
> >
> > What would that index be?
> >
> > Is there a function I can use, to invert x (the date), so that I can
>
On Tue, Oct 01, 2002 at 14:18:50 +0200,
Michael Contzen <[EMAIL PROTECTED]> wrote:
> Here the table:
>
> mc=# \d egal
> Table "public.egal"
> Column | Type | Modifiers
> +-+---
> i | integer |
>
> mc=# select count(*) from egal;
> count
> -
On Thu, Oct 10, 2002 at 09:37:49 -0300,
2000 Informática <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have two data bases: db1 and db2.
> In MS SQL Server I can use
> 'SELECT T1.ID, T2.NAME FROM db1..table1 T1 INNER JOIN db2..table2 T2
> ON T1.ID = T2.ID ...'.
>
> How I do it in the PosgreSQL ?
Po
On Fri, Oct 18, 2002 at 12:45:56 -0400,
Wei Weng <[EMAIL PROTECTED]> wrote:
> I have a table
>
>Table "Users"
> Column | Type | Modifiers
> ---++---
> userid| character varying(40) | not null
> username | cha
On Tue, Oct 29, 2002 at 23:19:55 +0100,
Peter Eisentraut <[EMAIL PROTECTED]> wrote:
> Josh Berkus writes:
>
> > I wrote a MAX(bool), what are the chances it would get added to the core? I
> > don't see any good reason not to have one.
>
> One reason not to have one is that Boolean values are
On Fri, Nov 01, 2002 at 06:56:30 -0800,
Chris Gamache <[EMAIL PROTECTED]> wrote:
>
> The problem occurrs when two of the processes grab the exact same row at the
> exact same instant. It happens roughly 1 out of 1000 times. I'm not sure if
> setting the transactions to serializable would fix the
On Fri, Nov 01, 2002 at 14:18:37 -0500,
Wei Weng <[EMAIL PROTECTED]> wrote:
> Do you need to unlock the table fifo when you are done?
Locks only apply for the duration of a transaction. When you commit or
roleback the lock will be released.
---(end of broadcast)-
On Fri, Nov 01, 2002 at 16:33:32 -0500,
Wei Weng <[EMAIL PROTECTED]> wrote:
> This is what is on postgresql's manual page:
>
> According to this syntax, SELECT DISTINCT COUNT(ID) FROM test
> should be valid while SELECT COUNT(DISTINCT ID) FROM test otherwise.
>
> while in fact, both are valid.
On Fri, Nov 01, 2002 at 17:05:26 -0500,
Kevin Old <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have two fields in my database access_time and release_time.I
> would like to calculate the "duration" between these two values, but
> can't figure out what to do.
>
> I've tried something like
On Mon, Nov 04, 2002 at 09:11:30 +0100,
Terry Yapt <[EMAIL PROTECTED]> wrote:
>
> When I compare a numeric(x,0) field with a float8 field I have an error
> on PostgreSQL what I didn't have with Oracle. I mean:
>
> CREATE test (one numeric(2,0));
>
> SELECT * FROM test WHERE one = 1.0;
W
On Wed, Nov 06, 2002 at 15:18:38 +0100,
Huub <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to create a table which has 2 columns, and both columns have to
> be primary key (or: together they are the primary key). How can I do
> this using SQL? Using pgAdminII for Postgres7.2.2 on RH8.
You can u
On Fri, Nov 08, 2002 at 11:20:02 -0700,
Roberto Mello <[EMAIL PROTECTED]> wrote:
>
> Is there any way to make a timestamp difference operation not return an
> interval? I'd like to get hours, minutes and seconds only, not the "1 day"
> or whatnot.
When you take a difference of two timestamps, y
On Fri, Nov 08, 2002 at 16:11:05 -0500,
Tom Lane <[EMAIL PROTECTED]> wrote:
> Roberto Mello <[EMAIL PROTECTED]> writes:
> > Is there any way to make a timestamp difference operation not return an
> > interval? I'd like to get hours, minutes and seconds only, not the "1 day"
> > or whatnot.
>
> I
On Sat, Nov 09, 2002 at 17:51:40 +0100,
LR <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I'm connected to a postgreSQL db ( e.g. myDB ), how could I execute
> "select * from myTable;" in an other db (e.g. myOtherDB).
>
> In other words, what is the postgreSQL equivalent of the MS SQL Server
> state
On Wed, Nov 13, 2002 at 10:44:19 +,
Luis Sousa <[EMAIL PROTECTED]> wrote:
>
> I have a table, whose primary key is a serial, that is connected to a
> few tables. In this view, I want to insert data, in the main table, and
> also in the "child" tables. My idea was to create a rule, that fi
On Mon, Jan 06, 2003 at 12:45:25 +0200,
Tambet Matiisen <[EMAIL PROTECTED]> wrote:
> btw, views "execute" also with owner's rights, ie if you grant select on view, you
>do not have to grant select on every table used in view. Still current_user in view
>returns "caller", while maybe it should r
On Wed, Jan 08, 2003 at 09:02:47 -0500,
"Randy D. McCracken" <[EMAIL PROTECTED]> wrote:
>
> UPDATE publications SET url = 'www.srs.fs.usda.gov' WHERE url =
> 'www.srs.fs.fed.us';
For simple cases you can do this with available string functions.
For more complicated cases, you can write a simple
On Wed, Jan 08, 2003 at 08:49:00 -0600,
Richard Rowell <[EMAIL PROTECTED]> wrote:
> I'm confused. How do I massage the integer 10102 into the date
> 2002-01-01?
>
> cmi=> select to_char(10102,'00');
> to_char
> -
> 010102
> (1 row)
Note the leading space in the returned row. Th
On Wed, Jan 08, 2003 at 17:04:40 +0100,
Nikola Ivacic <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have trouble executing count(*) statement.
> On a large dataset it takes quite a while to return result.
> Is there any other way to get number of tupples in relation
> or is the only way to optimize cou
On Thu, Jan 09, 2003 at 19:15:51 -0500,
"Randy D. McCracken" <[EMAIL PROTECTED]> wrote:
>
> Hi Rajesh,
>
> I don't know why but the example you gave me did not work. Here is what
> happened when I tried:
>
> ==
>
> pubs_test=# UPDATE publications SET url = replace( 'www.srs.fs.fed.us
On Thu, Jan 09, 2003 at 22:48:11 -0200,
Maurício Sessue Otta <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a PHP script that do something like this:
>
> INSERT INTO table_with_sequence (field1, field2, fieldn)
> SELECT field1, field2, ..., fieldn FROM table,table
> WHERE condition, conditio
On Sat, Jan 11, 2003 at 12:25:47 -0600,
Maurício Sessue Otta <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a PHP script that do something like
> this:
>
> INSERT INTO table_with_sequence (field1,
> field2, fieldn)
> SELECT field1, field2, ..., fieldn FROM table,table
>
> WHERE condition
On Wed, Jan 15, 2003 at 17:23:09 -,
[EMAIL PROTECTED] wrote:
>
> How do nulls work?
> ==
> There is one very important rule when dealing with nulls. The result of
> any operation or comparison, when applied to a null is null. The only
> exception is testing if a value is null
On Wed, Jan 15, 2003 at 13:29:47 -0500,
Matthew Nuzum <[EMAIL PROTECTED]> wrote:
>
> Can anyone suggest a way for me to get the information I need? I'm very
> content to use a simple pl/pgsql function, however I don't know how I'd
> use recursion there.
Look at the tablefunc contrib package. I
On Tue, Jan 21, 2003 at 14:23:02 +0100,
Andreas Tille <[EMAIL PROTECTED]> wrote:
> Hi,
>
> once I subscribed to this list I've got the information how to
> subscribe:
>
>If you ever want to remove yourself from this mailing list,
>send the following command in email to
>[EMAIL PROTE
On Wed, Jan 22, 2003 at 16:12:52 +0100,
Ries van Twisk <[EMAIL PROTECTED]> wrote:
> Dear PostgreSQL users,
>
> I understand that when a frontend accesses a VIEW that PostgreSQL cannot use
> a index on that view.
> For example when I do this: SELECT * FROM full_cablelist WHERE
> projectocode=5; C
On Fri, Jan 24, 2003 at 00:45:38 -0800,
David Durst <[EMAIL PROTECTED]> wrote:
>
> I can't be sure that cron will always be up when the DB is up,
> so lets say crond goes down for some random reason (User, System error,
> Etc..)
One option would be to run the cron job fairly often and have it c
On Sun, Jan 26, 2003 at 12:29:12 +1000,
jack <[EMAIL PROTECTED]> wrote:
>
> I try use uique instead of primary key. And it works, it allows null values.
> Is there any other difference between primary key and unique?
I believe that the primary key is the default key for foreign key references
i
On Tue, Jan 28, 2003 at 20:05:15 +1300,
Rodger Donaldson <[EMAIL PROTECTED]> wrote:
>
> The problem: I have two tables, add_queue and sites, on a postgresql
> 7.2.x database. add_queue is where items go to be reviewed by a human
> before being moved into sites. One of the things I'd like to do
On Tue, Jan 28, 2003 at 23:39:47 -0500,
Wei Weng <[EMAIL PROTECTED]> wrote:
> What about a UNIQUEIDENTIFIER type?
You probably want to use serial type as a replacement. Serial is really
int with a default obtained using a sequence.
---(end of broadcast)--
On Fri, Jan 31, 2003 at 23:47:27 +1100,
Matthew Horoschun <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm implementing a system where I need to be reasonably careful about
> security. One thing that worries me is SEQUENCES.
>
> My understanding is that I need to GRANT the UPDATE privilege on the
On Sat, Feb 01, 2003 at 12:40:00 +0100,
pginfo <[EMAIL PROTECTED]> wrote:
>
> If I try to execute:
>update Table1 set fieldForUpdate = 1 where ID IN (select T2.ID from
> Table2);
> it is running very slow.
You might try:
update Table1 set fieldForUpdate = 1 from Table2 where Table1.id = T
On Tue, Feb 04, 2003 at 09:08:56 -0500,
Wei Weng <[EMAIL PROTECTED]> wrote:
> It is a query that looks like
>
> SELECT target1, target2... targetn, SUN(t.qty)
> FROM Table t
> GROUP BY target1
> HAVING SUM(t.qty)>=10
>
> You can replace SUM(t.qty)>=10 with other aggregate constraints.
There we
On Tue, Feb 25, 2003 at 15:25:17 +0100,
Natasa Bulatovic <[EMAIL PROTECTED]> wrote:
>
> select col1||col2||col3||.||col100 from table
>
> Most of these columns for the test data are NULL...Datatypes of columns are mixed
> text, varchar, char...Select statement does not return any error...J
On Sat, Mar 01, 2003 at 19:53:27 +0100,
Nicolas Fertig <[EMAIL PROTECTED]> wrote:
>
> I want to have all the row in table "table_main" with the value in the table
> "table_slave" (value or null if not exist)
>
> It is possible to have the same result without sub-select in OUTER JOIN
> (speed pr
On Tue, Mar 25, 2003 at 20:24:55 +0100,
Tomasz Myrta <[EMAIL PROTECTED]> wrote:
> Uz.ytkownik Josh Berkus napisa?:
>
> It looks it could be useful to display how much time is left for
> scheduling cases, but as I wrote few threads ago - displaying intervals
> longer than one month is useless wit
On Thu, Mar 27, 2003 at 10:06:08 +1000,
Rudi Starcevic <[EMAIL PROTECTED]> wrote:
>
> I've been searching for a source for this data without joy so far and
> would like to
> ask if someone on this list could point me to or help with a source for
> this info.
> Ideally I'd like Country,States,a
On Wed, Mar 26, 2003 at 16:55:21 +,
Michael A Nachbaur <[EMAIL PROTECTED]> wrote:
>
> I for one would be very interested in such a web service (I'd really like a
> address / street lookup to find lat/longs for addresses, but thats not likely
> to happen).
Its already there for the US. A g
On Mon, Mar 31, 2003 at 11:08:48 +0530,
Rajesh Kumar Mallah <[EMAIL PROTECTED]> wrote:
>
> I am wanting to make an application similar to you
> which shud be able to get all the places within certaint
> radius of the place in question.
If you look at contrib/earthdistance in the 7.4 source
On Thu, Jun 05, 2003 at 20:25:32 +0530,
[EMAIL PROTECTED] wrote:
>
>
> hi ,
>
> Is there any way to enforce fkeys only on subset of
> the table something on the lines of unique partial indexes
>
> or any work around ? (on update or insert trigger is the only thing i can think of)
If the fore
On Thu, May 29, 2003 at 17:37:19 +0800,
Abdul Wahab Dahalan <[EMAIL PROTECTED]> wrote:
> How can I undelete the deleted data from a table;
If you notice before you commit, you issue a rollback. Otherwise you need
to recover from backup. If you don't have a backup, then you might be
able to do so
On Fri, May 30, 2003 at 08:47:03 -0700,
C F <[EMAIL PROTECTED]> wrote:
> Hello,
> I already tried this same basic question with no response maybe I was too
> wordy. So here it is simplified what's the best way to write this query? I'm
> open to using stored procedures, but even then
On Fri, May 30, 2003 at 16:03:44 -0700,
jtx <[EMAIL PROTECTED]> wrote:
> Basically, I have something like this:
>
> Select o.id,o.num_purch,o.program from orders o left join lists l on
> l.order_id=o.id where o.uid=1 and o.status!='closed'
>
> However, I want to throw an extra conditional in th
On Fri, Jun 06, 2003 at 10:03:29 -0700,
Michael A Nachbaur <[EMAIL PROTECTED]> wrote:
>
> Postfix can deliver to multiple targets, if you separate the targets with
> comas, like so:
>
> Source Target
> [EMAIL PROTECTED] [EMAIL PROTECTED],[EMAIL PROTECTED],
>
> What I would l
On Wed, Jun 04, 2003 at 16:59:02 +0200,
David Pradier <[EMAIL PROTECTED]> wrote:
>
> In short, i want to calculate the result of the function my_function for
> some values of my_var1, cross by some values of my_var2.
> These values are not taken in a table, but put in directly.
> They are a lot,
On Mon, Jun 09, 2003 at 10:35:10 +0200,
Eivind Kvedalen <[EMAIL PROTECTED]> wrote:
>
> Ok. What I actually had in mind was whether the optimizer would remove the
> ORDER BY clause completely or not, as it isn't used in the top-level
> SELECT query, and SQL doesn't in general guarantee ordered ro
On Thu, Jun 12, 2003 at 11:19:14 +0200,
David Pradier <[EMAIL PROTECTED]> wrote:
>
> In short, i want to calculate the result of the function my_function for
> some values of my_var1, cross by some values of my_var2.
> These values are not taken in a table, but put in directly.
> They are a lot,
On Thu, Jun 12, 2003 at 13:21:01 +0200,
Marco Vezzoli <[EMAIL PROTECTED]> wrote:
> Hi everybody,
> I'm sorry if this topic has already been explained, but the search
> engine at archives.postgresql.org shows me 10 pages of results but
> without any link (!).
> I'm using postgres 7.1.3 on Solaris
On Thu, Jun 12, 2003 at 13:50:27 +0200,
David Pradier <[EMAIL PROTECTED]> wrote:
>
> I guess i wasn't clear enough.
> "my_function" here is a function which calculate some results about some
> datas from the database.
> Example : a function which would calculate the sum of the money (which
> wou
On Fri, Jun 13, 2003 at 13:44:09 +0200,
javier garcia - CEBAS <[EMAIL PROTECTED]> wrote:
>
> And I've got another related tables with a date field. I need to compare the
> dates field in the other tables with "year", "month", "day" in this table.
>
> Is there a way to create a table from this
On Fri, Jun 20, 2003 at 19:33:35 +0200,
javier garcia - CEBAS <[EMAIL PROTECTED]> wrote:
> Hi all;
>
> Peter, thank you very much for your help. Just a little thing. I've done as
> you say:
>
> CREATE TABLE rain_series_dated AS SELECT (year * interval '1 year' + month *
> interval '1 month' +
On Thu, Jun 26, 2003 at 14:31:34 +0200,
Dani Oderbolz <[EMAIL PROTECTED]> wrote:
>
> It was written for MySQL, which can take NULL and then assign an
> auto_increment.
> However, in PostgreSQL I am getting problems, because it would not let
> me insert NULL
> into a NOT NULL column (which is p
On Fri, Jun 27, 2003 at 13:13:07 +0200,
Együd Csaba <[EMAIL PROTECTED]> wrote:
> Hi,
Please don't reply to messages to start a new thread.
> I have a product table identified by its id field. There is a productgroups
> table with productisd, productgroupid fields. And I have a prod_in_pgr
> (pr
On Fri, Jun 27, 2003 at 10:45:07 +0200,
Dani Oderbolz <[EMAIL PROTECTED]> wrote:
>
> Yea, fine, but I propose a different (deeper) approach.
> Why does SERIAL only enforce a DEFAULT?
Because it is faster.
> This is not an exact imitation of an autoincrement, as a DEFAULT can be
> overwritten.
On Fri, Jun 27, 2003 at 16:18:10 +0200,
Együd Csaba <[EMAIL PROTECTED]> wrote:
>
> This is absolutelly what I want, but I can't understand how it is working.
> Where can I find a descriptive (tale-like, for kids ... :) ) documentation
> about using joins?
If you look at the documentation for th
On Fri, Jun 27, 2003 at 16:35:36 +0200,
Dani Oderbolz <[EMAIL PROTECTED]> wrote:
> Well, why not just use the Sequence?
> Is there really such a performance hit when calling a trigger?
I think the big issue is concurrency. Sequences are designed so that
conncurrent uses of the sequence don't blo
On Fri, Jun 27, 2003 at 16:09:31 -0700,
Matthew Hixson <[EMAIL PROTECTED]> wrote:
> Hi, I have a bunch of records that I need to delete from our database.
> These records represent shopping carts for visitors to our website.
> The shopping carts I'd like to delete are the ones without anythin
On Fri, Jun 27, 2003 at 23:16:18 -0700,
Ludwig Lim <[EMAIL PROTECTED]> wrote:
>
>Is there way of rewritting :
>SELECT a.status,
>employee_id
>FROM permission a LEFT JOIN
> ( SELECT * FROM employee WHERE employee_id
> =5) as b ON (a.status = b.status)
>WH
On Mon, Jun 30, 2003 at 22:28:15 +1000,
Rudi Starcevic <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm learning to use Postgresql's bitwise operator's as I'm interested
> in building super fast search's based on user selections in web forms.
>
> So far so good but I have just lost it a little so I
On Mon, Jun 30, 2003 at 18:26:38 -0400,
Robert Treat <[EMAIL PROTECTED]> wrote:
> what i want to do is:
>
> delete * from foo where not (foo.a = bar.a and foo.b=bar.b and
> foo.c=bar.c) ;
For the case without not (which appears to be what you really want)
you can pretty much do this.
See below
On Tue, Jul 01, 2003 at 12:29:16 -0400,
Greg Stark <[EMAIL PROTECTED]> wrote:
>
> SELECT greatest(a,b) FROM bar
>
> would return one tuple for every record in the table with a single value
> representing the greater of bar.a and bar.b.
You can do this with case.
SELECT CASE WHEN a >= b THEN a
On Wed, Jul 02, 2003 at 16:26:09 -0300,
Chris Schneider <[EMAIL PROTECTED]> wrote:
> I know this is basic, but couldn\'t find and in a hurry to know the answer. When
> interfacing with PostgreSQL through PSQL, it appears that DML statements are
> auto-commited, that is, a change I make in one
On Sat, Jul 12, 2003 at 09:00:19 +0200,
Erik Thiele <[EMAIL PROTECTED]> wrote:
> hi
>
> I am having problems with understanding of date/time/interval handling
> in postgresql and sql in general.
>
> a,b are TIMESTAMP WITHOUT TIME ZONE
> c is INTERVAL
>
> mathematics tell me:
>
> a-b = (a+c) -
On Tue, Jul 15, 2003 at 14:26:16 +0100,
teknokrat <[EMAIL PROTECTED]> wrote:
> I have three tables customers which 1-many with requests which is 1-1
> with applications. all customers have at least one request but not all
> requests have an application.
>
> I want a query to return all the cus
On Wed, Jul 16, 2003 at 12:48:26 +0100,
Gary Stainburn <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I've got a table holding loco numbers and an id which references the locos
> table. How can I sort this table, so that numeric values appear first in
> numerical order followed by alpha in alpha o
On Wed, Jul 16, 2003 at 11:41:06 -0500,
Bruno Wolff III <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 16, 2003 at 12:48:26 +0100,
> Gary Stainburn <[EMAIL PROTECTED]> wrote:
> > Hi folks,
> >
> > I've got a table holding loco numbers and an id which refere
On Wed, Jul 23, 2003 at 14:51:48 +0200,
[EMAIL PROTECTED] wrote:
> I want to use the result of a subselect as condition of another one.
The two selects you use ar both from items at the same level and hence can't
reference one another. In your example below you could just use a join.
> CREATE V
On Mon, Aug 04, 2003 at 11:17:56 +0300,
[EMAIL PROTECTED] wrote:
> Please help.
>
> Need a boolean function which returns true if given key in table is
> referensed from another table(s).
Use "exists" with a subselect. Something like:
select exists(select 1 from table where table.key = 'value')
On Thu, Aug 14, 2003 at 10:40:02 -0400,
Slawek Jarosz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I trying to write a query that will join 2 tables. Here's the concept:
> Table 1: table1, primary key pk1
> Table 2: table2, primary key pk2
>
> One of the fields (f2) in table2 contains either the pr
On Tue, Aug 19, 2003 at 15:02:24 +0200,
Rado Petrik <[EMAIL PROTECTED]> wrote:
>
> In programing language output =
>
> id(1..3) {
> $output = ( bit | $output );
> }
>
> How write query ? . Thanks
You probably want to write a custom aggregate function to do this.
On Tue, Aug 26, 2003 at 23:15:48 +0530,
[EMAIL PROTECTED] wrote:
> August 26th 2003
> 11:30p
> How do I get the required number of rows thru a query..
> I mean...If I want to show 10 tuples per page.. instead of getting all the tuples
> from the relation and do some front end manipulation, is th
> Konstantin Petrenko wrote, On 8/26/2003 11:37 AM:
>
> >Hello.
> >
> >I accidentally deleted some recordes from my table. How can I restore
> >them? Is it possible in 7.3.3?
> if you have a dump, or you are still in a transaction, you can rollback.
I avoided responding earlier, hoping you could
On Wed, Aug 27, 2003 at 13:47:08 +0200,
Marco Vezzoli <[EMAIL PROTECTED]> wrote:
> Hi,
> hope this is not too off topic: I run postgresql 7.1.3 on Solaris 8;
> I've read on http://cbbrowne.com/info/postgresql.html that 'You will
> only get effective nonblocking VACUUM queries if the dead tuples
On Wed, Aug 27, 2003 at 01:31:23 +0200,
Alessandro Depetro <[EMAIL PROTECTED]> wrote:
>
> so, Can I safely use NUMERIC as a data type for monetary computation instead
> of smallfloat ???
NUMERIC represents decimal numbers exactly so is suitable for monetary
types using even decimal fractions.
On Sat, Sep 06, 2003 at 14:07:09 +0300,
Alexei Chetroi <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I need a little help regarding writing some subqueries. For example I
> have a table "items" which contains columns: itemid, description; and
> another table "events" with columns: itemid, date, eve
1 - 100 of 389 matches
Mail list logo