pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Maybe a Bug, maybe bad SQL
11+ messages / 8 participants
[nested] [flat]

* Maybe a Bug, maybe bad SQL
@ 2001-03-19 19:46  Daryl Herzmann <akrherz@iastate.edu>
  0 siblings, 2 replies; 11+ messages in thread

From: Daryl Herzmann @ 2001-03-19 19:46 UTC (permalink / raw)
  To: pgsql-sql

HI,
	I am running postgres version 7.0 and I do this...

akrherz=# create table test (day date);
CREATE
akrherz=# insert into test values('2000_04_02');
INSERT 13166281 1
akrherz=# insert into test values('2000_04_01');
INSERT 13166282 1
akrherz=# insert into test values('2000_04_03');
INSERT 13166283 1
akrherz=# select day, date_part('day',  day) AS day from test;
    day     | day 
------------+-----
 2000-04-02 |   1
 2000-04-01 |   1
 2000-04-03 |   3
(3 rows)


	Is this fixed in a newer version?  Am I doing something wrong?


TIA,
	Daryl Herzmann




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 04:40  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Daryl Herzmann <akrherz@iastate.edu>
  1 sibling, 1 reply; 11+ messages in thread

From: Bruce Momjian @ 2001-03-21 04:40 UTC (permalink / raw)
  To: Daryl Herzmann <akrherz@iastate.edu>; +Cc: pgsql-sql

With 7.1beta, I get:
	
	    day     | day 
	------------+-----
	 2000-04-02 |   2
	 2000-04-01 |   1
	 2000-04-03 |   3
	(3 rows)

> HI,
> 	I am running postgres version 7.0 and I do this...
> 
> akrherz=# create table test (day date);
> CREATE
> akrherz=# insert into test values('2000_04_02');
> INSERT 13166281 1
> akrherz=# insert into test values('2000_04_01');
> INSERT 13166282 1
> akrherz=# insert into test values('2000_04_03');
> INSERT 13166283 1
> akrherz=# select day, date_part('day',  day) AS day from test;
>     day     | day 
> ------------+-----
>  2000-04-02 |   1
>  2000-04-01 |   1
>  2000-04-03 |   3
> (3 rows)
> 
> 
> 	Is this fixed in a newer version?  Am I doing something wrong?
> 
> 
> TIA,
> 	Daryl Herzmann
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 05:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daryl Herzmann <akrherz@iastate.edu>
  1 sibling, 0 replies; 11+ messages in thread

From: Tom Lane @ 2001-03-21 05:26 UTC (permalink / raw)
  To: Daryl Herzmann <akrherz@iastate.edu>; +Cc: pgsql-sql

Daryl Herzmann <akrherz@iastate.edu> writes:
> akrherz=# create table test (day date);
> CREATE
> akrherz=# insert into test values('2000_04_02');
> INSERT 13166281 1
> akrherz=# insert into test values('2000_04_01');
> INSERT 13166282 1
> akrherz=# insert into test values('2000_04_03');
> INSERT 13166283 1

Would that be a daylight-savings transition date in your timezone?
If so, this is a known date-to-timestamp conversion bug.  It's fixed
for 7.1.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 05:27  Grant <grant@conprojan.com.au>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 11+ messages in thread

From: Grant @ 2001-03-21 05:27 UTC (permalink / raw)
  To: pgsql-sql

version 7.0.3

binary_data=# select day, date_part('day',  day) AS day from test;
    day     | day
------------+-----
 02/04/2000 |   2
 01/04/2000 |   1
 03/04/2000 |   3
(3 rows)

binary_data=#

Why does everyone reply to the person as well as CC to the list when the
person is on the list anyhow?




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 12:06  D'Arcy J.M. Cain <darcy@druid.net>
  parent: Grant <grant@conprojan.com.au>
  1 sibling, 1 reply; 11+ messages in thread

From: darcy@druid.net @ 2001-03-21 12:06 UTC (permalink / raw)
  To: Grant <grant@conprojan.com.au>; +Cc: pgsql-sql

Thus spake Grant
> Why does everyone reply to the person as well as CC to the list when the
> person is on the list anyhow?

