Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336153 - temporary views postgresql
Summary: temporary views postgresql
Status: RESOLVED INVALID
Alias: None
Product: Data Tools
Classification: Tools
Component: SQLDevTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: dtp.sqldevtools-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 15:59 EST by prxwrx CLA
Modified: 2012-05-18 13:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prxwrx CLA 2011-02-02 15:59:04 EST
when i use the database development plugin in eclipse and create a temporary view such as:

create temporary view <view_name> as
SELECT distinct 
*
from <table>;

select * from <view_name>;

it says the <view_nane> does not exist

i tried the same query using pgadmin III and it works fine.

p



-- Configuration Details --
Product: Eclipse 1.2.2.20100122-1337 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.platform 3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB
Comment 1 Marc Khouzam CLA 2011-02-02 16:24:55 EST
The product DD is "Device Debugging" and has been retired.
You must mean some other product.
Comment 2 prxwrx CLA 2011-02-09 23:23:44 EST
Marc,

I am using the Database Development Tools in Eclipse 3.5...sorry, I thought the abbreviation meant database development.

P
Comment 3 Brian Fitzpatrick CLA 2011-02-16 17:48:25 EST
It's quite possible that the Postgres table loader doesn't know about temporary views.
Comment 4 Pierre Queinnec CLA 2011-09-11 14:42:35 EDT
Hi P,

i believe this is not a bug, it's a feature ;)
It's the same behavior as psql for example.

The behavior you describe can be obtained in Eclipse DTP by going in the Preferences, then choosing 'Manual Commit' in Data Management > SQL Development > SQL Editor > SQL Files/Scrapbooks.

It stems from the fact that by default, the DTP scrapbook is in auto-commit, so that means that you need to either :
- switch to 'Manual Commit' as described above ;
- select the two statements you wrote down (the CREATE TEMPORARY VIEW and the SELECT), right-click and select 'Execute Selected Text' ;

Brian is also right in mentioning that the PostgreSQL table loader doesn't know about temporary
views. I'll fix that, but that is orthogonal to your original bug, at least I believe.

Please tell me if I'm horribly wrong and I missed your point.
Cheers!
Comment 5 Pierre Queinnec CLA 2012-05-18 13:58:18 EDT
Hi P,

After checking this again, I can confirm it works on your example as expected using Manual Commit.

As a side note, that also means that the temporary view will never be visible in the Data Source Explorer view, because they don't seem to share the same JDBC connection.

I'll go ahead and close this as INVALID. Please re-open if you have any suggestion on how this might work, or if I misunderstood your point.