Hello Sir,

I have some issues with postgres.

We are planning to port a Billing Application from MySQL+PHP to
PostGres 7.1+PHP.

The issues are maily with capitalized column names.

My Table Name: NetworkName
Column Name1 : NetCode
Column Name2 : NetworkName

All over the application we have used statements like (After fetching *
from above table).

echo $Row["NetCode"]; and echo $Row["NetworkName"];

these statements return nothing where as statements like

echo $Row["netcode"]; and echo $Row["networkname"] display correct
values.

Why is this difference when my column names are capitalized. Even the "psql"
tool displays all column names in lower cases.

I need to port my application urgently ..

Thanks in Advance,
Danny Appaiah

Search Discussions

  • Marko Kreen at Oct 4, 2001 at 7:10 pm

    On Thu, Oct 04, 2001 at 04:10:26PM +0530, Danny Appaiah wrote:
    My Table Name: NetworkName
    Column Name1 : NetCode
    Column Name2 : NetworkName
    By default PostgreSQL turns all table/column names to lowercase,
    unless you tell it not to:

    marko=# create table tEst (vAl text);
    CREATE
    marko=# create table "tEst2" ("vAl" text);
    CREATE
    marko=# \d test
    Table "test"
    Attribute | Type | Modifier
    -----------+------+----------
    val | text |

    marko=# \d "tEst2"
    Table "tEst2"
    Attribute | Type | Modifier
    -----------+------+----------
    vAl | text |


    --
    marko

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-ports @
categoriespostgresql
postedOct 4, '01 at 10:40a
activeOct 4, '01 at 7:10p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Marko Kreen: 1 post Danny Appaiah: 1 post

People

Translate

site design / logo © 2022 Grokbase