pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
is this proper sql?
5+ messages / 5 participants
[nested] [flat]

* is this proper sql?
@ 2001-04-17 19:51  clayton cottingham <drfrog@smartt.com>
  0 siblings, 4 replies; 5+ messages in thread

From: clayton cottingham @ 2001-04-17 19:51 UTC (permalink / raw)
  To: pgsql-sql

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_mas_id,det_date,det_amt) values 
(0,0,datetime'now','0'), (1,1,datetime'now','1');

i get
ERROR:  parser: parse error at or near ","


now i personally dont think this is real sql
anyone?



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

* Re: is this proper sql?
@ 2001-04-17 20:29  David Olbersen <dave@slickness.org>
  parent: clayton cottingham <drfrog@smartt.com>
  3 siblings, 0 replies; 5+ messages in thread

From: David Olbersen @ 2001-04-17 20:29 UTC (permalink / raw)
  To: clayton cottingham <drfrog@smartt.com>; +Cc: pgsql-sql

On Tue, 17 Apr 2001, clayton cottingham wrote:

> now i personally dont think this is real sql
> anyone?

Nope, not real. Although that type of syntax would be handy IMHO.

-- Dave




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

* Re: is this proper sql?
@ 2001-04-17 20:29  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: clayton cottingham <drfrog@smartt.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Stephan Szabo @ 2001-04-17 20:29 UTC (permalink / raw)
  To: clayton cottingham <drfrog@smartt.com>; +Cc: pgsql-sql


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_mas_id,det_date,det_amt) values 
> (0,0,datetime'now','0'), (1,1,datetime'now','1');
> 
> i get
> ERROR:  parser: parse error at or near ","
> 
> 
> now i personally dont think this is real sql
> anyone?

I'm pretty sure that meets spec, but isn't currently supported by
postgres.  I believe if I'm reading the spec correctly, it's only
required for the highest level of complience.





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

* Re: is this proper sql?
@ 2001-04-17 20:38  Tom Lane <tgl@sss.pgh.pa.us>
  parent: clayton cottingham <drfrog@smartt.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2001-04-17 20:38 UTC (permalink / raw)
  To: clayton cottingham <drfrog@smartt.com>; +Cc: pgsql-sql

clayton cottingham <drfrog@smartt.com> writes:
> 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');

Multiple rows in INSERT ... VALUES are legal according to the SQL92
spec, but we don't support that (yet).

			regards, tom lane



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

* Re: is this proper sql?
@ 2001-04-17 20:48  Peter Eisentraut <peter_e@gmx.net>
  parent: clayton cottingham <drfrog@smartt.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Peter Eisentraut @ 2001-04-17 20:48 UTC (permalink / raw)
  To: clayton cottingham <drfrog@smartt.com>; +Cc: pgsql-sql

clayton cottingham writes:

> 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');

This is real SQL (except for the now() function) but it isn't supported in
PostgreSQL yet.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter




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


end of thread, other threads:[~2001-04-17 20:48 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 19:51 is this proper sql? clayton cottingham <drfrog@smartt.com>
2001-04-17 20:29 ` David Olbersen <dave@slickness.org>
2001-04-17 20:29 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-04-17 20:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-04-17 20:48 ` Peter Eisentraut <peter_e@gmx.net>

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