Thread: longchar data type??

longchar data type??

From
Ben Davis
Date:
Hi all.  I'm desparately trying to get Microsoft Project to connect to work with my postgresql server via ODBC.  For some reason,  MS Project tries to create a column with the datatype  "longchar"  when it should be "longvarchar".   Is it possible to tweak the psqlodbc source code so that it will accept the "longchar" type and convert it to "text" ??   I'd be happy to write a patch if someone can point me in the right direction...

Re: longchar data type??

From
Tom Lane
Date:
Ben Davis <bendavis78@gmail.com> writes:
> Hi all.  I'm desparately trying to get Microsoft Project to connect to work
> with my postgresql server via ODBC.  For some reason,  MS Project tries to
> create a column with the datatype  "longchar"  when it should be
> "longvarchar".   Is it possible to tweak the psqlodbc source code so that it
> will accept the "longchar" type and convert it to "text" ??   I'd be happy
> to write a patch if someone can point me in the right direction...

Seems like it might work to just go

    CREATE DOMAIN longchar AS text;


            regards, tom lane

Re: longchar data type??

From
Ludek Finstrle
Date:
Thu, Jan 19, 2006 at 07:20:17PM -0500, Tom Lane napsal(a):
> Ben Davis <bendavis78@gmail.com> writes:
> > Hi all.  I'm desparately trying to get Microsoft Project to connect to work
> > with my postgresql server via ODBC.  For some reason,  MS Project tries to
> > create a column with the datatype  "longchar"  when it should be
> > "longvarchar".   Is it possible to tweak the psqlodbc source code so that it
> > will accept the "longchar" type and convert it to "text" ??   I'd be happy
> > to write a patch if someone can point me in the right direction...
>
> Seems like it might work to just go
>
>     CREATE DOMAIN longchar AS text;

Hello,

  it's backend related. We don't support renaming of type, column, table
or something. ODBC doesn't do such statement parsing to know what is what.
And as Tom pointed it would be so easy in PgSQL ;-)

Regards,

Luf

Re: longchar data type??

From
Ben Davis
Date:
Great!  I'm all for an easier solution :-)

On 1/19/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ben Davis <bendavis78@gmail.com> writes:
> Hi all.  I'm desparately trying to get Microsoft Project to connect to work
> with my postgresql server via ODBC.  For some reason,  MS Project tries to
> create a column with the datatype  "longchar"  when it should be
> "longvarchar".   Is it possible to tweak the psqlodbc source code so that it
> will accept the "longchar" type and convert it to "text" ??   I'd be happy
> to write a patch if someone can point me in the right direction...

Seems like it might work to just go

        CREATE DOMAIN longchar AS text;


                        regards, tom lane