Politeness.  You reply to the list so that others benefit from the discussion
and you copy the sender since some people don't get to their mailing lists
as quickly as their regular mail.  One assumes that they have slightly
more interest in the answer since they asked the question.  Any good email
client will filter out the dup.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 13:20  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Grant <grant@conprojan.com.au>
  1 sibling, 2 replies; 11+ messages in thread

From: Bruce Momjian @ 2001-03-21 13:20 UTC (permalink / raw)
  To: Grant <grant@conprojan.com.au>; +Cc: pgsql-sql

> version 7.0.3
> 
> binary_data=# select day, date_part('day',  day) AS day from test;
>     day     | day
> ------------+-----
>  02/04/2000 |   2
>  01/04/2000 |   1
>  03/04/2000 |   3
> (3 rows)
> 
> binary_data=#
> 
> Why does everyone reply to the person as well as CC to the list when the
> person is on the list anyhow?

Good question.  They get the reply faster by sending it to them and the
list, and if someone later wants to reply only to the poster, they have
the email address right there.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 15:43  Ross J. Reedstrom <reedstrm@rice.edu>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 1 reply; 11+ messages in thread

From: Ross J. Reedstrom @ 2001-03-21 15:43 UTC (permalink / raw)
  To: pgsql-sql

On Wed, Mar 21, 2001 at 08:20:22AM -0500, Bruce Momjian wrote:
> > version 7.0.3
> > 
> > binary_data=# select day, date_part('day',  day) AS day from test;
> >     day     | day
> > ------------+-----
> >  02/04/2000 |   2
> >  01/04/2000 |   1
> >  03/04/2000 |   3
> > (3 rows)
> > 
> > binary_data=#
> > 
> > Why does everyone reply to the person as well as CC to the list when the
> > person is on the list anyhow?
> 
> Good question.  They get the reply faster by sending it to them and the
> list, and if someone later wants to reply only to the poster, they have
> the email address right there.

Note also that it's a mailing list cultural thing: many lists operate
in a 'post only to the list' mode. Those of us on the pgsql lists do the
'list and person' thing, in response to direct questions, for the reasons
Bruce and D'Arcy point out. Note that by knowing the reasons, one may
then make informed decisions, like my posting of this message directly
to the list only, since it's a peripheral issue and multiple people
are involved in the conversation. It's not uncommon, when debugging
a particular problem, or discussing implementation of a new feature,
to have a thread of discussion by CC'ing three or four developers,
plus the HACKERS list for archiving and general interest.

In short, it's a cultural thing.

Ross



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 15:49  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Ross J. Reedstrom <reedstrm@rice.edu>
  0 siblings, 1 reply; 11+ messages in thread

From: Bruce Momjian @ 2001-03-21 15:49 UTC (permalink / raw)
  To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: pgsql-sql

> Note also that it's a mailing list cultural thing: many lists operate
> in a 'post only to the list' mode. Those of us on the pgsql lists do the
> 'list and person' thing, in response to direct questions, for the reasons
> Bruce and D'Arcy point out. Note that by knowing the reasons, one may
> then make informed decisions, like my posting of this message directly
> to the list only, since it's a peripheral issue and multiple people
> are involved in the conversation. It's not uncommon, when debugging
> a particular problem, or discussing implementation of a new feature,
> to have a thread of discussion by CC'ing three or four developers,
> plus the HACKERS list for archiving and general interest.

My mailer would have trouble sending just to the list and not to both. 
To do list-only, the mailing list software would have to set the
Reply-To to be to the list.

Marc had it set up that way a few times, but most didn't like it.  In
fact, the big problem with that setup is that you can't easily reply
just to the poster.

Most mailers have a 'reply to user' and 'reply to group' mode.  Reply to
user goes only to the poster, while reply-to group goes to both.

At least that is how I understand the issue.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-21 16:40  Cedar Cox <cedarc@visionforisrael.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  1 sibling, 0 replies; 11+ messages in thread

From: Cedar Cox @ 2001-03-21 16:40 UTC (permalink / raw)
  To: Grant <grant@conprojan.com.au>; +Cc: pgsql-sql


