For plpgsql im new learning but how do u get a val...
# help
j
For plpgsql im new learning but how do u get a value in a table. I have table color with id and text. If I say select text from color where id = 3 weather there is 10 or 1 row returned its still a table not a row right. So even if its one row “blue” how do i get it as a row rather than table. Or if i have a table as a declared var is it like js can do color[3] for 3rd index and get the actual row
n
Hello @jar! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
j
So basically i want just a type text for my final val
s
Can you provide example of the code you are writing please?
n
jar (2022-04-11)
j
And idk what the bigint thing means was trying to change number type to that from int to fix but idk
This is the random num func
This actually works i think. I guess i dont quite get the idea of everything being a table and how one type gets selected and converted into other types. Like isnt this select returning a table with a list of 1 row only showing text and thus i should have to do chosen_color[0].text in js at least I dont get it here yet
s
Can you paste the code here instead of screenshots please