Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:19:47+00:00 2026-05-27T08:19:47+00:00

Postgres 8.1 on linux. When I try: insert into card( routine_id, page, row, col,

  • 0

Postgres 8.1 on linux.

When I try:

   insert into card(
                    routine_id, page, row, col, show_card, flip_card
                 )
                    select (
                        999, 0, 0, 0, show_card, flip_card
                    ) from card   WHERE
                        routine_id = 89 AND page = 0  AND row = 0  AND col = 0
                ;

I get:

ERROR:  column "routine_id" is of type integer but expression is of type record
HINT:  You will need to rewrite or cast the expression.

The select gives back a single column called “row record” that looks like this: (999,0,0,0,1,0)

Googling suggests that my syntax is SQL correct, perhaps this is a Postgres deviation??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:19:48+00:00Added an answer on May 27, 2026 at 8:19 am

    Drop the parentheses after the SELECT.

    INSERT INTO card
        (routine_id, page, row, col, show_card, flip_card)
        SELECT 999, 0, 0, 0, show_card, flip_card
            FROM card   
            WHERE routine_id = 89 AND page = 0  AND row = 0  AND col = 0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue, I'm trying to insert a new row into a postgres
I have Postgres version 8.4.8 select version(); PostgreSQL 8.4.8 on i686-pc-linux-gnu, compiled by GCC
In postgres I am fairly sure you can do something like this SELECT authors.stage_name,
In postgres you can do a comparison against multiple items like so: SELECT 'test'
The database type is PostGres 8.3. If I wrote: SELECT field1, field2, field3, count(*)
guys! Everething's good with linux servers, but there is a big problem with postgres
Im working with Postgres, using SERIAL as my primary key. After I insert a
I'm using Postgres and I'd like to know how to change row information within
I installed postgres on my VM using Vagrant and Chef and when I try
in postgres as an SQL command execute runs a prepared statement from within a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.