pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Data layer migration from MSSQL
3+ messages / 2 participants
[nested] [flat]

* Data layer migration from MSSQL
@ 2008-02-21 17:47 Sebastian Rychter <srychter@anvet.com.ar>
  2008-02-21 18:42 ` Re: Data layer migration from MSSQL Medi Montaseri <montaseri@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Sebastian Rychter @ 2008-02-21 17:47 UTC (permalink / raw)
  To: pgsql-sql

Hi, I'm working on migrating a data layer from MS SQL Server to PostgreSQL
8.2 and found that some reserved words should only be written between quotes
and thus are case sensitive (actually only happened with a table field named
"order"). Is there any way to bypass this  case sensitivity or at least
determine that I am going to use certain reserved words as table fields (or
any other possible solutions) ?

 

Thanks,

 

Sebastian

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

* Re: Data layer migration from MSSQL
  2008-02-21 17:47 Data layer migration from MSSQL Sebastian Rychter <srychter@anvet.com.ar>
@ 2008-02-21 18:42 ` Medi Montaseri <montaseri@gmail.com>
  2008-02-21 18:55   ` Re: Data layer migration from MSSQL Sebastian Rychter <srychter@anvet.com.ar>
  0 siblings, 1 reply; 3+ messages in thread

From: Medi Montaseri @ 2008-02-21 18:42 UTC (permalink / raw)
  To: Sebastian Rychter <srychter@anvet.com.ar>; +Cc: pgsql-sql

I think the grammer should help the parser to determine what you mean when
the token ORDER is seen.

for example in a select statement...

Syntax:
SELECT expression [, ...]
    ...
    [ FROM from_item [, ...] ]
    [ WHERE condition ]
    ...
    [ ORDER BY expression [ ASC | DESC | USING operator ]

keywords (or reserved words) should not be placed in quotes because the
parser relies on them to steer ...

Cheers
Medi

On Thu, Feb 21, 2008 at 9:47 AM, Sebastian Rychter <srychter@anvet.com.ar>
wrote:

>  Hi, I'm working on migrating a data layer from MS SQL Server to
> PostgreSQL 8.2 and found that some reserved words should only be written
> between quotes and thus are case sensitive (actually only happened with a
> table field named "order"). Is there any way to bypass this  case
> sensitivity or at least determine that I am going to use certain reserved
> words as table fields (or any other possible solutions) ?
>
>
>
> Thanks,
>
>
>
> Sebastian
>

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

* Re: Data layer migration from MSSQL
  2008-02-21 17:47 Data layer migration from MSSQL Sebastian Rychter <srychter@anvet.com.ar>
  2008-02-21 18:42 ` Re: Data layer migration from MSSQL Medi Montaseri <montaseri@gmail.com>
@ 2008-02-21 18:55   ` Sebastian Rychter <srychter@anvet.com.ar>
  0 siblings, 0 replies; 3+ messages in thread

From: Sebastian Rychter @ 2008-02-21 18:55 UTC (permalink / raw)
  To: 'Medi Montaseri' <montaseri@gmail.com>; +Cc: pgsql-sql

Sorry,  I think it was misunderstood. I meant that I used the keyword “Order” as a table property, not as part as the statement

In MS SQL I use [Order] and then just query : 

 

Select [Table1].[Order] from [Table1] 

 

Or 

 

Select [Table1].[order] from [Table1]

 

In Postgresql I can’t do : create table Table1 (order varchar(10))  -- because “order” is a keyword

I have to do it like : create Table1 (“Order” varchar(10))

And then always do the query like : Select “Order” from Table1 

which is different from 

                                                                       Select “order” from Table1

 

Thanks again.

 

De: Medi Montaseri [mailto:montaseri@gmail.com] 
Enviado el: jueves, 21 de febrero de 2008 16:43
Para: Sebastian Rychter
CC: pgsql-sql@postgresql.org
Asunto: Re: [SQL] Data layer migration from MSSQL

 

I think the grammer should help the parser to determine what you mean when the token ORDER is seen. 

for example in a select statement...

Syntax:
SELECT expression [, ...] 
    ...
    [ FROM from_item [, ...] ]
    [ WHERE condition ]
    ...
    [ ORDER BY expression [ ASC | DESC | USING operator ]

keywords (or reserved words) should not be placed in quotes because the parser relies on them to steer ... 

Cheers
Medi

On Thu, Feb 21, 2008 at 9:47 AM, Sebastian Rychter <srychter@anvet.com.ar> wrote:

Hi, I'm working on migrating a data layer from MS SQL Server to PostgreSQL 8.2 and found that some reserved words should only be written between quotes and thus are case sensitive (actually only happened with a table field named "order"). Is there any way to bypass this  case sensitivity or at least determine that I am going to use certain reserved words as table fields (or any other possible solutions) ?

 

Thanks,

 

Sebastian

 

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


end of thread, other threads:[~2008-02-21 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-21 17:47 Data layer migration from MSSQL Sebastian Rychter <srychter@anvet.com.ar>
2008-02-21 18:42 ` Medi Montaseri <montaseri@gmail.com>
2008-02-21 18:55   ` Sebastian Rychter <srychter@anvet.com.ar>

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