How can I efficiently return the minimum/maximum of two given
expressions? Like SELECT MYMIN(a+b-c,d+e*f).
Thanks.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMA
Thats the fun part, I actually need to allow duplicates in specific cases
but not in this one :)
Shouldn't the serializable level prevent these duplicates? As I understand
it serializable
should give the same result as if the transactions were performed the one
after the other.
Thnx
Panagiotis
On
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/15/07 03:28, Panagiwths Pediadiths wrote:
> Thats the fun part, I actually need to allow duplicates in specific cases
> but not in this one :)
Same table?
> Shouldn't the serializable level prevent these duplicates? As I understand
> it seriali
2007/9/15, rihad <[EMAIL PROTECTED]>:
> How can I efficiently return the minimum/maximum of two given
> expressions? Like SELECT MYMIN(a+b-c,d+e*f).
>
> Thanks.
Hello
use function GREATEST (maximim) or LEAST (minimum)
http://www.postgresql.org/docs/8.2/interactive/functions-conditional.html#AEN1
Can someone please explain to me why these two give different results?
The idea is to get the number of seconds past 00:00:00, so the second
one is obviously correct.
foo=> select extract(epoch from current_time);
date_part
--
42023.026348
(1 row)
foo=> select extract(epoch from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/15/07 06:45, rihad wrote:
> Can someone please explain to me why these two give different results?
> The idea is to get the number of seconds past 00:00:00, so the second
> one is obviously correct.
How about:
select extract(hour from current_t
On Sat, Sep 15, 2007 at 04:45:02PM +0500, rihad wrote:
> Can someone please explain to me why these two give different results?
> The idea is to get the number of seconds past 00:00:00, so the second
> one is obviously correct.
They're both correct.
> foo=> select extract(epoch from current_tim
On Fri, Sep 14, 2007 at 04:48:08PM +0300, Panagiotis Pediaditis wrote:
> Is there some way of locking all database tables in a transaction
> without knowing their names
> or even better just locking the entire database? I know this is bad
> tactics but there is a specific
> case where i need it.
Michael Fuhr wrote:
On Sat, Sep 15, 2007 at 04:45:02PM +0500, rihad wrote:
Can someone please explain to me why these two give different results?
The idea is to get the number of seconds past 00:00:00, so the second
one is obviously correct.
They're both correct.
foo=> select extract(epoch
On Sat, Sep 15, 2007 at 06:40:38PM +0500, rihad wrote:
> PostgreSQL seems to default to "time without time zone" when declaring
> columns in the table schema. Since all my times and timestamps are in
> local time zone, and I'm *only* dealing with local times, should I be
> using "time with time
Michael Fuhr wrote:
On Sat, Sep 15, 2007 at 04:45:02PM +0500, rihad wrote:
Can someone please explain to me why these two give different results?
The idea is to get the number of seconds past 00:00:00, so the second
one is obviously correct.
They're both correct.
foo=> select extract(epoch
Hi list,
last week I asked a question about a query with several joins and a
"like" operator which was really slow. When I replaced "like" with
"substring" (which was possible because the comparison was simply "bla
like '123%'") the query became extremely faster because the query
optimizer ca
Martijn van Oosterhout <[EMAIL PROTECTED]> writes:
> Historical I beleive. Postgres has four types: timestamp, timestamptz,
> time and timetz. Then SQL decreed that TIMESTAMP means WITH TIME ZONE,
> ie timestamptz. So now you get the odd situation where:
> timestamp == timestamp with time zone =
i have this table:
# \d text_words
Table "public.text_words"
Column | Type |Modifiers
+-+-
id | integer | not null default nextval('text_words_id_seq'::regclass)
word
hubert depesz lubaczewski <[EMAIL PROTECTED]> writes:
> index is created using text_pattern_ops so i will be able to use it in 'where
> word like '...%''
> but, it appears it is not usable with = operator:
= is not one of the members of the text_pattern_ops operator class.
regression=# select am
On Sat, Sep 15, 2007 at 11:09:39AM -0400, Tom Lane wrote:
> hubert depesz lubaczewski <[EMAIL PROTECTED]> writes:
> > index is created using text_pattern_ops so i will be able to use it in
> > 'where word like '...%''
> > but, it appears it is not usable with = operator:
> = is not one of the memb
hubert depesz lubaczewski <[EMAIL PROTECTED]> writes:
> On Sat, Sep 15, 2007 at 11:09:39AM -0400, Tom Lane wrote:
>> = is not one of the members of the text_pattern_ops operator class.
> ok, but is there any reason for this?
Well, at the time those opclasses were invented, the regular = operator
On Sat, Sep 15, 2007 at 11:48:19AM -0400, Tom Lane wrote:
> As of a couple years ago, the regular text = operator only yields true
> for bitwise-equal strings, so we could perhaps drop ~=~ and use = in its
> place. But I'd be worried about breaking existing queries that expect
> the strangely-name
On Sat, 2007-09-15 at 12:40 +0500, rihad wrote:
> How can I efficiently return the minimum/maximum of two given
> expressions? Like SELECT MYMIN(a+b-c,d+e*f).
>
SELECT LEAST(a+b-c,d+e*f);
SELECT GREATEST(a+b-c,d+e*f);
Regards,
Jeff Davis
---(end of broadcast)--
Hello,
this might not be the best place to ask, but has there been any further
progress or an alternative project to Florian Pflug's SoC 2007 proposal
about enabling PITR slaves to serve read-only queries? It seems like an
elegant way to load-balance a PostgreSQL database with very little over
Acm wrote:
I am working with PostgreSQL 8.2.4.
I need to use the SQL COPY (COPY table FROM file) statement to
populate my database.
I have created a normalized data model (up to 3NF). Is it possible to
use COPY TO on a particular table (that is linked to other tables
using foreign keys) whilst
wild_oscar wrote:
Well, after further searching and reviewing the code I believe the problem
was the NOINHERIT in the login role creation.
So the remaining question is:
On another question, if I want to grant privileges to all tables I have to
do them ONE BY ONE. Granting the privileges on the
On 9/15/07, hubert depesz lubaczewski <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 14, 2007 at 04:48:08PM +0300, Panagiotis Pediaditis wrote:
> > Is there some way of locking all database tables in a transaction
> > without knowing their names
> > or even better just locking the entire database? I know
I'm trying to create a function to determine the next due payment date
of a recurring expense.
I have a table containing the date the payment first started, and a
payment frequency key which relates to a payment ID in another table
containing a string defining how frequent the payment exists.
Paul Lambert wrote:
I'm trying to create a function to determine the next due payment date
of a recurring expense.
I have a table containing the date the payment first started, and a
payment frequency key which relates to a payment ID in another table
containing a string defining how frequent
On Thursday 13 September 2007 14:52, Nikolay Samokhvalov wrote:
> Hi all,
>
> does anybody know where to find a good list of PostgreSQL terms
> (including both traditional terms and Postgres-specific ones)? At
> least a simple list w/o descriptions...
>
AFAIK no such thing exists, but someone coul
On Sat, 15 Sep 2007, Ron Johnson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 09/15/07 03:28, Panagiwths Pediadiths wrote:
> > Thats the fun part, I actually need to allow duplicates in specific cases
> > but not in this one :)
>
> Same table?
Yup
>
> > Shouldn't the serializ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/15/07 19:59, Panagiwths Pediadiths wrote:
>
> On Sat, 15 Sep 2007, Ron Johnson wrote:
>
> On 09/15/07 03:28, Panagiwths Pediadiths wrote:
Thats the fun part, I actually need to allow duplicates in specific cases
but not in this one :)
Embarcadero's tools are quite nice, quite pricey, Windows only.
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
29 matches
Mail list logo