> > Why does everyone reply to the person as well as CC to the list when the
> > person is on the list anyhow?
> 
> Good question.  They get the reply faster by sending it to them and the
> list, and if someone later wants to reply only to the poster, they have
> the email address right there.

And some people have the 'nomail' option set so they don't receive mail
from the list but they can still post...




^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-03-22 03:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: D'Arcy J.M. Cain <darcy@druid.net>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2001-03-22 03:21 UTC (permalink / raw)
  To: darcy@druid.net; +Cc: Grant <grant@conprojan.com.au>; pgsql-sql

darcy@druid.net (D'Arcy J.M. Cain) writes:
> Thus spake Grant
>> Why does everyone reply to the person as well as CC to the list when the
>> person is on the list anyhow?

> Politeness.  You reply to the list so that others benefit from the discussion
> and you copy the sender since some people don't get to their mailing lists
> as quickly as their regular mail.  One assumes that they have slightly
> more interest in the answer since they asked the question.  Any good email
> client will filter out the dup.

Or, if you don't have such a good email client, see the "eliminatecc"
subscription option offered by our majordomo server.

A further tip: if you don't like getting multiple copies of messages
that are cross-posted to multiple lists, you can tell the majordomo
server
	set ALL unique

"help set" will extract a pretty useful description of all the options
majordomo supports (there are a lot of 'em these days).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Maybe a Bug, maybe bad SQL
@ 2001-04-08 09:36  Louis-David Mitterrand <vindex@apartia.ch>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Louis-David Mitterrand @ 2001-04-08 09:36 UTC (permalink / raw)
  To: pgsql-sql

On Wed, Mar 21, 2001 at 10:49:41AM -0500, Bruce Momjian wrote:
> > Note also that it's a mailing list cultural thing: many lists operate
> > in a 'post only to the list' mode. Those of us on the pgsql lists do the
> > 'list and person' thing, in response to direct questions, for the reasons
> > Bruce and D'Arcy point out. Note that by knowing the reasons, one may
> > then make informed decisions, like my posting of this message directly
> > to the list only, since it's a peripheral issue and multiple people
> > are involved in the conversation. It's not uncommon, when debugging
> > a particular problem, or discussing implementation of a new feature,
> > to have a thread of discussion by CC'ing three or four developers,
> > plus the HACKERS list for archiving and general interest.
> 
> My mailer would have trouble sending just to the list and not to both. 
> To do list-only, the mailing list software would have to set the
> Reply-To to be to the list.

Sorry, but what an inappropriate answer coming from an IT professionnal.
You MUA doesn't support answering to a mailing list? Why not consider
upgrading to a modern MUA that _does_ support that functionality? Are we
condemned to use obsolete software? Are we stuck in old habits for ever?

> Marc had it set up that way a few times, but most didn't like it.  In
> fact, the big problem with that setup is that you can't easily reply
> just to the poster.

The "reply-to: list"? Oh, I see: that one almost made it on the pgsql-*
lists... *shiver*

As if subject mangling and annoying footers were not enough.

> Most mailers have a 'reply to user' and 'reply to group' mode.  Reply to
> user goes only to the poster, while reply-to group goes to both.

Hint: http://www.mutt.org

>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

I wish people could also lose the preaching in their signatures.
1) what does "christ" mean to muslim or hindu or atheist pgsql users?
2) it might be offensive to them
3) why not talk about what we have in common (hint: databases), not the
most divisive issue in the history of humanity: religion
4) were I Jesus, I wouldn't appreciate being held as a mere "backup" ;-)



^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2001-04-08 09:36 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-19 19:46 Maybe a Bug, maybe bad SQL Daryl Herzmann <akrherz@iastate.edu>
2001-03-21 04:40 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-03-21 05:27   ` Grant <grant@conprojan.com.au>
2001-03-21 12:06     ` D'Arcy J.M. Cain <darcy@druid.net>
2001-03-22 03:21       ` Tom Lane <tgl@sss.pgh.pa.us>
2001-03-21 13:20     ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-03-21 15:43       ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-03-21 15:49         ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-04-08 09:36           ` Louis-David Mitterrand <vindex@apartia.ch>
2001-03-21 16:40       ` Cedar Cox <cedarc@visionforisrael.com>
2001-03-21 05:26 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox