Error creating an index on postgresql with desc

When executing the following on postgresql 8.2:

CREATE INDEX product_index_8 ON product (product_id DESC, naam DESC, verbruik_per_eenheid DESC, inhoud DESC, barcode DESC);

We get the error:

  ERROR:  syntax error at or near "DESC"
    LINE 1: ...EATE INDEX product_index_8 ON product (product_id DESC, naam...  
    ********** Error **********   
    ERROR: syntax error at or near "DESC"
    SQL state: 42601
    Character: 53

Anyone knows what is going on? we Have the same index on a oracle server and it works without a problem.

Answers


At a guess, you aren't using PostgreSQL, you're using Greenplum Database or Amazon Redshift.

If you really are using 8.2: PostgreSQL 8.2 does not support DESCending ordered indexes.

Newer versions do - it was added in 8.3, per the release notes and docs.

Upgrade, 8.2 is obsolete.


Need Your Help

ng-options filter (range selecting)

arrays angularjs sorting select angularjs-ng-options

I can't really explain properly what I want but I try to make a ng-options in angularJS work:

Android layout issue webview

android layout webview

I do not understand Android layouts. I have the following structure and have tried all sorts of combinations of Relative and Linear layouts with layout above, below, gravity etc. and no matter what...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.